/* ==========================================================================
   PHIMMOIHAY - 4-PILLAR CONTENT QUAD PLATFORM
   PHIM HD • TRUYỆN TRANH • CỖ MÁY THỜI GIAN • KHÁM PHÁ & CHILL
   Font Stack: 'Inter' & 'Plus Jakarta Sans' (Chuẩn PhimMoiChill.win)
   ========================================================================== */

:root {
  --primary: #e50914;
  --primary-hover: #ff1e27;
  --primary-glow: rgba(229, 9, 20, 0.45);
  --shopee-orange: #ee4d2d;
  --shopee-glow: rgba(238, 77, 45, 0.45);
  --chill-emerald: #10b981;
  --bg-dark: #07090e;
  --card-dark: #0f131c;
  --border-subtle: rgba(255, 255, 255, 0.08);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: #f8fafc;
  letter-spacing: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.35;
  font-weight: 800;
}

#hero-title {
  font-family: 'Be Vietnam Pro', 'Inter', sans-serif !important;
  font-weight: 800 !important;
  line-height: 1.36 !important;
  letter-spacing: -0.01em !important;
}

.text-gradient-red {
  background: linear-gradient(135deg, #ff4b55 0%, #e50914 50%, #b30710 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-shopee {
  background: linear-gradient(135deg, #ff7337 0%, #ee4d2d 50%, #d0011b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-manga {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-timeline {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-chill {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #07090e;
}
::-webkit-scrollbar-thumb {
  background: #1e2533;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #e50914;
}

.aspect-poster {
  aspect-ratio: 2 / 3;
}
.aspect-video-player {
  aspect-ratio: 16 / 9;
}

.glass-panel {
  background: rgba(15, 19, 28, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass-nav {
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* ==========================================================================
   FULL-BLEED CINEMA HERO BANNER
   ========================================================================== */

.hero-fullbleed-wrapper {
  position: relative;
  width: 100%;
  min-height: 500px;
  overflow: hidden;
  background-color: #07090e;
}

@media (min-width: 768px) {
  .hero-fullbleed-wrapper {
    min-height: 600px;
  }
}

@media (min-width: 1280px) {
  .hero-fullbleed-wrapper {
    min-height: 680px;
  }
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 6s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(1);
}

.hero-bg-layer.zooming {
  transform: scale(1.05);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, #07090e 0%, rgba(7,9,14,0.96) 28%, rgba(7,9,14,0.7) 55%, rgba(7,9,14,0.2) 85%, #07090e 100%),
    linear-gradient(0deg, #07090e 0%, rgba(7,9,14,0.92) 18%, transparent 60%),
    linear-gradient(180deg, rgba(7,9,14,0.6) 0%, transparent 35%);
  pointer-events: none;
}

.hero-text-anim {
  animation: heroSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-thumbs-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px;
  scrollbar-width: none;
}
.hero-thumbs-wrapper::-webkit-scrollbar {
  display: none;
}

.hero-thumb-card {
  position: relative;
  width: 84px;
  height: 52px;
  border-radius: 10px;
  overflow: visible;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: #0f131c;
}

@media (min-width: 768px) {
  .hero-thumb-card {
    width: 106px;
    height: 64px;
    border-radius: 12px;
  }
}

.hero-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.4s ease;
}

.hero-thumb-card:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.85);
}

.hero-thumb-card.active {
  border-color: #e50914 !important;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.85), 0 4px 15px rgba(0, 0, 0, 0.8);
  transform: translateY(-2px) scale(1.06);
}

.hero-thumb-progress-bar {
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff4b55, #e50914);
  border-radius: 9999px;
  box-shadow: 0 0 8px #e50914;
  width: 0%;
}

.hero-thumb-card.active .hero-thumb-progress-bar {
  animation: heroTimerFill 6s linear forwards;
}

@keyframes heroTimerFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

.hero-thumb-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 30;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
}

.hero-thumb-card:hover .hero-thumb-tooltip,
.hero-thumb-card.active .hero-thumb-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}

.movie-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(229, 9, 20, 0.25);
  border-color: rgba(229, 9, 20, 0.4);
}

.btn-red-glow {
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: all 0.25s ease;
}
.btn-red-glow:hover {
  box-shadow: 0 8px 30px rgba(229, 9, 20, 0.7);
  transform: translateY(-2px);
}

/* ==========================================================================
   WEBTOON & MANGA READER SYSTEM
   ========================================================================== */

.webtoon-container {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  background: #07090e;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}

.webtoon-page-img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

/* ==========================================================================
   4-PILLAR MODE SWITCHER TABS & BADGES
   ========================================================================== */

.mode-toggle-btn {
  padding: 4px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .mode-toggle-btn {
    font-size: 12px;
    padding: 4.5px 18px;
  }
}

.mode-toggle-btn.active-movies {
  background: linear-gradient(135deg, #ff1a26, #c4000b);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(229, 9, 20, 0.5);
}

.mode-toggle-btn.active-manga {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(2, 132, 199, 0.5);
}

.mode-toggle-btn.active-timeline {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.5);
}

.mode-toggle-btn.active-chill {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5);
}

.mode-toggle-btn.inactive {
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.mode-toggle-btn.inactive:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Badges */
.badge-era-past {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.9), rgba(180, 83, 9, 0.9));
  color: #fff;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-era-present {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.9), rgba(179, 7, 16, 0.9));
  color: #fff;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-era-future {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(99, 102, 241, 0.9));
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.badge-chill {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
  color: #fff;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* ==========================================================================
   THEATER LIGHTS-OFF MODE
   ========================================================================== */

#theater-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#theater-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.theater-highlight {
  position: relative;
  z-index: 45 !important;
  box-shadow: 0 0 50px rgba(229, 9, 20, 0.45), 0 0 120px rgba(0, 0, 0, 0.95) !important;
}

body.theater-mode-on header {
  opacity: 0.2;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ==========================================================================
   SHOPEE LOCK V5.0 OVERLAY & GLOWING BUTTON SYSTEM
   ========================================================================== */

.shopee-lock-card {
  background: linear-gradient(135deg, rgba(20, 15, 18, 0.95) 0%, rgba(30, 16, 16, 0.92) 100%);
  border: 1.5px solid rgba(238, 77, 45, 0.35);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(238, 77, 45, 0.15), 0 0 20px rgba(0, 0, 0, 0.8);
}

.shopee-lock-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ee4d2d, #ff7337, #ff9900, #ff7337, #ee4d2d);
  background-size: 300% 100%;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-shopee-pulse {
  background: linear-gradient(135deg, #ee4d2d 0%, #ff522b 50%, #d0011b 100%);
  box-shadow: 0 8px 25px rgba(238, 77, 45, 0.45);
  position: relative;
  overflow: hidden;
  animation: pulseShopeeBtn 2.2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  transition: all 0.3s ease;
}

.btn-shopee-pulse:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 32px rgba(238, 77, 45, 0.7);
}

.btn-shopee-pulse::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  animation: shimmerSweep 3s infinite;
}

@keyframes shimmerSweep {
  0% { left: -60%; }
  30%, 100% { left: 140%; }
}

@keyframes pulseShopeeBtn {
  0% { box-shadow: 0 0 0 0 rgba(238, 77, 45, 0.6), 0 8px 25px rgba(238, 77, 45, 0.35); }
  70% { box-shadow: 0 0 0 12px rgba(238, 77, 45, 0), 0 10px 28px rgba(238, 77, 45, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(238, 77, 45, 0), 0 8px 25px rgba(238, 77, 45, 0.35); }
}

.bounce-finger {
  display: inline-block;
  animation: bounceDown 1.5s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.ep-btn-active {
  background: linear-gradient(135deg, #e50914 0%, #b30710 100%) !important;
  color: #ffffff !important;
  border-color: #ff4b55 !important;
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.55);
  font-weight: 700;
}

.server-btn-active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
  font-weight: 700;
}

/* ==========================================================================
   MOBILE APP DOCK
   ========================================================================== */

.mobile-app-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 9.5px;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s ease;
  padding: 3px 4px;
  border-radius: 8px;
}

.dock-item.active, .dock-item:hover {
  color: #f8fafc;
}

.dock-item.active svg {
  color: #e50914;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ==========================================================================
   CINEMA FOOTER & SOVEREIGNTY BADGE
   ========================================================================== */

.sovereign-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e102d 0%, #7c2d12 40%, #c2410c 100%);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 4px 20px rgba(194, 65, 12, 0.35);
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
}

.sovereign-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(234, 88, 12, 0.5);
  border-color: rgba(253, 186, 116, 0.6);
}

.sovereign-star {
  width: 15px;
  height: 15px;
  background: #eab308;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  display: inline-block;
  animation: starPulse 2.5s infinite ease-in-out;
}

@keyframes starPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #fde047); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 6px #facc15); }
}

.social-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: #111520;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.social-circle-btn:hover {
  background: #e50914;
  color: #ffffff;
  border-color: #ff4b55;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.45);
}

.footer-nav-link {
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.footer-nav-link:hover {
  color: #ffffff;
}


/* Hero Thumbnail Gallery - Compact Cards */
.hero-thumb-btn {
  flex-shrink: 0;
  width: 72px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.6;
  cursor: pointer;
}
.hero-thumb-btn:hover { opacity: 1; border-color: rgba(255,255,255,0.3); }
.hero-thumb-btn.active { opacity: 1; border-color: #ef4444; box-shadow: 0 4px 12px rgba(239,68,68,0.3); transform: scale(1.05); }
.hero-thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 1280px) {
  .hero-thumb-btn { width: 84px; height: 52px; }
}

/* ==========================================================================
   WEBTOON / MANGA READER (VERTICAL 60FPS SCROLL)
   ========================================================================== */
.webtoon-container {
  max-width: 820px;
  margin: 0 auto;
  background-color: #0b0e14;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.webtoon-page-img {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background-color: #0b0e14;
}

