/* =========================================================================
   WEST KINO — дизайн-система
   ========================================================================= */

/* --- CSS-переменные. Изменишь здесь — поменяется по всему приложению. --- */
:root {
  /* Базовая палитра */
  --bg-base: #050505;              /* почти чёрный, не абсолютный — так не режет глаза */
  --bg-elevated: #0a0a0a;          /* фон карточек */
  --bg-glass: rgba(255, 255, 255, 0.04);   /* стеклянный эффект */
  --bg-glass-strong: rgba(255, 255, 255, 0.08);

  /* Золото — главный акцент. Не чистое жёлтое золото (#FFD700 — выглядит дёшево),
     а слегка приглушённое с тёплой бронзовой ноткой */
  --gold: #C9A961;
  --gold-bright: #E5C76B;          /* для hover-состояний */
  --gold-deep: #8A7340;             /* для теней */
  --gold-glow: rgba(201, 169, 97, 0.4);    /* для свечения */

  /* Текст */
  --text-primary: #F5F5F5;          /* основной — не чисто белый, чтобы не давил */
  --text-secondary: #B8B8B8;        /* приглушённый */
  --text-muted: #6B6B6B;            /* для меток и лейблов */

  /* Границы */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(201, 169, 97, 0.3);

  /* Тени */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 0 20px rgba(201, 169, 97, 0.3);

  /* Радиусы скруглений (единая система) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Скорости анимаций (единая система — все анимации в стиле) */
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.6s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Сброс стандартных стилей браузера --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Безопасная зона для устройств с вырезом (iPhone, etc) */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Запрещаем выделение текста на UI-элементах — это даёт ощущение нативного приложения */
button, .nav-item, .lang-option {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================================
   ФОНОВЫЕ ЭФФЕКТЫ — анимация солнечного света
   ========================================================================= */

.background-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/*
  Солнечные пятна света. Это большие радиальные градиенты золотого свечения,
  которые медленно плывут по экрану. Используем три штуки разных размеров и
  скоростей, чтобы движение получалось органичным, а не машинно-ровным.

  Каждое пятно — это div с radial-gradient внутри. blur делает их мягкими,
  а opacity ниже единицы — едва заметными, не отвлекающими.

  Анимация floatLight перемещает пятно по большому пути, создавая эффект
  медленно скользящего света от прожектора.
*/

.sun-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;  /* подсказка браузеру для GPU-ускорения */
}

.sun-light-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.4) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: floatLight1 25s ease-in-out infinite;
}

.sun-light-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(229, 199, 107, 0.3) 0%, transparent 70%);
  top: 30%; right: -150px;
  animation: floatLight2 35s ease-in-out infinite;
}

.sun-light-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.25) 0%, transparent 70%);
  bottom: -100px; left: 30%;
  animation: floatLight3 30s ease-in-out infinite;
}

@keyframes floatLight1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(200px, 150px); }
}

@keyframes floatLight2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-180px, -120px); }
}

@keyframes floatLight3 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(120px, -180px); }
}

/*
  Зернистость — едва заметный шум поверх всего. SVG-pattern, потому что
  это самый эффективный способ — никаких внешних картинок, всё inline.
  Зернистость + glassmorphism = эффект кинематографического качества.
*/
.grain-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* =========================================================================
   ШАПКА
   ========================================================================= */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  /* Glassmorphism: размытие фона + полупрозрачный белый */
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--gold);
  font-size: 22px;
  /* Лёгкое золотое свечение вокруг иконки */
  text-shadow: 0 0 12px var(--gold-glow);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  /* Градиент с золотом на тексте логотипа */
  background: linear-gradient(135deg, #F5E5B0 0%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Переключатель языка --- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  backdrop-filter: blur(10px);
}

.lang-switcher:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-gold);
}

.lang-switcher:active {
  transform: scale(0.96);
}

.lang-icon {
  font-size: 14px;
}

.lang-current {
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* =========================================================================
   ОСНОВНОЙ КОНТЕНТ
   ========================================================================= */

.app-main {
  padding: 20px 16px 100px;  /* нижний отступ — под навигацию */
  max-width: 720px;
  margin: 0 auto;
}

/* Экраны: только активный виден */
.screen {
  display: none;
  animation: fadeInUp 0.4s var(--ease);
}

.screen.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* =========================================================================
   ПОИСКОВАЯ СТРОКА
   ========================================================================= */

.search-container {
  margin-bottom: 28px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 18px;
  transition: all var(--duration-fast) var(--ease);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.1), var(--shadow-gold);
}

.search-icon {
  color: var(--gold);
  font-size: 20px;
  margin-right: 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;  /* 16+ предотвращает зум iOS при фокусе */
  font-family: inherit;
  padding: 14px 0;
  letter-spacing: 1px;
}

.search-input::placeholder {
  color: var(--text-muted);
  letter-spacing: normal;
}

.search-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 12px;
  cursor: pointer;
  display: none;
  border-radius: var(--radius-md);
  transition: color var(--duration-fast);
}

.search-clear.visible {
  display: block;
}

.search-clear:hover {
  color: var(--text-primary);
}

/* =========================================================================
   СЕТКА ФИЛЬМОВ
   ========================================================================= */

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.movie-card {
  position: relative;
  aspect-ratio: 2 / 3;  /* классическая пропорция кинопостера */
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-fast) var(--ease);
  will-change: transform;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-card), 0 0 24px var(--gold-glow);
}

.movie-card:active {
  transform: translateY(-2px) scale(0.98);
}

.movie-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*
  Плашка-плейсхолдер вместо реального постера.
  Используется когда мы ещё не загрузили картинки в R2 или нет доступа
  к интернету. Выглядит стильно благодаря градиенту, золотой иконке
  и крупному названию. Дизайн в едином стиле приложения.
*/
.movie-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.movie-card-placeholder::before {
  /* Лёгкий золотой блик в углу — придаёт глубину */
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.placeholder-icon {
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.8;
  text-shadow: 0 0 12px var(--gold-glow);
}

.placeholder-title {
  font-family: 'Playfair Display', serif;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  /* Длинные названия обрезаем многоточием в 3 строки */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Большой плейсхолдер в карточке фильма */
.movie-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.movie-poster-placeholder::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.placeholder-icon-large {
  color: var(--gold);
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.9;
  text-shadow: 0 0 20px var(--gold-glow);
}

.placeholder-title-large {
  font-family: 'Playfair Display', serif;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Градиентная подложка снизу для читаемости текста на постере */
.movie-card-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
  color: var(--text-primary);
}

.movie-card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  /* Если длинное название — обрезаем многоточием */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-views {
  font-size: 11px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Скелетон-карточка для состояния загрузки */
.movie-card-skeleton {
  background: linear-gradient(
    110deg,
    var(--bg-elevated) 30%,
    rgba(255, 255, 255, 0.04) 50%,
    var(--bg-elevated) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================================================
   ЭКРАН КАРТОЧКИ ФИЛЬМА
   ========================================================================= */

.back-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  transition: all var(--duration-fast) var(--ease);
}

.back-button:hover {
  border-color: var(--gold);
  background: var(--bg-glass-strong);
}

.back-button:active {
  transform: scale(0.92);
}

.movie-detail {
  text-align: center;
}

.movie-poster-large {
  width: 240px;
  height: 360px;
  margin: 0 auto 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-card), 0 0 40px var(--gold-glow);
}

.movie-poster-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.movie-meta {
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.movie-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 32px;
}

/* Главная кнопка просмотра — самая яркая на экране */
.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 18px 32px;
  /* Золотой градиент с глубиной */
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all var(--duration-fast) var(--ease);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.watch-button::before {
  /* Световой блик, бегущий через кнопку при hover */
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s var(--ease);
}

.watch-button:hover::before {
  left: 100%;
}

.watch-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(201, 169, 97, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.watch-button:active {
  transform: translateY(0);
}

.watch-icon {
  font-size: 14px;
}

.movie-code-display {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.movie-code-display span:last-child {
  color: var(--gold);
  font-weight: 700;
  margin-left: 6px;
}

/* =========================================================================
   ПРОФИЛЬ
   ========================================================================= */

.profile-container {
  text-align: center;
  padding: 20px 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 700;
  color: #1a1a1a;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-gold);
}

.profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 4px;
}

.profile-id {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
  font-family: 'Inter', monospace;
  letter-spacing: 1px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

/* Общая кнопка действия */
.cta-button {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(201, 169, 97, 0.3);
  transition: all var(--duration-fast) var(--ease);
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.4);
}

.cta-button:active {
  transform: translateY(0);
}

/* =========================================================================
   ПОДПИСКА
   ========================================================================= */

.subscription-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.sub-card {
  position: relative;
  padding: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  backdrop-filter: blur(20px);
}

.sub-card:hover,
.sub-card.selected {
  border-color: var(--gold);
  background: var(--bg-glass-strong);
  box-shadow: var(--shadow-gold);
}

.sub-card-featured {
  border-color: var(--border-gold);
}

.sub-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.sub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.sub-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
}

.sub-card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.currency {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.sub-card-desc {
  color: var(--text-secondary);
  font-size: 13px;
}

.payment-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
}

/* =========================================================================
   НИЖНЯЯ НАВИГАЦИЯ
   ========================================================================= */

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--border-subtle);
  z-index: 90;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color var(--duration-fast);
  border-radius: var(--radius-md);
}

.nav-item .nav-icon {
  font-size: 20px;
}

.nav-item.active {
  color: var(--gold);
}

.nav-item.active .nav-icon {
  text-shadow: 0 0 12px var(--gold-glow);
}

/* =========================================================================
   МОДАЛКА И ТОСТ
   ========================================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s var(--ease);
}

.modal-overlay.visible {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card), 0 0 40px var(--gold-glow);
  animation: slideUp 0.3s var(--ease);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all var(--duration-fast) var(--ease);
}

.lang-option:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-gold);
}

.lang-option.active {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.1);
}

.lang-flag {
  font-size: 22px;
}

.lang-name {
  flex: 1;
  text-align: left;
}

.lang-check {
  color: var(--gold);
  font-weight: 700;
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.lang-option.active .lang-check {
  opacity: 1;
}

/* --- Тост --- */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 12px 20px;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  backdrop-filter: blur(20px);
  z-index: 300;
  opacity: 0;
  transition: all var(--duration-normal) var(--ease);
  box-shadow: var(--shadow-card);
  max-width: 90vw;
  text-align: center;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =========================================================================
   АДАПТИВНОСТЬ
   ========================================================================= */

@media (max-width: 360px) {
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .logo-text {
    font-size: 18px;
  }
}

/* =========================================================================
   ДОСТУПНОСТЬ — уважение к настройкам пользователя
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  /* Если пользователь отключил анимации в настройках устройства,
     отключаем все анимации движения — но оставляем простые fade. */
  .sun-light {
    animation: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }
}


/* =========================================================================
   АДМИН-ПАНЕЛЬ
   ========================================================================= */

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.admin-tab.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.1);
}
.admin-tab:hover { border-color: var(--border-gold); }

.admin-content { display: none; }
.admin-content.active { display: block; }

.admin-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.admin-loading,
.admin-empty,
.admin-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.admin-error { color: #E07070; }

.admin-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin: 12px 0;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-tile {
  padding: 18px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  text-align: center;
}
.stat-tile-value {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.stat-tile-label {
  color: var(--text-secondary);
  font-size: 11px;
}

.admin-search-row,
.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.admin-input,
.admin-search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  backdrop-filter: blur(10px);
}
.admin-input:focus,
.admin-search-input:focus {
  outline: none;
  border-color: var(--gold);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-row,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}
.user-banned {
  border-color: rgba(224, 112, 112, 0.3);
  background: rgba(224, 112, 112, 0.05);
}

.user-info {
  flex: 1;
  min-width: 0;
}
.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.user-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.user-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-action {
  padding: 7px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.btn-action:hover { border-color: var(--gold); }
.btn-action:active { transform: scale(0.96); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1a1a;
  border-color: transparent;
  font-weight: 700;
}
.btn-danger {
  background: rgba(224, 112, 112, 0.1);
  border-color: rgba(224, 112, 112, 0.3);
  color: #E07070;
}
.btn-success {
  background: rgba(112, 200, 130, 0.1);
  border-color: rgba(112, 200, 130, 0.3);
  color: #70C882;
}

.sub-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.role-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: rgba(201, 169, 97, 0.15);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  font-size: 10px;
  color: var(--gold);
  vertical-align: middle;
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-row {
  padding: 10px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}
.log-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 2px;
}
.log-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.log-details {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-family: monospace;
  word-break: break-all;
}

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
  font-size: 14px;
}


/* =========================================================================
   ВИДЕО-ПЛЕЕР (fullscreen overlay)
   ========================================================================= */

.video-player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.video-player-overlay.visible { display: flex; }

.video-element {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: contain;
  background: #000;
}

.video-close {
  position: absolute;
  top: env(safe-area-inset-top, 12px);
  right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
