/* ============================================================
   CINEMORA — DESIGN SYSTEM & ULTRA-MODERN STYLES
   ============================================================ */

/* ---------------- 1. RESET & DESIGN TOKENS ---------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

:root {
  /* Color Palette */
  --bg-main: #070811;
  --bg-alt: #0d0e1b;
  --bg-surface: #14172a;
  --bg-surface-2: #1e223d;
  --bg-glass: rgba(18, 21, 38, 0.65);
  --bg-glass-strong: rgba(26, 30, 54, 0.85);

  --border-light: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(139, 92, 246, 0.4);

  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;

  /* Neon Accents */
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #06b6d4;
  --magenta: #ec4899;
  --amber: #f59e0b;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-card: linear-gradient(180deg, rgba(14, 16, 27, 0) 0%, rgba(14, 16, 27, 0.95) 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);

  /* Shadows & Glows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 35px rgba(139, 92, 246, 0.35);
  --shadow-cyan-glow: 0 0 30px rgba(6, 182, 212, 0.3);

  /* Easing Curves */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--violet);
  color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-2);
  border-radius: 99px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* ---------------- SVG VECTOR ICON SYSTEM ---------------- */
.svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out), color 0.25s ease, fill 0.25s ease;
}
.svg-icon.ic-heart {
  color: var(--text-dim);
}
.svg-icon.ic-heart.filled, .card-favorite-btn.active .svg-icon, .btn-primary .svg-icon.ic-heart {
  color: #f43f5e;
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.5));
}
.svg-icon.ic-star {
  color: var(--amber);
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.4));
}
.svg-icon.ic-flame {
  color: #f97316;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.5));
}
.svg-icon.ic-sparkles {
  color: #a855f7;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.4));
}

.badge-icon-flex {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-item span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.people-card b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--cyan);
}

/* ---------------- 2. AMBIENT CURSOR GLOW ---------------- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14) 0%, rgba(6, 182, 212, 0.06) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  transition: opacity 0.4s ease;
}

/* ---------------- 3. PRELOADER ---------------- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.preloader-logo {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}
.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.8));
  animation: logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(-5deg); }
}
.logo-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.preloader-bar {
  width: 180px;
  height: 4px;
  background: var(--bg-surface-2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.preloader-progress {
  width: 40%;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 99px;
  animation: shimmerProgress 1.4s ease-in-out infinite alternate;
}
@keyframes shimmerProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ---------------- 4. NAVBAR ---------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(7, 8, 17, 0.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  padding: 12px 0;
  border-color: var(--border-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex: none;
}
.brand-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-icon {
  font-size: 1.6rem;
  z-index: 2;
}
.brand-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-brand);
  filter: blur(10px);
  opacity: 0.6;
  z-index: 1;
  animation: pulseGlow 3s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0% { opacity: 0.4; transform: scale(0.9); }
  100% { opacity: 0.8; transform: scale(1.2); }
}

.brand-text {
  color: var(--text-main);
}
.brand-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.nav-link {
  position: relative;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.25s ease;
}
.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
  color: #ffffff;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-btn-special {
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge-count {
  background: var(--gradient-brand);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

/* ---------------- INSTANT SEARCH BOX & DROPDOWN ---------------- */
.search-box-container {
  position: relative;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 99px;
  padding: 10px 18px;
  width: 280px;
  transition: all 0.35s var(--ease-out);
}
.search-wrap:focus-within {
  width: 350px;
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), var(--shadow-glow);
}
.search-icon {
  color: var(--text-muted);
  flex: none;
  transition: color 0.3s;
}
.search-wrap:focus-within .search-icon {
  color: var(--cyan);
}
.search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}
.search-wrap input::placeholder {
  color: var(--text-muted);
}
.search-clear {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.search-clear:hover {
  color: #ffffff;
  transform: scale(1.2);
}
.search-kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-family: inherit;
  color: var(--text-muted);
  font-weight: 600;
  flex: none;
}
.search-wrap:focus-within .search-kbd {
  display: none;
}

/* Search Dropdown Popup */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 10px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: dropdownFade 0.25s var(--ease-out);
}
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.search-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.dropdown-thumb {
  width: 42px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: var(--bg-surface-2);
}
.dropdown-info {
  flex: 1;
  min-width: 0;
}
.dropdown-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.dropdown-rating {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  flex: none;
}

/* Mobile Hamburger Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  margin: 0 auto;
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- 5. MOBILE DRAWER MENU ---------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1002;
  background: rgba(7, 8, 17, 0.95);
  backdrop-filter: blur(24px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: all 0.4s var(--ease-out);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-close {
  color: var(--text-dim);
  font-size: 1.5rem;
}
.mobile-menu-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}
.menu-item.active {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 10px 0;
}

/* ---------------- 6. HERO SECTION (ALBUM BANNER CAROUSEL & DETAILS BELOW) ---------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 100px 36px 30px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  gap: 20px;
  isolation: isolate;
}

/* Crisp Album Banner Card */
.hero-banner-card {
  position: relative;
  width: 100%;
  aspect-ratio: 21/9;
  min-height: 220px;
  max-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), var(--shadow-glow);
  background: var(--bg-surface-2);
  user-select: none;
  touch-action: pan-y;
  cursor: pointer;
}

.hero-timer-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-brand);
  width: 0%;
  z-index: 10;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.9);
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0;
  filter: none !important; /* 100% Crisp, sharp, no blur! */
  transform: scale(1.02);
  transition: opacity 0.8s ease-in-out, transform 1s ease-in-out;
}

.hero-bg.active {
  opacity: 1;
  transform: scale(1);
}

.hero-banner-arrows {
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 8;
}

.hero-arrow-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(7, 8, 17, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-arrow-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #ffffff;
  transform: scale(1.1);
}

.hero-dots-banner {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 8;
  padding: 5px 12px;
  background: rgba(7, 8, 17, 0.65);
  backdrop-filter: blur(12px);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Details Block Placed UNDER the Banner Card */
.hero-details-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 2;
  animation: heroSlideUp 0.6s var(--ease-out);
}
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.hero-plot {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 800px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

/* Button Variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  transition: all 0.3s var(--ease-out);
}
.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5);
}
.btn-primary.btn-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.7), var(--shadow-glow);
}
.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--text-dim);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 10px;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  width: 100%;
}
.hero-dots {
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
}
.hero-dot.active {
  width: 32px;
  background: var(--gradient-brand);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}
.hero-arrows {
  display: flex;
  gap: 10px;
}
.hero-arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.hero-arrow-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  transform: scale(1.1);
}

.hero-scroll-hint {
  position: absolute;
  right: 36px;
  bottom: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.scroll-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-dot {
  width: 4px;
  height: 6px;
  background: var(--cyan);
  border-radius: 2px;
  animation: scrollAnim 1.8s infinite;
}
@keyframes scrollAnim {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ---------------- 7. GENRE & SORT FILTER SECTION ---------------- */
.genre-section {
  padding: 40px 36px 20px;
  max-width: 1440px;
  margin: 0 auto;
}
.section-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.genre-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-subtitle {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}
.sort-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.sort-tab {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.25s ease;
}
.sort-tab.active {
  background: var(--bg-surface-2);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.genre-bar-wrap {
  overflow-x: auto;
  padding: 12px 8px 24px 8px;
  margin: -6px -8px -12px -8px;
  scrollbar-width: none;
}
.genre-bar-wrap::-webkit-scrollbar {
  display: none;
}
.genre-bar {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}
.genre-chip {
  padding: 10px 20px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s var(--ease-out);
  flex: none;
}
.genre-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: translateY(-2px);
}
.genre-chip.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(139, 92, 246, 0.5);
}

/* ---------------- 8. MOVIE CARDS & 3D PARALLAX TILT ---------------- */
.rows-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 36px 60px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.row-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.row-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}
.accent-dash {
  width: 4px;
  height: 24px;
  background: var(--gradient-brand);
  border-radius: 4px;
}

.row-nav {
  display: flex;
  gap: 8px;
}
.row-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.row-nav-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
}

.row-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 4px 20px;
}
.row-track::-webkit-scrollbar {
  display: none;
}

/* Movie Card Style & 3D Tilt */
.card {
  flex: none;
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.4s var(--ease-out), opacity 0.4s ease;
}

.card-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease;
}

.card:hover .card-poster-wrap {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.card:hover .card-poster-wrap img {
  transform: scale(1.08);
}

.card-code-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(7, 8, 17, 0.75);
  backdrop-filter: blur(10px);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-light);
}

.card-rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(245, 158, 11, 0.85);
  backdrop-filter: blur(10px);
  color: #000000;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-favorite-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(7, 8, 17, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.25s var(--ease-spring);
  opacity: 0;
  transform: scale(0.8);
}
.card:hover .card-favorite-btn {
  opacity: 1;
  transform: scale(1);
}
.card-favorite-btn.active {
  opacity: 1;
  transform: scale(1);
  background: var(--magenta);
  border-color: var(--magenta);
  box-shadow: 0 0 15px var(--magenta);
}

.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--gradient-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card:hover .card-overlay {
  opacity: 1;
}

.card-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.8);
  transform: scale(0.7);
  transition: transform 0.35s var(--ease-spring);
}
.card:hover .card-play {
  transform: scale(1);
}

.ov-genres {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  font-size: 0.78rem;
  color: var(--cyan);
  font-weight: 600;
  text-align: center;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-year {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Skeleton Loading Cards */
.card.skeleton {
  pointer-events: none;
}
.card.skeleton .card-poster-wrap {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-2) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skel-line {
  height: 14px;
  background: var(--bg-surface-2);
  border-radius: 6px;
}
.skel-line.short {
  width: 50%;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------------- 9. GRID LAYOUTS (WATCHLIST & SEARCH) ---------------- */
.watchlist-section,
.search-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 36px 80px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 28px;
  margin-top: 24px;
}
.grid .card {
  width: 100%;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 14px;
}
.empty-emoji {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

/* ---------------- 10. FILM DETALI SAHIFASI (SPA) ---------------- */
.hidden {
  display: none !important;
}

.movie-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 24px 80px;
  animation: fadeIn 0.4s var(--ease-out);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-loading {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-dim);
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.movie-detail-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.movie-detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.detail-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 32px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  background: var(--bg-surface);
}
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(25px) brightness(0.35);
  transform: scale(1.2);
}
.detail-hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 17, 0.3) 0%, var(--bg-surface) 100%);
}
.detail-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  width: 100%;
}
.detail-poster {
  width: 140px;
  aspect-ratio: 2/3;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  flex: none;
}
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-titles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-titles h1 {
  font-family: "Outfit", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
}
.detail-subtitle {
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* Rating Circle SVG */
.rating-ring-wrap {
  flex: none;
}
.rating-ring circle {
  fill: none;
  stroke-width: 5;
}
.rating-ring .track {
  stroke: rgba(255, 255, 255, 0.1);
}
.rating-ring .value {
  stroke: url(#ratingGrad);
  stroke-dasharray: 163;
  stroke-dashoffset: 163;
  transition: stroke-dashoffset 1.2s var(--ease-out);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.detail-body-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 4px;
}
.detail-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge {
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
}
.badge.rating {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
}
.badge.gradient {
  background: var(--gradient-brand);
  border: none;
  color: #ffffff;
}

.detail-section h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text-main);
}
.detail-plot {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.video-missing {
  padding: 24px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* ============================================================
   CUSTOM VIDEO PLAYER
   ============================================================ */
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  outline: none;
  user-select: none;
}
.player:fullscreen,
.player:-webkit-full-screen,
.player.is-fullscreen,
.player.is-fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  aspect-ratio: unset !important;
  z-index: 999999 !important;
  background: #000 !important;
}

.player-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

/* Loading spinner */
.player-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.player-loading.show { opacity: 1; }
.player-spinner {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--violet);
  animation: playerSpin 0.8s linear infinite;
}
@keyframes playerSpin { to { transform: rotate(360deg); } }

/* Top title fade */
.player-top-fade {
  position: absolute; top: 0; left: 0; right: 0; height: 90px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.player-title-bar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 16px 20px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.player-movie-title {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.player:not(.controls-hidden) .player-top-fade,
.player:not(.controls-hidden) .player-title-bar {
  opacity: 1;
  transform: translateY(0);
}

/* Center play/pause button */
.player-center-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 66px; height: 66px;
  border-radius: 50%;
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring), background 0.2s ease;
}
.player-center-btn svg { margin-left: 2px; }
.player-center-btn .ic-pause { margin-left: 0; }
.player:not(.controls-hidden):not(.is-loading) .player-center-btn,
.player:hover:not(.is-loading) .player-center-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.player-center-btn:hover { background: rgba(139, 92, 246, 0.5); transform: translate(-50%, -50%) scale(1.08); }
.player.is-fullscreen .player-center-btn { width: 84px; height: 84px; }
.player.is-loading .player-center-btn { opacity: 0; pointer-events: none; }

/* Skip +-10s flash effect */
.player-skip {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 90px; height: 90px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: #fff;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.player-skip-back { left: 6%; }
.player-skip-fwd { right: 6%; }
.player-skip.fx { animation: skipFlash 0.6s ease; }
@keyframes skipFlash {
  0% { opacity: 0; transform: translateY(-50%) scale(0.7); }
  30% { opacity: 1; transform: translateY(-50%) scale(1); }
  100% { opacity: 0; transform: translateY(-50%) scale(1.15); }
}

/* Controls bar */
.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82) 55%, rgba(0, 0, 0, 0.9));
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.player.controls-hidden .player-controls { opacity: 0; transform: translateY(8px); pointer-events: none; }
.player.controls-hidden { cursor: none; }

/* Progress bar */
.player-progress {
  position: relative;
  padding: 10px 0 6px;
  cursor: pointer;
  touch-action: none;
}
.player-progress-track {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  transition: height 0.15s ease;
  overflow: visible;
}
.player-progress:hover .player-progress-track { height: 6px; }
.player-progress-buffered {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}
.player-progress-played {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  border-radius: 4px;
}
.player-progress-handle {
  position: absolute; top: 50%; left: 0%;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
}
.player-progress:hover .player-progress-handle { transform: translate(-50%, -50%) scale(1); }
.player-hover-time {
  position: absolute;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: rgba(10, 10, 18, 0.9);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
}

/* Controls row */
.player-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.player-controls-left, .player-controls-right { display: flex; align-items: center; gap: 4px; }

.player-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  transition: background 0.2s ease, transform 0.15s ease;
  flex: none;
}
.player-btn:hover { background: rgba(255, 255, 255, 0.12); transform: scale(1.08); }
.player-btn svg { display: block; }
.player-btn .hidden { display: none; }

.player-time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 2px;
}
.player-volume-slider {
  width: 0;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.25s ease, margin 0.25s ease;
  accent-color: var(--violet);
  height: 4px;
  cursor: pointer;
}
.player-volume:hover .player-volume-slider,
.player-volume:focus-within .player-volume-slider {
  width: 70px;
  opacity: 1;
  margin-left: 4px;
}

.player-speed-wrap { position: relative; }
.player-speed-btn {
  width: auto;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.player-speed-menu {
  position: absolute;
  bottom: 42px;
  right: 0;
  background: rgba(15, 16, 28, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
  box-shadow: var(--shadow-lg);
  z-index: 5;
}
.player-speed-menu button {
  padding: 7px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.82rem;
  text-align: left;
  transition: background 0.15s ease;
}
.player-speed-menu button:hover { background: rgba(255, 255, 255, 0.1); }
.player-speed-menu button.active { color: var(--violet); font-weight: 700; }

@media (max-width: 600px) {
  .player-controls { padding: 8px 10px 10px; }
  .player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 0;
    flex-wrap: nowrap;
  }
  .player-controls-left, .player-controls-right {
    gap: 2px;
    flex-wrap: nowrap;
  }
  .player-btn { width: 30px; height: 30px; }
  .player-time {
    font-size: 0.7rem;
    margin-left: 2px;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .player-volume-slider { display: none !important; }
  .player-speed-btn { padding: 0 6px; font-size: 0.72rem; }
  .player-skip { width: 64px; height: 64px; font-size: 0.85rem; }
  .player-center-btn { width: 54px; height: 54px; }
  .player-title-bar { padding: 10px 12px; }
  .player-movie-title { font-size: 0.82rem; }
  .player-speed-menu { bottom: 38px; right: -10px; min-width: 75px; }
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.people-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.people-card b {
  font-size: 0.85rem;
  color: var(--cyan);
}
.people-card span {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* ---------------- 11. TOAST NOTIFICATIONS ---------------- */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: toastIn 0.4s var(--ease-spring), toastOut 0.4s var(--ease-out) 3.5s forwards;
  pointer-events: auto;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* Floating Back-To-Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 2000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s var(--ease-spring);
  opacity: 1;
  transform: scale(1);
}
.back-to-top-btn.hidden {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}
.back-to-top-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  transform: translateY(-3px) scale(1.08);
}

/* ---------------- 12. FOOTER ---------------- */
.footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-alt);
  padding: 60px 36px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 350px;
}
.footer-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}
.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------------- 13. RESPONSIVE BREAKPOINTS ---------------- */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.8rem; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
  .card { width: 100%; }
  .movie-section { padding: 90px 20px 60px; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 14px; gap: 8px; }
  .search-wrap { width: 140px; padding: 7px 10px; }
  .search-wrap:focus-within { width: 175px; }
  .hero { padding: 100px 16px 40px; min-height: auto; }
  .hero-title { font-size: 2rem; }
  .hero-actions { width: 100%; gap: 8px; }
  .hero-actions .btn { flex: 1; min-width: 120px; padding: 12px 14px; font-size: 0.88rem; }
  .nav-inner .btn { width: auto; }
  .rows-container, .genre-section, .watchlist-section, .search-section, .movie-section { padding: 20px 14px; }
  .section-head { flex-wrap: wrap; gap: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
  .card { width: 100%; }
  .detail-hero { padding: 20px; min-height: auto; border-radius: 18px; }
  .detail-hero-content { flex-direction: column; align-items: flex-start; gap: 14px; }
  .detail-poster { width: 95px; border-radius: 12px; }
  .detail-titles h1 { font-size: 1.45rem; }
  .detail-subtitle { font-size: 0.82rem; }
  .people-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
  .people-card { padding: 10px 12px; }
}

@media (max-width: 400px) {
  .nav-inner { padding: 0 10px; gap: 6px; }
  .search-wrap { width: 120px; }
  .search-wrap:focus-within { width: 150px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-title { font-size: 1.65rem; }
  .brand-text { font-size: 1rem; }
}

/* ---------------- MODAL OVERLAY & FIXED BACKDROP DIALOG ---------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 8, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-smooth), visibility 0.35s var(--ease-smooth);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal {
  position: relative;
  width: 100%;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s var(--ease-smooth);
}

.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.1) rotate(90deg);
}

/* ---------------- 14. SECURE PLAYER & WATERMARK STYLES ---------------- */
.player-modal {
  position: relative;
  width: 100%;
  max-width: 1000px;
  background: #000000;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#secureVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

/* Floating Watermark */
.video-watermark {
  position: absolute;
  top: 25%;
  left: 30%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  user-select: none;
  font-family: "Outfit", sans-serif;
  letter-spacing: 1px;
  transition: all 1.2s var(--ease-smooth);
}

.wm-brand {
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.8;
}

.wm-user {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------------- 15. PROFILE & SUBSCRIPTION MODAL STYLES ---------------- */
.profile-modal {
  max-width: 650px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
}

.profile-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-glow);
}

.profile-user-info h2 {
  font-family: "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.profile-plan-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  letter-spacing: 0.5px;
}

.profile-section-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.profile-section-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.sub-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.sub-plan-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}

.sub-plan-card.featured {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.plan-badge-top {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--gradient-brand);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.sub-plan-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-title {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.plan-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cyan);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.plan-features li {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.plan-btn {
  width: 100%;
}

.mobile-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  flex: none;
  transition: all 0.25s ease;
}

.btn-text-mobile {
  display: none;
}

/* ============================================================
   16. TELEGRAM WEBAPP & MOBILE RESPONSIVE OPTIMIZATIONS
   ============================================================ */
body.tg-webapp {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.tg-webapp .navbar {
  top: env(safe-area-inset-top, 0px);
}

@media (max-width: 768px) {
  .btn-text-desktop {
    display: none;
  }
  .btn-text-mobile {
    display: inline;
  }

  /* Navbar adjustments */
  .navbar {
    padding: 10px 0;
  }
  .nav-inner {
    padding: 0 12px;
    gap: 8px;
  }
  .brand {
    font-size: 1.15rem;
    gap: 6px;
  }
  .brand-icon {
    font-size: 1.3rem;
  }
  .nav-links {
    display: none !important;
  }
  .nav-actions {
    gap: 8px;
    flex: none;
  }
  .mobile-search-btn {
    display: flex;
  }
  .search-box-container {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    max-width: none;
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s var(--ease-out);
    pointer-events: none;
  }
  .search-box-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .search-wrap {
    width: 100% !important;
    background: rgba(14, 17, 36, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-strong) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), var(--shadow-glow) !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
  }
  .search-wrap input {
    font-size: 0.9rem !important;
  }
  .search-kbd {
    display: none !important;
  }
  .menu-toggle {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    padding: 0;
    flex: none;
  }

  /* Hero adjustments for Telegram Mini App compact layout */
  .hero {
    min-height: auto;
    padding: 60px 10px 15px !important;
    gap: 12px !important;
  }
  .hero-banner-card {
    aspect-ratio: 16/9 !important;
    max-height: 220px !important;
    border-radius: 16px !important;
  }
  .hero-arrow-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  .hero-dots-banner {
    bottom: 8px;
    padding: 3px 8px;
    gap: 4px;
  }
  .hero-details-block {
    padding: 0 4px;
    gap: 8px;
  }
  .hero-badge {
    padding: 3px 8px;
    font-size: 0.65rem;
    letter-spacing: 0.4px;
  }
  .hero-title {
    font-size: clamp(1.2rem, 5vw, 1.7rem) !important;
    line-height: 1.15;
    letter-spacing: -0.3px;
  }
  .hero-meta {
    gap: 5px;
  }
  .pill {
    padding: 2px 7px;
    font-size: 0.72rem;
    border-radius: 6px;
  }
  .hero-plot {
    display: none !important; /* Hide long synopsis on mobile hero to bring buttons & rows immediately into view */
  }
  .hero-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
  }
  #heroPlayBtn {
    flex: 1.2;
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    justify-content: center !important;
  }
  #heroWatchlistBtn {
    flex: 1;
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    justify-content: center !important;
  }
  #heroRandomBtn {
    display: none !important; /* Accessible via mobile drawer */
  }
  .hero-controls {
    margin-top: 8px;
  }
  .hero-scroll-hint {
    display: none !important;
  }

  /* Movie Cards & Grid adjustments */
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 10px !important;
  }
  .card-title {
    font-size: 0.82rem;
  }
  .card-year {
    font-size: 0.7rem;
  }
  .section-head {
    padding: 0 12px;
  }
  .row-title {
    font-size: 1rem;
  }
  .genre-bar {
    padding: 0 12px;
  }
  .genre-chip {
    padding: 5px 12px;
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .brand-text {
    font-size: 0.98rem;
  }
  #heroPlayBtn, #heroWatchlistBtn {
    padding: 9px 6px !important;
    font-size: 0.76rem !important;
  }
}

/* ---------------- 17. MOBILE BOTTOM NAVIGATION BAR FOR TELEGRAM MINI APP ---------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  background: rgba(14, 17, 36, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border-light);
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-dim);
  font-size: 0.65rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: all 0.22s ease;
}

.bottom-nav-item svg {
  transition: transform 0.22s var(--ease-out), color 0.22s ease;
}

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

.bottom-nav-item.active svg {
  color: var(--cyan);
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.5));
}

@media (max-width: 768px) {
  body {
    padding-bottom: 64px;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  #backToTopBtn {
    bottom: 74px;
  }
}
