/* ============================================================
   KinoBase Theme — Main CSS
   Font: Inter Variable (self-hosted, SIL OFL)
   ============================================================ */

/* --- Inter Font (Variable) --------------------------------- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Custom Properties (Light Theme default) ----------- */
:root {
  --bg:          #f3f4f6;
  --bg-card:     #ffffff;
  --bg-card2:    #f9fafb;
  --bg-header:   rgba(255,255,255,0.92);
  --bg-input:    #ffffff;
  --border:      #e5e7eb;
  --text:        #111827;
  --text-muted:  #6b7280;
  --text-dim:    #9ca3af;
  --brand:       #ff4d4d;
  --brand-hover: #e53e3e;
  --price-bg:    #f3f4f6;
  --price-cell:  #ffffff;
  --scrollbar:   #d1d5db;
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover:0 10px 25px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);
  --radius:      0.75rem;
  --transition:  0.3s ease;
}

/* --- Dark Theme -------------------------------------------- */
.dark {
  --bg:          #0f1115;
  --bg-card:     #15181e;
  --bg-card2:    #1a1d24;
  --bg-header:   rgba(10,11,13,0.92);
  --bg-input:    #1a1d24;
  --border:      #1f2937;
  --text:        #f9fafb;
  --text-muted:  #9ca3af;
  --text-dim:    #6b7280;
  --price-bg:    #1f2937;
  --price-cell:  #1a1d24;
  --scrollbar:   #374151;
  --shadow:      0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-hover:0 10px 25px rgba(0,0,0,0.5), 0 4px 10px rgba(0,0,0,0.3);
}

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* --- Scrollbar --------------------------------------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 4px; }

/* --- Layout ------------------------------------------------ */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.container {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-content { flex: 1; padding-block: 2rem; }

/* --- Header ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 2rem;
}

/* Logo */
.site-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo .logo-brand { color: var(--brand); }
.site-logo .logo-name  { color: var(--text); }

/* Primary nav */
.nav-primary {
  display: none;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .nav-primary { display: flex; }
}
.nav-primary a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-primary a:hover,
.nav-primary a.current-menu-item { color: var(--brand); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--text-muted);
  transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--border); color: var(--text); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

/* Search overlay */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 5rem;
}
.search-overlay.active { display: flex; }
.search-form {
  width: 100%;
  max-width: 600px;
  display: flex;
  gap: 0.5rem;
  padding-inline: 1rem;
}
.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.search-input:focus { border-color: var(--brand); }
.search-btn {
  padding: 0.75rem 1.5rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--brand-hover); }
.search-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s;
  padding: 0.25rem 0.5rem;
}
.search-close-btn:hover { opacity: 1; }

/* Settings dropdown */
.settings-menu { position: relative; }

.settings-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  padding-top: 0.5rem; /* bridge gap so mouse can reach dropdown */
  min-width: 12rem;
  z-index: 150;
}
.settings-dropdown-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 0.375rem;
}
/* Only open on JS click — no CSS hover (prevents premature close) */
.settings-menu.open .settings-dropdown { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  border-radius: 0.375rem;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--border); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* Theme toggle icon */
.theme-icon { font-size: 1rem; }

/* --- Hero / Page Heading ----------------------------------- */
.catalog-heading {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.catalog-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.catalog-heading-left { flex: 1; min-width: 0; }
.catalog-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}
.catalog-count {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-muted);
}
.catalog-count strong { font-weight: 700; color: var(--brand); }

/* --- Content Blocks --------------------------------------- */
.content-blocks { display: flex; flex-direction: column; gap: 4rem; }

.category-section {}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
}
.section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.section-link:hover { color: var(--brand); text-decoration: underline; }

/* --- Movie Grid ------------------------------------------- */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}
@media (min-width: 640px)  { .movie-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .movie-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .movie-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .movie-grid { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; } }

/* --- Movie Card ------------------------------------------- */
.movie-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.movie-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* Gallery */
.movie-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0a0a0f;
  flex-shrink: 0;
}

.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-img.active { opacity: 1; }

.gallery-zones {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 10;
}
.gallery-zone { flex: 1; height: 100%; }

/* Badges on poster */
.poster-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 20;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
}

/* Poster action buttons (top-right) */
.poster-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  z-index: 20;
}

.fav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: background 0.2s;
}
.fav-btn:hover { background: rgba(0,0,0,0.75); }
.fav-btn.active svg { fill: currentColor; color: var(--brand); stroke: transparent; }
.fav-btn svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; }

.views-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.views-badge svg { width: 0.875rem; height: 0.875rem; }

/* Image indicators */
.img-indicators {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  width: 100%;
  display: flex;
  gap: 0.25rem;
  padding-inline: 0.75rem;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.2s;
}
.movie-card:hover .img-indicators { opacity: 1; }

.indicator-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  overflow: hidden;
}
.indicator-fill {
  height: 100%;
  width: 0;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.15s ease;
}

/* Card body */
.card-body {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.movie-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.625rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}
.movie-title a:hover { color: var(--brand); }

/* Year · Quality one-liner under card title */
.card-year-quality {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* Promo tags (Акция / Скидки / Бонусы) below coupon */
.card-promo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.card-promo-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 77, 77, 0.12);
  color: var(--brand);
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.card-promo-tag:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Pricing section */
.pricing { margin-top: auto; }

/* Price tabs */
.price-tabs {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}
.price-tab {
  flex: 1;
  padding: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  border-radius: 0.375rem;
  background: var(--price-bg);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.price-tab.active { background: var(--brand); color: #fff; }
.price-tab:hover:not(.active) { color: var(--text); }

/* Price grid */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  background: var(--price-bg);
  padding: 0.25rem;
  border-radius: 0.5rem;
  margin-bottom: 0.625rem;
}
.price-grid.hidden { display: none; }

.price-cell {
  background: var(--price-cell);
  border-radius: 0.25rem;
  padding: 0.4rem 0.25rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  transition: color 0.15s;
  border: none;
}
.price-cell:hover { color: var(--brand); }
.price-cell strong { display: block; font-size: 0.8125rem; color: var(--text); margin-top: 0.1rem; }

/* Coupon */
.coupon-wrap { margin-bottom: 0.625rem; }

.coupon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.375rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: background 0.15s;
}
.coupon-btn:hover { background: var(--brand-hover); }

.coupon-code {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.375rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: copy;
  transition: background 0.15s;
}
.coupon-code:hover { background: var(--brand-hover); }

/* Extra info row */
.movie-extra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 0.625rem;
  margin-top: auto;
}
.extra-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: 0.25rem;
}
.extra-item + .extra-item { border-left: 1px solid var(--border); }
.extra-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.extra-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* --- Search Results --------------------------------------- */
.search-results-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.no-results h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* --- Archive / Category page ---------------------------- */
.archive-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 2rem;
}

/* --- Single Movie --------------------------------------- */
.single-movie { padding-bottom: 4rem; }

.single-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.single-breadcrumb a:hover { color: var(--brand); }
.single-breadcrumb span[aria-hidden] { color: var(--text-dim); }

/* Layout */
.single-layout {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .single-layout { grid-template-columns: 300px 1fr; }
}
@media (min-width: 1024px) {
  .single-layout { grid-template-columns: 440px 1fr; }
}

/* Poster viewer */
.single-poster-col { flex-shrink: 0; }

.single-poster-viewer {
  position: relative;
  aspect-ratio: 2/3;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.single-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.single-poster-img.active { opacity: 1; }
.single-poster-placeholder {
  position: absolute;
  inset: 0;
  background: var(--border);
}

/* Poster nav arrows */
.poster-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 2.25rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 0.375rem;
  opacity: 0;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}
.single-poster-viewer:hover .poster-nav { opacity: 1; }
.poster-nav-prev { left: 0.375rem; }
.poster-nav-next { right: 0.375rem; }
.poster-nav:hover { background: rgba(0,0,0,0.7); }

/* Quality badge on poster */
.single-quality-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  z-index: 20;
}

/* Poster indicators */
.single-indicators {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
  z-index: 30;
}
.single-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.single-indicator.active {
  background: var(--brand);
  transform: scale(1.2);
}

/* Thumbnail strip */
.single-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem;
}
.single-thumb {
  border-radius: 0.375rem;
  overflow: hidden;
  aspect-ratio: 2/3;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  cursor: pointer;
  padding: 0;
  background: none;
}
.single-thumb.active { border-color: var(--brand); }
.single-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Info column */
.single-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.single-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.single-title-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}
.single-views-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.single-views-badge svg { width: 1rem; height: 1rem; }
.single-fav-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.single-fav-btn.active { color: var(--brand); }
.single-fav-btn.active svg { fill: currentColor; stroke: transparent; }
.single-fav-btn svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; }

/* Rating */
.single-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}
.rating-stars { display: flex; gap: 0.1rem; }
.rating-star { font-size: 1rem; color: var(--text-dim); }
.rating-star.filled { color: #f59e0b; }
.rating-value { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.rating-max { font-size: 0.875rem; color: var(--text-muted); }

/* Category tags */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}
.single-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--price-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.single-tag:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Meta table */
.single-meta-table {
  width: 100%;
  font-size: 1rem;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}
.single-meta-table tr { border-bottom: 1px solid var(--border); }
.smeta-label {
  padding: 0.55rem 1rem 0.55rem 0;
  vertical-align: top;
  color: var(--text-muted);
  font-weight: 500;
  width: 9rem;
  white-space: nowrap;
  font-size: 0.9375rem;
}
.smeta-value {
  padding: 0.55rem 0;
  vertical-align: top;
  color: var(--text);
  font-size: 1rem;
}

/* Box office */
.single-box-office { margin-bottom: 1.25rem; }
.single-section-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.box-office-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.box-office-table tr { border-bottom: 1px solid var(--border); }
.box-office-table td { padding: 0.4rem 0; }
.box-office-table td:last-child { text-align: right; font-weight: 600; }

/* Pricing on single */
.single-pricing {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

/* Split price table: Аренда left | Покупка right */
.single-price-split {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}
.single-price-col {
  flex: 1;
  min-width: 0;
}
.single-price-col + .single-price-col {
  border-left: 1px solid var(--border);
}
.single-price-col-header {
  background: var(--price-bg);
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.single-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  font-size: 1rem;
}
.single-price-row + .single-price-row { border-top: 1px solid var(--border); }
.single-price-row span { color: var(--text-muted); }
.single-price-row strong { color: var(--brand); font-weight: 700; }

/* Category blocks + Coupon side by side */
.single-cat-coupon-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}
.single-cat-coupon-row .single-cat-blocks {
  flex: 1;
  margin-bottom: 0;
}
.single-coupon-aside {
  flex-shrink: 0;
  display: flex;
}
.coupon-btn-tall {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 130px;
  max-width: 160px;
  width: 100%;
  white-space: normal;
  line-height: 1.3;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.coupon-btn-tall:hover { background: var(--brand-hover); }

/* Description */
.single-description { margin-bottom: 1.5rem; }
.single-description-text {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.0625rem;
}
.single-description-text p { margin-bottom: 0.75rem; }

/* --- 404 ------------------------------------------------ */
.error-page {
  text-align: center;
  padding: 5rem 1rem;
}
.error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-msg {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.error-sub { color: var(--text-muted); margin-bottom: 2rem; }
.btn-home {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: background 0.2s;
}
.btn-home:hover { background: var(--brand-hover); }

/* --- Pagination ----------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
/* Hide WP screen-reader heading "Пагинация записей" */
.pagination .screen-reader-text { display: none; }
/* Make nav-links flex so numbers sit in a row */
.pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.pagination .page-numbers:hover { background: var(--border); color: var(--text); }
.pagination .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
/* Hide desktop pagination on mobile — replaced by mobile-page-list */
@media (max-width: 639px) { .pagination { display: none; } }

/* --- Mobile page list (archive, search) ----------------- */
.mobile-page-list {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
}
@media (max-width: 639px) { .mobile-page-list { display: flex; } }
.mobile-page-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.375rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
a.mobile-page-num:hover { background: var(--border); color: var(--text); }
.mobile-page-num.current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --- Goto card (next page / see all) -------------------- */
/* Hidden on desktop — only visible inside mobile slider */
.card-goto { display: none !important; }
@media (max-width: 639px) {
  .card-goto {
    display: flex !important;
    flex-direction: column;
    min-height: 260px;
    background: var(--bg-card2);
    border: 2px dashed var(--border);
  }
  .card-goto-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    padding: 2rem 1.5rem;
  }
  .card-goto-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  .card-goto-arrow {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    transition: background 0.2s;
  }
  .card-goto:hover .card-goto-arrow { background: var(--brand-hover); }
  .card-goto-text {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
  }
}

/* --- Footer --------------------------------------------- */
.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  margin-top: auto;
  transition: background-color var(--transition);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* --- Generic Page --------------------------------------- */
.page-article { max-width: 800px; margin-inline: auto; padding-block: 3rem; }
.page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.page-content { color: var(--text-muted); line-height: 1.7; }
.page-content p { margin-bottom: 1rem; }

/* --- Contact Page --------------------------------------- */
.contact-wrap {
  max-width: 640px;
  margin-inline: auto;
  padding-block: 3rem;
}

.contact-intro { margin-bottom: 2.5rem; }

.contact-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.contact-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.contact-field { display: flex; flex-direction: column; gap: 0.375rem; }

.contact-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.contact-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.15);
}
.contact-input::placeholder { color: var(--text-dim); }

.contact-textarea { resize: vertical; min-height: 140px; }

.contact-alert {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.contact-alert.success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #16a34a;
}
.dark .contact-alert.success { color: #4ade80; }
.contact-alert.error {
  display: block;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.35);
  color: var(--brand);
}

.contact-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.2s, opacity 0.2s;
  align-self: flex-start;
}
.contact-submit:hover:not(:disabled) { background: var(--brand-hover); }
.contact-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.contact-submit-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.contact-submit.loading .contact-submit-spinner { display: block; }
.contact-submit.loading .contact-submit-text { opacity: 0.7; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Reviews -------------------------------------------- */
.single-reviews { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.single-reviews-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.review-form-wrap {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.review-form-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.review-form { display: flex; flex-direction: column; gap: 1rem; }
.review-fields {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .review-fields { grid-template-columns: 1fr auto; }
}
.review-field { display: flex; flex-direction: column; gap: 0.375rem; }
.review-label { font-size: 0.875rem; font-weight: 600; }
.review-input {
  padding: 0.625rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.review-input:focus { border-color: var(--brand); }
.review-input::placeholder { color: var(--text-dim); }
.review-textarea { resize: vertical; min-height: 110px; }
.review-select { cursor: pointer; }
.review-captcha-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.review-captcha-row .review-label { white-space: nowrap; margin-bottom: 0; }
.review-captcha-input { width: 6rem; flex-shrink: 0; }
.review-alert {
  display: none;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.review-alert.success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #16a34a;
}
.dark .review-alert.success { color: #4ade80; }
.review-alert.error {
  display: block;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.35);
  color: var(--brand);
}
.review-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  transition: background 0.2s, opacity 0.2s;
  align-self: flex-start;
}
.review-submit:hover:not(:disabled) { background: var(--brand-hover); }
.review-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.review-submit.loading .contact-submit-spinner { display: block; }
.review-submit.loading .review-submit-text { opacity: 0.7; }

/* Review list */
.review-list { display: flex; flex-direction: column; gap: 1rem; }
.review-item {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.review-item--new { border-color: var(--brand); }
.review-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.review-author { font-weight: 700; font-size: 0.9375rem; }
.review-score {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}
.review-score-star { color: #f59e0b; }
.review-date { font-size: 0.8125rem; color: var(--text-muted); margin-left: auto; }
.review-text { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.65; }

/* --- Related sections ----------------------------------- */
.related-section { margin-top: 2.5rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 480px)  { .related-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .related-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(5, 1fr); } }

/* Mini card */
.mini-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.mini-card-link { display: block; text-decoration: none; color: inherit; }
.mini-card-poster {
  position: relative;
  aspect-ratio: 2/3;
  background: var(--border);
  overflow: hidden;
}
.mini-card-poster img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.mini-card:hover .mini-card-poster img { opacity: 0.9; }
.mini-card-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-dim);
}
.mini-card-no-img svg { width: 2.5rem; height: 2.5rem; }
.mini-card-quality {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
  background: rgba(0,0,0,0.65);
  color: #fff;
  backdrop-filter: blur(4px);
}
.mini-card-rating {
  position: absolute;
  bottom: 0.375rem;
  right: 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
  background: rgba(0,0,0,0.65);
  color: #f59e0b;
  backdrop-filter: blur(4px);
}
.mini-card-body { padding: 0.5rem 0.625rem 0.625rem; }
.mini-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.2rem;
}
.mini-card-year { font-size: 0.75rem; color: var(--text-muted); }

/* --- Burger menu ---------------------------------------- */
.burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  padding: 0.375rem;
  color: var(--text-muted);
  transition: background 0.2s;
}
.burger-btn:hover { background: var(--border); }
.burger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.burger-btn.open .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  overflow-y: auto;
  padding: 1rem 0;
}
.mobile-nav.open { display: block; }
.mobile-nav-list { display: flex; flex-direction: column; }
.mobile-nav-list a {
  display: block;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.mobile-nav-list a:hover,
.mobile-nav-list a.current-menu-item { color: var(--brand); background: var(--border); }

@media (min-width: 768px) {
  .burger-btn { display: none; }
  .mobile-nav  { display: none !important; }
}

/* Gallery image click-through to single */
.movie-gallery-link {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* --- Mobile Slider --------------------------------------- */
@media (max-width: 639px) {
  /* Turn the grid into a horizontal scroll snap container */
  .category-section { position: relative; }

  .movie-grid {
    display: flex !important;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0.875rem;
    padding-bottom: 0.75rem;
    /* hide scrollbar */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .movie-grid::-webkit-scrollbar { display: none; }

  .movie-card {
    flex: 0 0 calc(100vw - 3.5rem);
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Slider nav buttons (injected by JS) */
.slider-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.625rem;
}
.slider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.slider-btn:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
.slider-btn:disabled { opacity: 0.3; cursor: default; }
.slider-dots {
  display: flex;
  gap: 0.375rem;
  flex: 1;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.slider-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.slider-dot.active { background: var(--brand); transform: scale(1.3); }

/* Hide slider nav on desktop */
@media (min-width: 640px) { .slider-nav { display: none !important; } }

/* Swipe hint overlay */
.swipe-hint {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: swipe-fade 2.5s ease forwards;
}
.swipe-hint-inner {
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
}
@keyframes swipe-fade {
  0%   { opacity: 0; transform: translateY(4px); }
  20%  { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Utilities ------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Rating badge on card poster ----------------------- */
.badge-rating { color: #f59e0b; }

/* --- Archive subcategory filter ------------------------ */
.archive-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--brand); border-color: var(--brand); }
.filter-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.filter-pill-count {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.75;
}
.filter-pill.active .filter-pill-count { opacity: 0.85; }

/* --- Favorites page ------------------------------------ */
.favorites-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1rem;
  gap: 1rem;
}
.favorites-empty-icon {
  width: 5rem;
  height: 5rem;
  color: var(--text-dim);
}
.favorites-empty-icon svg { width: 100%; height: 100%; }
.favorites-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
}
.favorites-empty-text {
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
}
.favorites-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.favorites-back-btn:hover { background: var(--brand-hover); }

/* ============================================================
   Filter panel (sliding two-screen filter on archive pages)
   ============================================================ */
.filter-panel-wrap {
  position: relative;
  flex-shrink: 0;
}

/* "Фильтры" trigger button */
.filter-panel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.filter-panel-btn svg { width: 1rem; height: 1rem; color: var(--text-muted); }
.filter-panel-btn:hover { border-color: var(--brand); }
.filter-panel-btn.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.filter-panel-btn.active svg { color: #fff; }
.filter-panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 0.2rem;
}
.filter-panel-btn.active .filter-panel-badge { background: rgba(255,255,255,0.35); }

/* Panel container */
.filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.28);
  overflow: hidden;
  z-index: 150;
}
.filter-panel.open { display: block; }

/* Individual screens */
.filter-screen { display: none; flex-direction: column; }
.filter-screen.active { display: flex; }

.filter-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.filter-screen-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.filter-back-btn {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.filter-back-btn:hover { color: var(--brand); }
.filter-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 0.1rem;
  transition: color 0.15s;
}
.filter-close-btn:hover { color: var(--text); }

/* Category list (screen 1) */
.filter-cat-list { list-style: none; padding: 0.5rem 0; margin: 0; }
.filter-cat-list li { border-bottom: 1px solid var(--border); }
.filter-cat-list li:last-child { border-bottom: none; }
.filter-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  text-align: left;
  transition: background 0.12s;
}
.filter-cat-btn:hover { background: var(--bg-card2); }
.filter-cat-arrow { color: var(--text-muted); font-size: 1.1rem; }
.filter-selected-val {
  font-size: 0.8rem;
  color: var(--brand);
  font-weight: 600;
  margin-left: auto;
  padding-right: 0.25rem;
}

/* Sub-item list (screen 2/3) */
.filter-sub-list {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  max-height: 320px;
  overflow-y: auto;
}
.filter-sub-list li { border-bottom: 1px solid var(--border); }
.filter-sub-list li:last-child { border-bottom: none; }
.filter-sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.filter-sub-link:hover { background: var(--bg-card2); }
.filter-sub-link.active { color: var(--brand); font-weight: 600; }
.filter-sub-check { color: var(--brand); font-size: 0.9rem; }

/* Footer (reset button) */
.filter-panel-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.filter-reset-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.filter-reset-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================
   Nav dropdown (year / genre filters in primary nav)
   ============================================================ */
.nav-primary .nav-item {
  position: relative;
}
/* nav-item-link inherits .nav-primary a styles */
.nav-primary .nav-item-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-primary .nav-item:hover .nav-item-link,
.nav-primary .nav-item.current-menu-item .nav-item-link {
  color: var(--brand);
}
/* Transparent padding-top bridges the gap to prevent accidental close */
.nav-primary .nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 0.75rem;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  transition-delay: 0.18s;
}
.nav-primary .nav-item:hover .nav-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}
.nav-dropdown-inner {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  max-height: 420px;
  overflow-y: auto;
}
.nav-dropdown-col {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}
.nav-dropdown-heading {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
  padding: 0 0.25rem;
  white-space: nowrap;
}
.nav-dropdown-col a {
  font-size: 0.825rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.2rem 0.35rem;
  border-radius: 0.3rem;
  white-space: nowrap;
  transition: color 0.1s, background 0.1s;
}
.nav-dropdown-col a:hover,
.nav-dropdown-col a.active {
  color: var(--brand);
  background: rgba(255, 77, 77, 0.09);
}

/* ============================================================
   Archive filter bar (year / genre selects on category pages)
   ============================================================ */
.archive-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.filter-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.filter-select-wrap::after {
  content: '';
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}
.filter-select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 2.375rem 0.4rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
}
.filter-select:hover { border-color: var(--brand); }
.filter-select:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.filter-reset {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.filter-reset:hover { color: var(--brand); border-color: var(--brand); }

/* Active filter badges in catalog heading */
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.5em;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0.2em 0.5em 0.2em 0.65em;
  vertical-align: middle;
  font-weight: 600;
  line-height: 1.7;
  margin-left: 0.3rem;
}
.active-filter-tag .remove-filter {
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  font-size: 1.15em;
  line-height: 1;
  text-decoration: none;
}
.active-filter-tag .remove-filter:hover { color: #fff; }

/* ============================================================
   Desktop/mobile filter visibility
   ============================================================ */
.filter-mobile-only  { display: block; }
.filter-desktop-only { display: none; }

@media (min-width: 768px) {
  .filter-mobile-only  { display: none !important; }
  .filter-desktop-only { display: flex; }
}

/* ============================================================
   Desktop filter bar (below h1 on archive / front-page)
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}
.filter-bar-group {
  position: relative;
}
.filter-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.filter-bar-btn:hover { border-color: var(--brand); }
.filter-bar-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.filter-bar-chevron {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.15s;
}
.filter-bar-btn[aria-expanded="true"] .filter-bar-chevron { transform: rotate(180deg); }
.filter-bar-drop {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 160px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  z-index: 200;
}
.filter-bar-drop.open { display: block; }
.filter-bar-drop ul { list-style: none; padding: 0.4rem 0; margin: 0; }
.filter-bar-drop ul li { display: block; }
.filter-bar-drop ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.filter-bar-drop ul li a:hover { background: var(--bg-card2); }
.filter-bar-drop ul li a.active { color: var(--brand); font-weight: 600; }
.filter-bar-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.filter-bar-reset:hover { color: var(--brand); border-color: var(--brand); }

/* ============================================================
   Cast section (actors on movie single page)
   ============================================================ */
.single-cast { margin-bottom: 1.25rem; }
.cast-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.cast-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.cast-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.cast-chip:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================
   Actor page (single-actor.php)
   ============================================================ */
.actor-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}
.actor-badge {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  background: linear-gradient(135deg, var(--brand) 0%, #e53e3e 100%);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.actor-badge:hover { opacity: 0.85; }

.actor-chars-table { margin-top: 0; }

.actor-attr-link {
  color: var(--brand);
  text-decoration: none;
}
.actor-attr-link:hover { text-decoration: underline; }

/* Category blocks on single movie page */
.single-cat-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.single-cat-block {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-width: 0;
}
.scb-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.scb-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.4rem;
  font-size: 1rem;
  font-weight: 500;
}

/* Collections section (Подборки) — below description */
.single-collections { margin-top: 1.25rem; }
.collections-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.collection-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.collection-tag:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Category links in movie meta table / blocks */
.smeta-cat-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.smeta-cat-link:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.actor-social { margin-top: 1.25rem; }
.actor-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.actor-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.825rem;
  transition: border-color 0.15s, color 0.15s;
}
.actor-social-link:hover { border-color: var(--brand); color: var(--brand); }
.actor-social-icon { font-size: 1rem; line-height: 1; }

.actor-filmography { margin-top: 3rem; }

/* ============================================================
   Lightbox
   ============================================================ */
.kb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.kb-lightbox.open { display: flex; }

.kb-lb-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s;
  z-index: 10;
  padding: 0.25rem;
}
.kb-lb-close:hover { opacity: 1; }

.kb-lb-counter {
  position: absolute;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  z-index: 10;
  pointer-events: none;
}

.kb-lb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 1rem;
}

.kb-lb-img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  display: block;
}

.kb-lb-nav {
  flex-shrink: 0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.kb-lb-nav:hover { background: rgba(255,255,255,0.25); }

.kb-lb-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 1rem 0.75rem;
  max-width: 100vw;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.kb-lb-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 0.35rem;
  overflow: hidden;
  cursor: pointer;
  background: none;
  padding: 0;
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s;
}
.kb-lb-thumb.active,
.kb-lb-thumb:hover { opacity: 1; border-color: #fff; }
.kb-lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 600px) {
  .kb-lb-nav { width: 36px; height: 36px; font-size: 1.4rem; }
  .kb-lb-img { max-width: calc(100vw - 80px); max-height: calc(100vh - 180px); }
}

/* ============================================================
   UPDATES BLOCK
   ============================================================ */

/* 1b. Promo tags — centered, bigger, square border */
.card-promo-tags { justify-content: center; }
.card-promo-tag {
  border-radius: 0.25rem !important;
  font-size: 0.8rem !important;
  padding: 0.25rem 0.6rem !important;
}

/* Coupon code shown inside hero wrapper (single page) */
.single-coupon-hero .coupon-code {
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  border-radius: 0.75rem;
  width: 100%;
  letter-spacing: 0.12em;
}

/* 1a. Year/quality links on card */
.card-meta-link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  transition: opacity 0.15s;
}
.card-meta-link:hover { opacity: 0.8; }

/* 1c. Bigger movie title on desktop */
@media (min-width: 768px) {
  .movie-title { font-size: 1.0625rem; }
}

/* 1d. Red glow on card hover — desktop only */
@media (pointer: fine) {
  .movie-card:hover {
    box-shadow: 0 0 0 2px var(--brand),
                0 0 22px rgba(255,77,77,0.38),
                0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(-3px);
  }
}
/* Restore normal shadow on touch devices */
@media (pointer: coarse) {
  .movie-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
  }
}

/* 2. Larger text on single movie page on desktop */
@media (min-width: 768px) {
  .single-price-row { font-size: 1.0625rem; }
  .smeta-value       { font-size: 1.0625rem; }
  .single-description-text { font-size: 1.125rem; }
  .review-text       { font-size: 1rem; }
  .single-section-label { font-size: 1rem; }
}

/* 3. Red header in pricing table */
.single-price-col-header {
  background: var(--brand);
  color: #fff;
  border-bottom-color: var(--brand-hover);
}

/* 4. Coupon hero button (below rating on single page) */
.single-coupon-hero { margin-bottom: 1.25rem; }
.coupon-btn-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand) 0%, #c0392b 100%);
  color: #fff;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(255,77,77,0.45);
  letter-spacing: 0.02em;
  text-align: center;
}
.coupon-btn-hero:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(255,77,77,0.55);
}

/* 5. Box office table — tighter columns */
.box-office-table td:first-child { width: 45%; }
.box-office-table td:last-child  { padding-left: 1rem; }

/* 6. Bigger text in Подборки */
.collection-tag { font-size: 0.9375rem; padding: 0.35rem 0.9rem; }

/* 7. h3 visual size increase */
h3 { font-size: 1.25rem; }

/* 8. Filter bar always visible (also on mobile) */
.filter-bar { display: flex !important; }

/* 9. Prevent horizontal scroll on single movie page mobile */
@media (max-width: 767px) {
  .single-movie  { overflow-x: hidden; max-width: 100%; }
  .single-layout { overflow-x: hidden; }
  .single-price-split { flex-direction: column; }
  .single-price-col + .single-price-col { border-left: none; border-top: 1px solid var(--border); }
}

/* 11. Coupon button full width on mobile */
@media (max-width: 767px) {
  .single-coupon-aside { width: 100%; }
  .coupon-btn-tall { max-width: 100%; min-width: 0; width: 100%; }
}

/* 13. Filter bar bigger text on desktop */
@media (min-width: 768px) {
  .filter-bar-btn { font-size: 0.9375rem; }
  .filter-bar-drop ul li a { font-size: 0.9375rem; }
}

/* 15. Primary nav — bigger + brand color */
.nav-primary a,
.nav-primary .nav-item-link {
  font-size: 1rem;
  color: var(--brand);
}
.nav-primary a:hover,
.nav-primary a.current-menu-item,
.nav-primary .nav-item:hover .nav-item-link,
.nav-primary .nav-item.current-menu-item .nav-item-link {
  color: var(--brand-hover);
}

/* 17. Meta table — visible borders + red labels */
.single-meta-table {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  border-collapse: separate;
}
.single-meta-table tr:last-child { border-bottom: none; }
.smeta-label {
  color: var(--brand);
  border-right: 1px solid var(--border);
  background: rgba(255,77,77,0.06);
  font-weight: 600;
  padding-left: 0.75rem;
}
.smeta-value { padding-left: 0.875rem; }

/* Archive bottom description */
.archive-bottom-desc {
  margin-top: 3rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}
.archive-bottom-desc h2,
.archive-bottom-desc h3 { color: var(--text); margin-top: 1.25rem; }
.archive-bottom-desc a   { color: var(--brand); }

/* ============================================================
   AUTH PAGES — Login & Registration
   ============================================================ */

.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

/* Logo */
.auth-logo {
  display: block;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 1.75rem;
}
.auth-logo strong { color: var(--brand); }

/* Title */
.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.5rem;
  color: var(--text);
}

/* Alert messages */
.auth-alert {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.auth-alert-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.35);
  color: #f87171;
}
.auth-alert-success {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.35);
  color: #4ade80;
}

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

.auth-field { display: flex; flex-direction: column; gap: 0.35rem; }

.auth-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 0.9375rem;
  padding: 0.65rem 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,77,77,0.18);
}
.auth-input.is-error {
  border-color: #f87171;
}

/* Password toggle */
.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 2.75rem; }

.auth-toggle-pw {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.auth-toggle-pw svg { width: 18px; height: 18px; }
.auth-toggle-pw:hover { color: var(--text); }

/* Hint text */
.auth-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Remember checkbox */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-remember input { accent-color: var(--brand); }

/* Submit button */
.auth-submit {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  margin-top: 0.25rem;
}
.auth-submit:hover {
  background: var(--brand-hover);
  box-shadow: 0 4px 14px rgba(255,77,77,0.35);
  transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }

/* Bottom links */
.auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.auth-links a { color: var(--brand); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links-sep { opacity: 0.5; }

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.25rem; }
}
