/* ==========================================================================
   DRAMIX.TV CLONE - CORE DESIGN SYSTEM & STYLES
   ========================================================================== */

@import url('https://fonts.cdnfonts.com/css/sf-pro-display');

:root {
  --bg-main: #0a0a10;
  --bg-surface: #12121e;
  --bg-surface-elevated: #1a1a2b;
  --bg-card: rgba(26, 26, 43, 0.7);
  --bg-glass: rgba(18, 18, 30, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.4);
  --border-glow: rgba(139, 92, 246, 0.6);

  --accent-primary: #8b5cf6;
  --accent-secondary: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  --accent-glow: 0 0 25px rgba(139, 92, 246, 0.35);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --badge-bg: rgba(139, 92, 246, 0.15);
  --badge-border: rgba(139, 92, 246, 0.3);
  --badge-text: #c4b5fd;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-heading: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'SF Pro', 'San Francisco', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'SF Pro', 'San Francisco', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #27273a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Container */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--badge-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search Bar in Header */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  width: 240px;
  transition: var(--transition-fast);
}

.search-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: #fff;
}

.search-kbd {
  margin-left: auto;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
}

.icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   HERO BANNER SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius-lg);
  margin-top: 24px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background-color: #161626;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(10, 10, 16, 0.98) 0%,
    rgba(10, 10, 16, 0.8) 40%,
    rgba(10, 10, 16, 0.2) 100%
  ),
  radial-gradient(circle at top right, rgba(139, 92, 246, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 750px;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-featured {
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  color: #fff;
}

.badge-provider {
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
}

.badge-episodes {
  background: rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Primary and Secondary Buttons */
.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--border-hover);
}

.btn-secondary.btn-fav-active {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.6);
  color: #c4b5fd;
}

.btn-secondary.btn-fav-active:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   PROVIDER & CATEGORY CHIPS / TABS
   ========================================================================== */
.chips-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 24px 0 12px;
  scrollbar-width: none;
}
.chips-scroll::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-btn:hover {
  background: var(--bg-surface-elevated);
  color: #fff;
  border-color: var(--border-hover);
}

.chip-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   SECTION & DRAMA CARDS GRID
   ========================================================================== */
.section {
  padding: 32px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  font-size: 1.4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.section-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.view-all-link {
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.view-all-link:hover {
  color: #a78bfa;
  transform: translateX(3px);
}

/* Grid of Cards */
.dramas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

@media (min-width: 1200px) {
  .dramas-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Drama Card */
.drama-card {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.drama-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.2);
}

.drama-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.4;
  overflow: hidden;
  background: #181828;
}

.drama-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.drama-card:hover .drama-poster {
  transform: scale(1.06);
}

.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.1) 0%,
    transparent 50%,
    rgba(10, 10, 16, 0.95) 100%
  );
}

.play-hover-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.play-hover-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 2px;
}

.drama-card:hover .play-hover-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-tag.dubbed {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
}

.badge-tag.provider {
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
}

/* Distinct color palettes per provider/category */
.provider-dramanova, [data-provider="dramanova"] {
  background: rgba(245, 158, 11, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.provider-reelshort, [data-provider="reelshort"] {
  background: rgba(168, 85, 247, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(192, 132, 252, 0.6) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.provider-dramabox, [data-provider="dramabox"] {
  background: rgba(14, 165, 233, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
}

.provider-flextv, [data-provider="flextv"] {
  background: rgba(16, 185, 129, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.provider-melolo, [data-provider="melolo"] {
  background: rgba(244, 63, 94, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(251, 113, 133, 0.6) !important;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

.provider-freereels, [data-provider="freereels"] {
  background: rgba(239, 68, 68, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(248, 113, 113, 0.6) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.provider-shortmax, [data-provider="shortmax"] {
  background: rgba(99, 102, 241, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(129, 140, 248, 0.6) !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.provider-happyshort, [data-provider="happyshort"] {
  background: rgba(202, 138, 4, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(234, 179, 8, 0.6) !important;
  box-shadow: 0 0 10px rgba(202, 138, 4, 0.3);
}

.provider-goodshort, [data-provider="goodshort"] {
  background: rgba(13, 148, 136, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(45, 212, 191, 0.6) !important;
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.3);
}

.provider-bilitv, [data-provider="bilitv"] {
  background: rgba(37, 99, 235, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(96, 165, 250, 0.6) !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.card-episodes {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #e4e4e7;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.drama-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.drama-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.drama-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Skeleton Loading Cards */
.skeleton-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  aspect-ratio: 3 / 4.4;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

/* ==========================================================================
   SEARCH MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), var(--accent-glow);
  overflow: hidden;
  transform: translateY(-20px) scale(0.96);
  transition: var(--transition-normal);
}

.modal-overlay.active .search-modal-container {
  transform: translateY(0) scale(1);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 14px;
}

.search-input-wrap svg {
  color: var(--accent-primary);
  width: 22px;
  height: 22px;
}

.search-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.1rem;
  outline: none;
}

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

.search-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.search-close-btn:hover {
  color: #fff;
}

.search-results-list {
  padding: 12px;
  overflow-y: auto;
  max-height: 55vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: var(--bg-surface-elevated);
}

.search-thumb {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: #202030;
}

.search-info {
  flex-grow: 1;
}

.search-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.search-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   LEGAL / INFORMATION MODAL
   ========================================================================== */
.legal-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  transform: translateY(-20px) scale(0.96);
  transition: var(--transition-normal);
}

.modal-overlay.active .legal-modal-container {
  transform: translateY(0) scale(1);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.legal-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-header-title h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.legal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.legal-tabs-bar::-webkit-scrollbar {
  display: none;
}

.legal-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.legal-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
}

.legal-tab-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

.legal-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #d1d1db;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-callout {
  background: rgba(139, 92, 246, 0.1);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: #e4e4e7;
}

.legal-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-list li {
  color: var(--text-secondary);
}

.legal-list li strong {
  color: #fff;
}

/* ==========================================================================
   DRAMA DETAILS MODAL
   ========================================================================== */
.detail-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  position: relative;
}

.detail-banner {
  position: relative;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.detail-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 18, 30, 0.2) 0%, var(--bg-surface) 100%);
}

.detail-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.detail-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.detail-body {
  padding: 0 32px 32px;
  position: relative;
  z-index: 2;
}

.detail-header-info {
  display: flex;
  gap: 24px;
  margin-top: -60px;
  margin-bottom: 24px;
}

.detail-poster-img {
  width: 140px;
  aspect-ratio: 3/4.4;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: #202030;
}

.detail-text-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.detail-synopsis {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.episodes-section-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.ep-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.ep-btn:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.ep-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

.ep-btn.completed {
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

/* ==========================================================================
   VERTICAL VIDEO PLAYER (DRAMIX STYLE)
   ========================================================================== */
.player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.player-modal.active {
  opacity: 1;
  visibility: visible;
}

.player-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 100vh;
  background: #06060c;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

@media (min-width: 768px) {
  .player-container {
    height: 92vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
  }
}

.video-wrapper {
  position: relative;
  width: 100%;
  flex-grow: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

/* Video Player Header Overlay */
.player-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  transition: opacity 0.3s ease;
}

.player-header-info {
  display: flex;
  flex-direction: column;
}

.player-drama-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-ep-badge {
  font-size: 0.8rem;
  color: #c4b5fd;
  font-weight: 600;
}

.player-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-icon-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.player-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Loading Overlay */
.player-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 15;
  color: #fff;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Player Center Play/Pause Large Action */
.player-center-action {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 12;
}

.player-center-action.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.player-center-action svg {
  width: 36px;
  height: 36px;
  fill: #fff;
}

/* Video Controls Bottom Overlay */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
  transition: opacity 0.3s ease;
}

.timeline-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-display {
  font-size: 0.75rem;
  color: #d4d4d8;
  font-family: monospace;
  min-width: 80px;
}

.progress-bar-wrap {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  width: 0%;
  position: relative;
}

.progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speed-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.speed-select option {
  background: #181828;
  color: #fff;
}

/* Episodes Drawer in Player */
.player-episodes-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 60%;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-hover);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px;
  z-index: 30;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.player-episodes-drawer.active {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 360px;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.footer-link:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  .search-trigger {
    width: 180px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-content {
    height: 60px;
  }
  .search-trigger {
    width: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .search-trigger span, .search-kbd {
    display: none;
  }
  .hero-section {
    min-height: 380px;
    margin-top: 12px;
  }
  .hero-content {
    padding: 24px;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .dramas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .detail-header-info {
    flex-direction: column;
    margin-top: -30px;
  }
  .detail-poster-img {
    width: 100px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TOAST NOTIFICATION POPUP (MODERN NOTIFIER)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.toast {
  background: rgba(18, 18, 30, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.2);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: auto;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 280px;
  max-width: 400px;
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.toast-remove .toast-icon-wrap {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
}

.toast-message {
  line-height: 1.4;
  color: #f4f4f5;
  font-size: 0.9rem;
}

.toast-message strong {
  color: #fff;
  font-weight: 600;
}

@media (max-width: 640px) {
  .toast-container {
    bottom: 20px;
    left: 20px;
    right: 20px;
    align-items: center;
  }
  .toast {
    width: 100%;
    min-width: auto;
  }
}
