/* ============================================================
   КИНОКЛУБ — СТИЛИ
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface-2: #1a1a24;
  --surface-hover: #23232f;
  --border: #26263a;
  --border-hover: #35354a;
  --text: #f5f5f7;
  --muted: #8b8b9a;
  --accent: #a855f7;
  --accent-hover: #b975f9;
  --accent-soft: rgba(168, 85, 247, 0.12);
  --gold: #fbbf24;
  --green: #22c55e;
  --blue: #3b82f6;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: 'Manrope', Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   АВТОРИЗАЦИЯ
   ============================================================ */

.auth-screen { position: fixed; inset: 0; z-index: 1000; background: var(--bg); }
.auth-split { display: grid; grid-template-columns: 1.15fr 1fr; height: 100vh; }

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(10,10,15,0.2) 0%, rgba(10,10,15,0.85) 100%),
    radial-gradient(circle at 30% 35%, #2a1a4a 0%, #0a0a0f 70%),
    #0a0a0f;
}

.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 18% 28%, rgba(168,85,247,0.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 62% 72%, rgba(168,85,247,0.35), transparent 100%),
    radial-gradient(2px 2px at 82% 18%, rgba(168,85,247,0.4), transparent 100%),
    radial-gradient(1px 1px at 38% 82%, rgba(168,85,247,0.3), transparent 100%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.auth-hero-popcorn {
  position: absolute;
  top: 45%;
  right: 10%;
  transform: translateY(-50%) rotate(-8deg);
  width: 65%;
  max-width: 520px;
  opacity: 0.95;
  pointer-events: none;
  z-index: 2;
  filter:
    drop-shadow(0 30px 80px rgba(168, 85, 247, 0.25))
    drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}

.auth-hero-logo {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-hero-text { position: relative; z-index: 3; }

.auth-hero-text h3 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.auth-hero-text p {
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  max-width: 380px;
  line-height: 1.55;
}

.auth-form-side {
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--bg);
  overflow-y: auto;
}

.auth-form-box { width: min(100%, 400px); }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.auth-tab {
  flex: 1;
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.auth-tab:hover { color: #fff; }
.auth-tab.active { color: #fff; background: var(--surface-hover); }

.auth-form h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.auth-description { margin: 0 0 28px; color: var(--muted); font-size: 0.88rem; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  color: #c5c5d0;
  font-size: 0.83rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  font-size: 0.92rem;
  transition: border-color 0.18s, background 0.18s;
}

.field input::placeholder { color: #5a5a6a; }
.field input:focus { border-color: var(--accent); background: var(--surface-2); }

.auth-error {
  margin-top: 16px;
  padding: 10px 14px;
  color: #ffb4b4;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  font-size: 0.85rem;
}

.auth-footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-footer a { color: var(--muted); text-decoration: none; transition: color 0.18s; }
.auth-footer a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form-side { padding: 24px; }
}

/* ============================================================
   КНОПКИ
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  color: #fff;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.btn:active { transform: scale(0.98); }
.btn svg { flex-shrink: 0; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { color: #d5d5dc; }
.btn-full { width: 100%; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.watchlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  color: #fff;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.1s;
}

.watchlist-btn:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.watchlist-btn:active { transform: scale(0.98); }
.watchlist-btn.active { color: #d5b3ff; background: var(--accent-soft); border-color: var(--accent); }
.watchlist-btn.active:hover { background: rgba(168, 85, 247, 0.2); }

/* ============================================================
   НАВИГАЦИЯ
   ============================================================ */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1400px, 100%);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}

.nav-links a:hover { color: #fff; background: var(--surface); }
.nav-links a.active { color: #fff !important; background: var(--accent-soft) !important; }

.nav-user { display: flex; align-items: center; gap: 6px; }

.icon-button, .logout-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.icon-button:hover, .logout-button:hover { color: #fff; background: var(--surface); }
.icon-button { padding: 8px; }

.nav-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

.icon-button .nav-badge { position: absolute; top: 2px; right: 0; }

.profile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  min-width: 220px;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.profile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background 0.15s;
}

.profile-menu a:hover { background: var(--surface-hover); }
.profile-menu a.danger { color: #ff9ca1; }
.profile-menu a.danger:hover { background: rgba(239, 68, 68, 0.1); }
.profile-menu-sep { height: 1px; margin: 4px 0; background: var(--border); }

.theme-toggle-btn .icon-sun { display: block; }
.theme-toggle-btn .icon-moon { display: none; }
body.light .theme-toggle-btn .icon-sun { display: none; }
body.light .theme-toggle-btn .icon-moon { display: block; }

/* ============================================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================================ */

main { width: min(1400px, 100%); margin: 0 auto; padding: 32px 28px 60px; }
.section { display: none !important; }
.section.active { display: block !important; animation: fadeUp 0.25s ease; }

.page-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 24px;
}

.page-heading > div:first-child { min-width: 0; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.count { color: var(--muted); font-weight: 500; font-size: 0.85em; }

.empty-state {
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.sort-select {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s;
}

.sort-select:hover { border-color: var(--border-hover); }
.sort-select:focus { border-color: var(--accent); }

/* ============================================================
   HERO-КАРУСЕЛЬ
   ============================================================ */

.hero-wrap { position: relative; margin-bottom: 36px; }
.hero-wrap .hero-banner { margin-bottom: 0; }

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transform: scale(1.05);
  filter: brightness(0.45);
}

.hero-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.7) 45%, rgba(10,10,15,0.3) 100%),
    linear-gradient(0deg, rgba(10,10,15,0.9) 0%, transparent 40%);
}

body.light .hero-backdrop::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 45%, rgba(255,255,255,0.2) 100%),
    linear-gradient(0deg, rgba(255,255,255,0.9) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 32px;
  align-items: flex-end;
  padding: 40px 44px 36px;
  min-height: 380px;
}

.hero-poster {
  width: 180px;
  height: 270px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  background: var(--surface-2);
}

.hero-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-poster .no-poster {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #2a1a4a, #13131a);
}

.hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
  line-height: 1.1;
}

body.light .hero-title { color: var(--text); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.75);
}

body.light .hero-meta { color: var(--muted); }

.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.85rem;
}

.hero-desc {
  margin: 0;
  max-width: 640px;
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.light .hero-desc { color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.hero-skeleton {
  position: absolute;
  inset: 0;
  padding: 40px 44px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(145deg, #16101f, #0a0a0f);
}

.hero-skeleton-content { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 500px; }

.sk-line-lg, .sk-line-md, .sk-line-sm {
  height: 20px;
  border-radius: 8px;
  background: linear-gradient(90deg, #1a1a24 0%, #23232f 50%, #1a1a24 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.sk-line-lg { height: 36px; width: 70%; }
.sk-line-md { height: 14px; }
.sk-line-sm { height: 14px; width: 35%; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.18s, transform 0.18s, border-color 0.18s;
}

.hero-arrow:hover {
  background: rgba(10, 10, 15, 0.95);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}

.hero-arrow-left { left: 16px; }
.hero-arrow-right { right: 16px; }

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(10, 10, 15, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s, transform 0.18s;
}

.hero-dot:hover { background: rgba(255, 255, 255, 0.6); }
.hero-dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

body.light .hero-arrow { background: rgba(255, 255, 255, 0.85); color: #14141a; border-color: rgba(0, 0, 0, 0.1); }
body.light .hero-arrow:hover { background: #fff; border-color: rgba(0, 0, 0, 0.2); }
body.light .hero-dots { background: rgba(255, 255, 255, 0.7); }
body.light .hero-dot { background: rgba(0, 0, 0, 0.25); }
body.light .hero-dot.active { background: var(--accent); }

.main-search-wrap { position: relative; margin-bottom: 28px; max-width: 560px; }
.main-search-wrap .search-box input { width: 100%; }

/* ============================================================
   РЯДЫ КАТАЛОГА
   ============================================================ */

.catalog { display: flex; flex-direction: column; gap: 42px; }
.catalog-row-wrap { width: 100%; }

.catalog-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.catalog-row-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.row-arrows { display: flex; gap: 6px; }

.row-arrows button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.row-arrows button:hover { color: #fff; background: var(--surface-hover); border-color: var(--border-hover); }
body.light .row-arrows button:hover { color: var(--text); }

.catalog-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;   СТРАНИЦА ФИЛЬМА

  padding-bottom: 8px;
  scrollbar-width: none;
}

.catalog-row::-webkit-scrollbar { display: none; }
.catalog-row .movie-card { flex: 0 0 180px; width: 180px; }
.catalog-row .movie-card .movie-info h3 { font-size: 0.86rem; }

/* ============================================================
   СТРАНИЦА ФИЛЬМА
   ============================================================ */

.film-page-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
  padding: 32px 0 40px;
}

.film-page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.film-page-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.film-page-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.film-page-poster .no-poster {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #2a1a4a, #13131a);
}

.film-page-actions-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.film-page-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.film-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 8px 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.film-page-back:hover { color: #fff; background: var(--surface-hover); border-color: var(--border-hover); }

.film-title {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.film-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.age-badge {
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ff9c9c;
  font-weight: 700;
  font-size: 0.78rem;
}

.film-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  font-size: 1rem;
  font-weight: 700;
  align-self: flex-start;
}

.film-rating span { color: var(--muted); font-size: 0.8rem; font-weight: 500; }

.film-genres { font-size: 0.9rem; color: var(--muted); }

.film-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 780px;
}

.film-trailers-section,
.film-cast-section {
  margin-top: 16px;
}

.film-trailers-section h3,
.film-cast-section h3,
.film-page-reviews h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Трейлеры */
.trailer-platforms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.trailer-platform-btn {
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.trailer-platform-btn:hover {
  color: #fff;
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.trailer-platform-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.trailer-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.trailer-player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.trailer-current-name {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Состав */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.cast-card { display: flex; flex-direction: column; gap: 10px; text-align: center; }

.cast-photo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

.cast-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cast-photo .no-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: var(--muted);
}

.cast-name { font-size: 0.88rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.cast-role { font-size: 0.75rem; color: var(--muted); }

/* Отзывы */
.film-page-reviews {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.film-page-reviews:empty { display: none; }

.film-review-item {
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.film-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.film-review-header b { color: var(--text); }
.film-review-header .rating { color: #fbbf24; font-weight: 700; }
.film-review-item p { margin: 0; color: var(--text); font-size: 0.9rem; line-height: 1.6; }

@media (max-width: 900px) {
  .film-page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .film-page-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: start;
  }
  .film-page-actions-vertical { align-self: start; }
  .film-page-poster { width: 100%; }
}

@media (max-width: 620px) {
  .film-page-sidebar {
    grid-template-columns: 1fr;
  }
  .film-page-poster { max-width: 200px; margin: 0 auto; }
}

/* ============================================================
   НЕДАВНИЕ
   ============================================================ */

.halloween-banner { display: none; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.home-content { min-width: 0; }

.home-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.sidebar-card h3 { margin: 0 0 12px; font-size: 0.95rem; font-weight: 700; }
.sidebar-card p { color: var(--muted); font-size: 0.85rem; line-height: 1.55; }

.profile-tip { display: flex; align-items: flex-start; gap: 12px; }
.profile-tip h3 { margin-bottom: 4px; }

.sidebar-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
}

.quick-action {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 11px 12px;
  margin-top: 8px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.quick-action:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.quick-action svg { color: var(--accent); flex-shrink: 0; }

.quick-action-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.quick-action-primary svg { color: #fff; }
.quick-action-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ============================================================
   РЕЦЕНЗИИ (главная)
   ============================================================ */

.reviews-list { display: flex; flex-direction: column; gap: 14px; }

.review-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.18s;
}

.review-item:hover { border-color: var(--border-hover); }

.review-main { display: flex; gap: 16px; align-items: flex-start; }

.review-poster {
  width: 90px;
  height: 135px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}

.review-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.review-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.review-username { color: #fff; font-size: 0.92rem; font-weight: 700; }

.review-meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.review-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

.review-recommend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.review-recommend.yes { color: #4ade80; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.25); }
.review-recommend.no { color: #ff8080; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.25); }

.review-movie-title {
  margin: 2px 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: color 0.18s;
}

.review-movie-title:hover { color: var(--accent); }

.review-text { color: #c5c5d0; line-height: 1.65; font-size: 0.9rem; }

.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.review-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.review-actions button:hover { color: #fff; background: var(--surface-hover); border-color: var(--border); }

.review-edit-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.review-edit-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.review-edit-actions button:hover { color: #fff; background: var(--surface-hover); border-color: var(--border-hover); }
.review-edit-actions button.delete:hover { color: #ff8080; background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.4); }

.review-comments { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--border); }

.comment-item { margin: 10px 0; padding: 8px 0; }
.comment-item p { font-size: 0.85rem; color: #c5c5d0; line-height: 1.55; margin: 0 0 6px; }
.comment-item strong { color: #fff; }

.comment-actions { display: flex; gap: 4px; }

.comment-actions button {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 3px 6px;
  border-radius: 5px;
  transition: all 0.18s;
}

.comment-actions button:hover { color: #fff; background: var(--surface-hover); }

.comment-input-wrap { display: flex; gap: 8px; margin-top: 10px; }

.comment-input-wrap input {
  flex: 1;
  padding: 9px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.18s;
}

.comment-input-wrap input:focus { border-color: var(--accent); }

.comment-input-wrap button {
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}

.comment-input-wrap button:hover { background: var(--accent-hover); }

/* Скелетоны */
.skeleton-review, .movie-skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-review { padding: 20px; display: flex; gap: 16px; }

.skeleton-review .sk-poster {
  width: 90px;
  height: 135px;
  border-radius: 10px;
  background: linear-gradient(90deg, #1a1a24 0%, #23232f 50%, #1a1a24 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  flex-shrink: 0;
}

.skeleton-review .sk-content { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.skeleton-review .sk-line, .movie-skeleton .skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1a1a24 0%, #23232f 50%, #1a1a24 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-review .sk-line.short { width: 40%; }
.skeleton-review .sk-line.medium { width: 70%; }

.movie-skeleton .skeleton-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(90deg, #1a1a24 0%, #23232f 50%, #1a1a24 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.movie-skeleton .skeleton-info { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.movie-skeleton .skeleton-line.short { width: 60%; }

/* ============================================================
   КАРТОЧКИ ФИЛЬМОВ
   ============================================================ */

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px 20px;
  margin-top: 24px;
}

.movie-card {
  position: relative;
  cursor: pointer;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease;
  animation: fadeUp 0.3s ease backwards;
}

.movie-card:hover { transform: translateY(-4px); }

.movie-card .poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.movie-card .poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-wrap img { transform: scale(1.04); }

.movie-card .poster-wrap .no-poster {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #2a1a4a, #13131a);
}

.movie-card .movie-info {
  padding: 12px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.movie-card .movie-info h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  letter-spacing: -0.01em;
}

body.light .movie-card .movie-info h3 { color: var(--text); }

.movie-card .movie-meta {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card .watched-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  z-index: 3;
  opacity: 0.55;
  backdrop-filter: blur(10px);
  transition: all 0.18s;
}

.movie-card .watched-btn:hover { opacity: 1; background: var(--green); transform: scale(1.1); }
.movie-card .watched-btn.active { opacity: 1; background: var(--green); }
.movie-card .watched-btn.active:hover { background: var(--danger); }

#watchlist-grid .movie-card .remove-from-watchlist {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 3;
  backdrop-filter: blur(10px);
  transition: all 0.18s;
}

#watchlist-grid .movie-card .remove-from-watchlist:hover { background: var(--danger); transform: scale(1.1); }

#rated-movies-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px 20px;
  margin-top: 24px;
}

/* ============================================================
   ПОИСК
   ============================================================ */

.search-container { position: relative; margin-top: 16px; margin-bottom: 24px; }
.search-box { position: relative; }

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  font-size: 0.92rem;
  transition: border-color 0.18s, background 0.18s;
}

.search-box input::placeholder { color: #5a5a6a; }
.search-box input:focus { border-color: var(--accent); background: var(--surface-2); }

.search-status { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }

.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.suggestions.active { display: block; }

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.suggestion-item:hover { background: var(--surface-hover); }
.suggestion-item img { width: 40px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.suggestion-item h4 { font-size: 0.88rem; font-weight: 700; color: #fff; margin: 0 0 2px; }
.suggestion-item p { margin: 0; font-size: 0.75rem; color: var(--muted); }

/* ============================================================
   КОЛЕСО
   ============================================================ */

.wheel-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }

.wheel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.wheel-info { padding: 8px 16px; color: var(--muted); font-size: 0.85rem; background: var(--surface-2); border-radius: 20px; }

.wheel-wrap { position: relative; width: 360px; height: 360px; display: flex; align-items: center; justify-content: center; }

#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--surface-2), 0 0 0 6px var(--border), 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(168, 85, 247, 0.1);
}

.wheel-arrow {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.wheel-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }

.wheel-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.wheel-duration button {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #fff;
  font-size: 1.1rem; cursor: pointer; border-radius: 6px;
  transition: background 0.15s;
}

.wheel-duration button:hover { background: var(--surface-hover); }

.wheel-duration input {
  width: 40px; padding: 0; color: #fff;
  background: transparent; border: none;
  font-size: 1rem; font-weight: 700; text-align: center;
}

.wheel-duration input::-webkit-outer-spin-button,
.wheel-duration input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.wheel-duration .duration-label { color: var(--muted); font-size: 0.82rem; }

.btn-spin { padding: 12px 30px; font-size: 0.95rem; font-weight: 700; }
.btn-spin.spinning { background: #6b21a8; border-color: #6b21a8; cursor: wait; }

.wheel-result {
  min-height: 60px;
  padding: 16px 24px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  border-radius: 12px;
  transition: all 0.3s;
}

.wheel-result.winner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.03));
  border: 2px solid var(--accent);
  animation: winnerPulse 0.6s ease;
}

@keyframes winnerPulse {
  0% { transform: scale(0.9); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.wheel-history-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-height: 720px;
  overflow-y: auto;
  position: sticky;
  top: 88px;
}

.wheel-history-card h3 { margin: 0 0 16px; font-size: 1rem; font-weight: 700; }

.wheel-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.wheel-history-item:hover { background: var(--surface-hover); }

.wheel-history-item .history-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff; font-weight: 700;
  flex-shrink: 0;
}

.wheel-history-item .history-content { flex: 1; min-width: 0; }
.wheel-history-item .history-user { font-size: 0.78rem; color: var(--muted); margin: 0 0 2px; }

.wheel-history-item .history-movie {
  font-size: 0.88rem; color: #fff; font-weight: 600; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.wheel-history-item .history-time { font-size: 0.7rem; color: #5a5a6a; margin: 3px 0 0; }

.wheel-history-item .history-delete {
  padding: 6px; color: var(--muted);
  background: transparent; border: none; cursor: pointer;
  font-size: 0.85rem; border-radius: 6px; transition: all 0.18s;
}

.wheel-history-item .history-delete:hover { color: #ff8080; background: rgba(239, 68, 68, 0.1); }

.history-empty { text-align: center; padding: 40px 16px; color: #5a5a6a; font-size: 0.88rem; }
.history-empty span { display: block; font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }

/* ============================================================
   ДРУЗЬЯ
   ============================================================ */

.friends-layout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.friends-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.friends-card h3 { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; }

.friends-card > input {
  width: 100%; padding: 10px 14px; margin-bottom: 12px;
  color: #fff; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; font-size: 0.88rem;
  transition: border-color 0.18s;
}

.friends-card > input:focus { border-color: var(--accent); }

.stack-list { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   ПРОФИЛЬ
   ============================================================ */

.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }

.stat-card {
  padding: 18px; text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s, transform 0.15s;
}

.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.stat-card .stat-value {
  margin-bottom: 6px; font-size: 1.75rem;
  font-weight: 800; color: var(--accent); line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}

.stat-card.green .stat-value { color: var(--green); }
.stat-card.blue .stat-value { color: var(--blue); }

.rating-distribution {
  margin-top: 20px; padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.rating-distribution h3 { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; }

.rating-bars { display: flex; gap: 6px; align-items: flex-end; height: 100px; }

.rating-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }

.rating-bar .bar {
  width: 100%; min-height: 3px; border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent), #c084fc);
  transition: height 0.4s ease;
}

.rating-bar .bar-label { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.rating-bar .bar-count { height: 14px; font-size: 0.65rem; color: #5a5a6a; }

.genre-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.genre-badge {
  padding: 6px 14px; color: #d5b3ff;
  background: var(--accent-soft);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px; font-size: 0.82rem; font-weight: 600;
}

.genre-badge .count { margin-left: 6px; color: #fff; opacity: 0.6; font-size: 0.75rem; }

.theme-pick-btn {
  padding: 10px 18px; color: #fff;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: all 0.18s;
}

.theme-pick-btn:hover { background: var(--surface-hover); transform: translateY(-1px); }

.theme-pick-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

/* ============================================================
   МОДАЛКИ
   ============================================================ */

.modal, .lightbox { display: none; }
.modal.show, .lightbox.show { display: block; }

.modal {
  position: fixed; inset: 0; z-index: 300;
  overflow-y: auto; padding: 20px;
  background: rgba(5, 5, 10, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  width: min(800px, 100%);
  margin: 4vh auto; padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.modal-content h2 {
  margin: 0 0 16px; font-size: 1.3rem;
  font-weight: 800; letter-spacing: -0.02em; color: #fff;
}

.close {
  display: grid; width: 36px; height: 36px;
  place-items: center; margin: 0 0 0 auto; padding: 0;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 9px;
  cursor: pointer; transition: all 0.18s;
}

.close:hover { color: #fff; background: var(--surface-hover); border-color: var(--border-hover); }

.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, 0.92); }

.lightbox img {
  position: absolute; top: 50%; left: 50%;
  max-width: 90vw; max-height: 90vh;
  cursor: zoom-in; transform: translate(-50%, -50%);
}

/* ============================================================
   МОДАЛКА ФИЛЬМА (быстрая)
   ============================================================ */

#movie-modal .modal-content { position: relative; }

#movie-modal .close {
  position: absolute; top: 14px; right: 14px; z-index: 20;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.movie-hero-modal {
  position: relative; min-height: 500px;
  margin: -28px -28px 24px -28px;
  border-radius: 16px 16px 0 0;
  overflow: hidden; background: #0a0a0f;
}

.movie-hero-backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 25%;
  filter: brightness(0.4) blur(3px);
  transform: scale(1.05);
}

.movie-hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,15,0.55) 0%, rgba(10,10,15,0.85) 55%, rgba(10,10,15,0.98) 100%),
    linear-gradient(0deg, rgba(10,10,15,0.95) 0%, transparent 45%);
}

.movie-hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px; align-items: center;
  padding: 40px 44px; min-height: 500px;
}

.movie-hero-poster {
  width: 240px; aspect-ratio: 2/3;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
  background: var(--surface-2);
}

.movie-hero-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.movie-hero-poster .no-poster {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(135deg, #2a1a4a, #13131a);
}

.movie-hero-text { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.movie-hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.03em;
  color: #fff; line-height: 1.1;
}

.movie-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.hero-badge.rating { color: #fbbf24; background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.35); }
.hero-badge.duration { color: #a5f3fc; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }

.movie-hero-genres { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

.movie-hero-desc {
  margin: 0; font-size: 0.92rem; line-height: 1.6;
  color: rgba(255,255,255,0.82);
  display: -webkit-box; -webkit-line-clamp: 6;
  -webkit-box-orient: vertical; overflow: hidden;
}

.movie-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; align-items: center; }

.movie-modal-sequels {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

.movie-modal-sequels h3 { margin: 0 0 14px; font-size: 1rem; font-weight: 700; }

.sequels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin-top: 14px; }

.sequel-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: transform 0.18s, border-color 0.18s;
}

.sequel-card:hover { transform: translateY(-3px); border-color: var(--border-hover); }

.sequel-poster {
  width: 100%; aspect-ratio: 2/3;
  background: linear-gradient(135deg, #2a1a4a, #13131a);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.sequel-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sequel-poster .no-poster { font-size: 2.5rem; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.sequel-info { padding: 10px 12px 12px; }

.sequel-badge {
  display: inline-block; padding: 3px 8px; margin-bottom: 6px;
  color: #d5b3ff; background: var(--accent-soft);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  font-size: 0.62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.03em;
}

.sequel-title {
  font-size: 0.82rem; font-weight: 700; color: #fff;
  line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.2em;
}

.sequel-year { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }

/* ============================================================
   ФОРМЫ
   ============================================================ */

.form-group { margin: 18px 0; }
label { display: block; margin-bottom: 8px; color: #c5c5d0; font-size: 0.86rem; font-weight: 600; }
.optional { color: var(--muted); font-size: 0.76rem; font-weight: 500; }

input, textarea, select {
  width: 100%; padding: 11px 14px;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px; outline: none;
  transition: border-color 0.18s, background 0.18s;
}

input::placeholder, textarea::placeholder { color: #5a5a6a; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: var(--surface); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }

.rating-display { color: var(--gold); font-weight: 800; }
.star-rating { display: flex; flex-wrap: wrap; gap: 2px; }

.star-rating .star {
  display: grid; width: 34px; height: 36px;
  place-items: center; padding: 0;
  color: #3a3a4a; background: transparent;
  border: 0; border-radius: 8px;
  cursor: pointer; opacity: 0.6;
  transition: all 0.16s;
}

.star-rating .star:hover, .star-rating .star.active { color: var(--gold); opacity: 1; transform: scale(1.08); }

.recommend-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-recommend {
  min-height: 38px; padding: 8px 16px;
  color: #c5c5d0; background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
}

.btn-recommend:hover { color: #fff; background: var(--surface-hover); border-color: var(--border-hover); }
.btn-recommend-yes.active { color: #fff; background: var(--green); border-color: var(--green); }
.btn-recommend-no.active { color: #fff; background: var(--danger); border-color: var(--danger); }

/* Звёзды на мобилке — компактнее */
@media (max-width: 500px) {
  .star-rating { justify-content: space-between; gap: 0; }
  .star-rating .star {
    width: 28px;
    height: 30px;
    min-width: 28px;
  }
  .star-rating .star svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 380px) {
  .star-rating .star {
    width: 24px;
    height: 28px;
    min-width: 24px;
  }
  .star-rating .star svg {
    width: 16px;
    height: 16px;
  }
}
/* ============================================================
   ЧАТ
   ============================================================ */

.tg-chat {
  display: grid; grid-template-columns: 320px 1fr;
  height: calc(100vh - 200px); min-height: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tg-sidebar { display: flex; flex-direction: column; overflow: hidden; background: var(--surface-2); border-right: 1px solid var(--border); }
.tg-sidebar-search { padding: 12px; border-bottom: 1px solid var(--border); }

.tg-sidebar-search input {
  width: 100%; padding: 10px 14px;
  color: #fff; background: var(--surface);
  border: 1px solid transparent; border-radius: 10px;
  outline: none; font-size: 0.88rem;
  transition: border-color 0.18s;
}

.tg-sidebar-search input:focus { border-color: var(--accent); }

.tg-chat-list { flex: 1; overflow-y: auto; padding: 6px; }
.tg-chat-list::-webkit-scrollbar { width: 6px; }
.tg-chat-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.tg-chat-item {
  display: flex; gap: 12px; padding: 10px 12px;
  border-radius: 10px; cursor: pointer;
  position: relative; transition: background 0.15s;
}

.tg-chat-item:hover, .tg-chat-item.active { background: var(--surface-hover); }

.tg-chat-item-avatar {
  position: relative; width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0; overflow: hidden;
}

.tg-chat-item-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tg-chat-item-avatar .online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: #3a3a4a;
  border: 3px solid var(--surface-2);
}

.tg-chat-item-avatar .online-dot.online { background: var(--green); box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }

.tg-chat-item-content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.tg-chat-item-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tg-chat-item-name { font-weight: 700; color: #fff; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-chat-item-time { font-size: 0.7rem; color: var(--muted); flex-shrink: 0; }
.tg-chat-item-preview { font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-chat-item-preview.unread { color: #fff; font-weight: 600; }

.tg-chat-item-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  background: var(--accent); color: #fff;
  border-radius: 11px; font-size: 0.72rem; font-weight: 800;
  flex-shrink: 0; align-self: flex-end;
}

.tg-empty-list { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.88rem; }

.tg-dialog { display: flex; flex-direction: column; background: var(--bg); position: relative; overflow: hidden; }

.tg-dialog-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}

.tg-back-btn { display: none; padding: 6px 10px; color: #fff; background: transparent; border: none; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.tg-back-btn:hover { background: var(--surface-hover); }

.tg-dialog-avatar {
  position: relative; width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; overflow: hidden; flex-shrink: 0;
}

.tg-dialog-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tg-dialog-avatar .online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: #3a3a4a; border: 2px solid var(--surface-2);
}

.tg-dialog-avatar .online-dot.online { background: var(--green); }

.tg-dialog-info { flex: 1; min-width: 0; }
.tg-dialog-name { color: #fff; font-weight: 700; font-size: 0.95rem; }
.tg-dialog-status { color: var(--muted); font-size: 0.75rem; }
.tg-dialog-status.online { color: var(--green); }

.tg-messages {
  flex: 1; overflow-y: auto; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 2px;
  background:
    radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.04), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.03), transparent 40%),
    var(--bg);
}

.tg-messages::-webkit-scrollbar { width: 6px; }
.tg-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.tg-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #3a3a4a; font-size: 0.9rem; }
.tg-empty-icon { display: grid; place-items: center; color: var(--border); }

.tg-msg { display: flex; margin-bottom: 4px; position: relative; max-width: 100%; animation: tgMsgIn 0.2s ease; }

@keyframes tgMsgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.tg-msg.mine { justify-content: flex-end; }
.tg-msg.theirs { justify-content: flex-start; }

.tg-msg-bubble {
  max-width: min(65%, 500px);
  padding: 8px 12px 6px;
  border-radius: 16px; position: relative;
  word-wrap: break-word; word-break: break-word;
  font-size: 0.9rem; line-height: 1.4;
  color: #fff; display: inline-block;
}

.tg-msg.mine .tg-msg-bubble { background: var(--accent); border-bottom-right-radius: 4px; }
.tg-msg.theirs .tg-msg-bubble { background: var(--surface-2); border-bottom-left-radius: 4px; }
.tg-msg.mine.grouped .tg-msg-bubble { border-bottom-right-radius: 16px; margin-top: -2px; }
.tg-msg.theirs.grouped .tg-msg-bubble { border-bottom-left-radius: 16px; margin-top: -2px; }

.tg-reply-quote {
  padding: 6px 10px; margin-bottom: 6px;
  border-left: 3px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px; font-size: 0.8rem;
}

.tg-reply-quote .rq-name { color: #fff; font-weight: 700; display: block; margin-bottom: 2px; }
.tg-reply-quote .rq-text { color: rgba(255, 255, 255, 0.75); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tg-msg-content { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; max-width: 100%; }
.tg-msg-content > *:first-child { flex: 1 1 auto; word-break: break-word; }
.tg-msg-content .tg-msg-meta { flex: 0 0 auto; margin-left: auto; }

.tg-msg-meta { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 0.68rem; color: rgba(255, 255, 255, 0.7); vertical-align: bottom; white-space: nowrap; }
.tg-msg.theirs .tg-msg-meta { color: var(--muted); }
.tg-msg-meta .read { color: #a5f3fc; }

.tg-msg-image { max-width: 100%; max-height: 400px; border-radius: 12px; cursor: pointer; display: block; margin: -2px 0 4px; }
.tg-msg-video { max-width: 100%; max-height: 400px; border-radius: 12px; display: block; margin: -2px 0 4px; }

.tg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.tg-reaction {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 12px; font-size: 0.72rem;
  cursor: pointer; transition: background 0.15s;
}

.tg-reaction:hover { background: rgba(255, 255, 255, 0.14); }
.tg-reaction.mine { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); }

.tg-date-divider { text-align: center; margin: 20px 0 10px; }
.tg-date-divider span {
  padding: 4px 14px; background: rgba(255, 255, 255, 0.05);
  border-radius: 12px; font-size: 0.72rem;
  color: var(--muted); font-weight: 600;
  backdrop-filter: blur(10px);
}

.tg-msg-menu {
  position: absolute; min-width: 180px;
  padding: 4px; background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
  z-index: 100; animation: tgMenuIn 0.15s ease;
}

@keyframes tgMenuIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.tg-msg-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px;
  color: var(--text); background: transparent;
  border: none; border-radius: 6px;
  font-size: 0.85rem; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: background 0.15s;
}

.tg-msg-menu button:hover { background: var(--surface-hover); }
.tg-msg-menu button.danger { color: #ff8080; }
.tg-msg-menu button.danger:hover { background: rgba(239, 68, 68, 0.12); }

.tg-emoji-row { display: flex; gap: 4px; padding: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.tg-emoji-row span { padding: 4px 8px; font-size: 1.25rem; cursor: pointer; border-radius: 6px; transition: all 0.15s; }
.tg-emoji-row span:hover { background: var(--surface-hover); transform: scale(1.15); }

.tg-scroll-bottom {
  position: absolute; bottom: 90px; right: 24px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--accent); border: none;
  color: #fff; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  box-shadow: var(--shadow-sm); z-index: 10;
  transition: transform 0.15s;
}

.tg-scroll-bottom:hover { transform: scale(1.08); }

.tg-input-area { flex-shrink: 0; padding: 10px 12px; background: var(--surface-2); border-top: 1px solid var(--border); }

.tg-reply-preview {
  display: flex; justify-content: space-between;
  align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 8px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 8px; font-size: 0.82rem;
}

.tg-reply-preview .rp-text { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-reply-preview .rp-close { color: var(--muted); background: transparent; border: none; font-size: 1.1rem; cursor: pointer; padding: 0 4px; }

.tg-input-row { display: flex; align-items: center; gap: 6px; }

.tg-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: transparent;
  border: none; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  flex-shrink: 0; transition: all 0.15s;
}

.tg-icon-btn:hover { background: var(--surface-hover); color: #fff; }

#chat-input {
  flex: 1; padding: 11px 16px;
  color: #fff; background: var(--surface);
  border: 1px solid transparent;
  border-radius: 20px; outline: none;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

#chat-input:focus { border-color: var(--accent); }

.tg-send-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); border: none;
  color: #fff; border-radius: 50%;
  cursor: pointer; flex-shrink: 0;
  transition: all 0.15s;
}

.tg-send-btn:hover { background: var(--accent-hover); transform: scale(1.05); }

.tg-emoji-picker {
  position: absolute; bottom: 70px; left: 12px;
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 6px; width: 320px; max-height: 250px;
  padding: 12px; background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px; overflow-y: auto;
  box-shadow: var(--shadow); z-index: 50;
}

.tg-emoji-picker span { padding: 6px; font-size: 1.25rem; cursor: pointer; text-align: center; border-radius: 6px; transition: background 0.15s; }
.tg-emoji-picker span:hover { background: var(--surface-hover); }

.skeleton-chat-item { display: flex; gap: 12px; padding: 12px; border-radius: 10px; }

.skeleton-chat-item .sk-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg, #1a1a24 0%, #23232f 50%, #1a1a24 100%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}

.skeleton-chat-item .sk-info { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }

.skeleton-chat-item .sk-line {
  height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #1a1a24 0%, #23232f 50%, #1a1a24 100%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}

/* ============================================================
   НИЖНЯЯ НАВИГАЦИЯ
   ============================================================ */

.bottom-nav {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200; height: 64px;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  justify-content: space-around; align-items: center;
  background: rgba(10, 10, 15, 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.bottom-nav a {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; min-width: 56px;
  padding: 6px 8px; color: var(--muted);
  text-decoration: none; border-radius: 8px;
  position: relative;
  transition: color 0.18s, background 0.18s;
}

.bottom-nav a small { font-size: 0.62rem; font-weight: 600; white-space: nowrap; }
.bottom-nav a.active { color: var(--accent); background: var(--accent-soft); }
.bottom-nav .nav-badge { position: absolute; top: 2px; right: 6px; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
  .wheel-layout { grid-template-columns: 1fr; }
  .wheel-history-card { position: static; max-height: none; }
}

@media (max-width: 840px) {
  .nav-container { flex-wrap: wrap; gap: 6px; min-height: auto; padding: 10px 16px; }
  .nav-links { order: 3; width: 100%; }
  .nav-user { margin-left: auto; }
  main { padding: 24px 16px 44px; }
  .friends-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-container { padding: 10px 16px; min-height: 56px; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 76px; }
  main { padding: 16px 12px 30px; }

  .hero-banner { min-height: 320px; border-radius: 14px; }
  .hero-content { flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 16px; min-height: 320px; }
  .hero-poster { width: 110px; height: 165px; }
  .hero-title { font-size: 1.5rem; }
  .hero-desc { -webkit-line-clamp: 2; font-size: 0.85rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn, .hero-actions .watchlist-btn { flex: 1 1 auto; justify-content: center; }
  .hero-arrow { width: 36px; height: 36px; }
  .hero-arrow-left { left: 8px; }
  .hero-arrow-right { right: 8px; }
  .hero-dots { bottom: 10px; }

  .catalog { gap: 30px; }
  .catalog-row-header h3 { font-size: 1rem; }
  .catalog-row .movie-card { flex: 0 0 130px; width: 130px; }
  .catalog-row .movie-card .movie-info h3 { font-size: 0.78rem; }

  .movies-grid, #rated-movies-list { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .movie-card .movie-info h3 { font-size: 0.82rem; }

  .film-page-hero { margin: -16px -12px 16px; min-height: auto; }
  .film-page-inner { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; min-height: auto; }
  .film-page-poster { width: 180px; margin: 0 auto; }
  .film-page-title { font-size: 1.5rem; }
  .film-page-actions { flex-direction: column; align-items: stretch; }
  .film-page-actions .btn, .film-page-actions .watched-toggle { width: 100%; justify-content: center; }
  .film-page-grid { grid-template-columns: 1fr; gap: 28px; }
  .cast-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }

  .review-item { padding: 14px; }
  .review-main { gap: 12px; }
  .review-poster { width: 72px; height: 108px; }
  .review-username { font-size: 0.88rem; }
  .review-movie-title { font-size: 0.95rem; }
  .review-text { font-size: 0.85rem; }
  .review-actions { gap: 4px; flex-wrap: wrap; }

  .home-sidebar { display: none; }
  h2 { font-size: 1.2rem; }
  .page-heading { gap: 12px; margin-bottom: 18px; }
  #reviews-sort, #rated-sort { width: 100%; }

  .modal { padding: 8px; }
  .modal-content { margin: 1vh auto; padding: 20px; border-radius: 14px; max-height: 96vh; overflow-y: auto; }

  .movie-hero-modal { min-height: auto; margin: -20px -20px 16px -20px; }
  .movie-hero-inner { grid-template-columns: 1fr; gap: 20px; padding: 28px 20px 24px; min-height: auto; }
  .movie-hero-poster { width: 160px; margin: 0 auto; }
  .movie-hero-title { font-size: 1.4rem; }
  .movie-hero-desc { -webkit-line-clamp: 5; font-size: 0.85rem; }
  .movie-hero-actions { flex-direction: column; align-items: stretch; }
  .movie-hero-actions .btn, .movie-hero-actions .watchlist-btn { width: 100%; justify-content: center; }

  .tg-chat { grid-template-columns: 1fr; height: calc(100vh - 200px); }
  .tg-dialog { display: none; }
  .tg-chat.in-dialog .tg-sidebar { display: none; }
  .tg-chat.in-dialog .tg-dialog { display: flex; }
  .tg-back-btn { display: flex; }

  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .wheel-wrap { width: 280px; height: 280px; }
  .wheel-card { padding: 20px 15px; }
  .wheel-controls { flex-direction: column; width: 100%; }
  .btn-spin { width: 100%; }
  .friends-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) { .page-heading .btn { width: 100%; } }

@media (max-width: 390px) {
  .logout-button #user-name-display { display: none; }
  .bottom-nav a small { font-size: 0.58rem; }
  .bottom-nav a { min-width: 48px; padding: 4px 6px; }
}

/* ============================================================
   HALLOWEEN / NEW YEAR
   ============================================================ */

body.halloween {
  --bg: #0a0710; --surface: #16101f; --surface-2: #1e1529;
  --surface-hover: #2a1d3a; --border: #3a2a4a; --border-hover: #4a365a;
  --accent: #ff6b00; --accent-hover: #ff8c2b;
  --accent-soft: rgba(255, 107, 0, 0.12);
  --gold: #ffaa00; --green: #7fff00;
}

body.halloween .halloween-banner { display: block; }

.halloween-banner {
  background: linear-gradient(135deg, #ff6b00 0%, #8b00ff 100%);
  border-radius: 16px; padding: 20px 24px;
  margin-bottom: 20px; position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255, 107, 0, 0.25);
}

.halloween-banner-content { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.halloween-banner-icon { font-size: 3rem; }
.halloween-banner-text h3 { margin: 0 0 4px; color: #fff; font-size: 1.15rem; }
.halloween-banner-text p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 0.85rem; }

body.newyear {
  --bg: #050810; --surface: #0f1420; --surface-2: #151b2a;
  --surface-hover: #1f2638; --border: #2a3346; --border-hover: #3a475a;
  --accent: #00a8e8; --accent-hover: #00c6ff;
  --accent-soft: rgba(0, 168, 232, 0.12); --gold: #ffd700;
}

body.newyear .halloween-banner { display: block; background: linear-gradient(135deg, #00a8e8 0%, #0077b6 100%); }
body.newyear .halloween-banner-icon { font-size: 0; }
body.newyear .halloween-banner-icon::before { content: '🎄'; font-size: 3rem; }
body.newyear .halloween-banner-text h3 { font-size: 0; }
body.newyear .halloween-banner-text h3::before { content: 'С Новым годом, кинолюбители!'; font-size: 1.15rem; }
body.newyear .halloween-banner-text p { font-size: 0; }
body.newyear .halloween-banner-text p::before { content: 'Смотрите новогодние фильмы и классику — самое время'; font-size: 0.85rem; }

/* ============================================================
   СВЕТЛАЯ ТЕМА
   ============================================================ */

body.light {
  --bg: #f5f5f8; --surface: #ffffff; --surface-2: #f0f0f5;
  --surface-hover: #e8e8ef; --border: #dcdce5; --border-hover: #c5c5d0;
  --text: #14141a; --muted: #6b6b7a;
  --accent: #9333ea; --accent-hover: #7c22d4;
  --accent-soft: rgba(147, 51, 234, 0.1);
  --gold: #d97706; --green: #16a34a; --blue: #2563eb; --danger: #dc2626;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.light .skeleton-review .sk-poster,
body.light .skeleton-review .sk-line,
body.light .movie-skeleton .skeleton-poster,
body.light .movie-skeleton .skeleton-line,
body.light .skeleton-chat-item .sk-avatar,
body.light .skeleton-chat-item .sk-line,
body.light .sk-line-lg, body.light .sk-line-md, body.light .sk-line-sm {
  background: linear-gradient(90deg, #ececf2 0%, #dcdce5 50%, #ececf2 100%);
  background-size: 200% 100%;
}

body.light nav { background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid var(--border); }
body.light .bottom-nav { background: rgba(255, 255, 255, 0.95); }
body.light .movie-card .poster-wrap { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }
body.light .modal { background: rgba(20, 20, 26, 0.5); }
body.light .lightbox { background: rgba(0, 0, 0, 0.85); }

body.light .review-username, body.light .review-movie-title,
body.light .movie-hero-title, body.light .modal-content h2,
body.light .auth-form h2, body.light .catalog-row-header h3,
body.light .sidebar-card h3, body.light .friends-card h3,
body.light .rating-distribution h3, body.light .film-page-title,
body.light .cast-name, body.light .trailer-name,
body.light .film-page-trailers h3, body.light .film-page-cast h3,
body.light .film-page-reviews h3 {
  color: var(--text);
}

body.light .review-text, body.light .movie-hero-desc,
body.light .movie-review-text, body.light .comment-item p,
body.light .film-page-desc {
  color: #3a3a4a;
}