/* =============================================
   MELODIARIS BITE - Premium Dark Drama Streaming CSS
   ============================================= */

/* CSS Variables / Design Tokens */
:root {
  --bg-primary: #06060c;
  --bg-secondary: #0b0c16;
  --bg-card: rgba(18, 19, 30, 0.4);
  --bg-card-hover: rgba(28, 30, 45, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  --accent-primary: #00f0ff;
  --accent-secondary: #7000ff;
  --accent-tertiary: #ff0055;
  --accent-gold: #ffd700;

  --gradient-primary: linear-gradient(135deg, #00f0ff 0%, #7000ff 100%);
  --gradient-secondary: linear-gradient(135deg, #ff0055 0%, #7000ff 100%);
  --gradient-accent: linear-gradient(90deg, #00f0ff 0%, #ff0055 100%);
  --gradient-card: linear-gradient(180deg, transparent 30%, rgba(6, 6, 12, 0.95) 100%);
  --gradient-hero: linear-gradient(90deg, rgba(6, 6, 12, 0.95) 0%, rgba(6, 6, 12, 0.6) 50%, transparent 100%);
  --gradient-glow: radial-gradient(circle at top right, rgba(0, 240, 255, 0.15) 0%, transparent 60%);

  --text-primary: #ffffff;
  --text-secondary: #b4b6c5;
  --text-muted: #727586;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-accent: rgba(0, 240, 255, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(0, 240, 255, 0.25);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.9);

  --nav-height: 76px;
  --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.98) 0%, rgba(10, 10, 15, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  /* Gap diperkecil agar logo geser kekiri */
  padding: 0 12px;
  /* Padding tepi diperkecil agar lebih mepet */
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-logo:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.logo-icon {
  font-size: 24px;
}

/* Logo gambar di navbar */
.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.5));
  transition: all 0.3s ease;
  animation: logoPulse 4s infinite ease-in-out;
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.5));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(212, 160, 23, 0.8));
  }
}


.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 12px rgba(212, 160, 23, 0.9));
}

/* Logo gambar di footer */
.footer-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(212, 160, 23, 0.4));
  animation: logoPulse 4s infinite ease-in-out 1s;
  /* delay offset sedikit */
}


.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-accent {
  color: var(--accent-primary);
}

.nav-search-wrapper {
  flex: 1;
  max-width: 600px;
  /* Diperlebar dari 420px */
  position: relative;
  z-index: 100;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  padding: 10px 18px;
  transition: var(--transition);
}

.nav-search:focus-within {
  border-color: var(--accent-primary);
  background: var(--bg-glass-hover);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}

.search-icon {
  font-size: 15px;
  opacity: 0.6;
  flex-shrink: 0;
}

.nav-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  width: 100%;
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: none;
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}

.search-dropdown.active {
  display: block;
  animation: fadeSlideDown 0.2s ease;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.search-item:hover {
  background: var(--bg-glass-hover);
}

.search-item img {
  width: 40px;
  height: 55px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.search-item-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 50px;
  transition: var(--transition);
}

.nav-btn:hover,
.nav-btn.active {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.vip-btn {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 50px;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.vip-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(233, 30, 140, 0.4);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border-subtle);
  gap: 4px;
}

.mobile-menu button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: var(--transition);
}

.mobile-menu button:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.mobile-menu.open {
  display: flex;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 1;
}

.hero-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(transparent, var(--bg-primary));
}

.hero-content {
  position: absolute;
  bottom: 120px;
  left: 60px;
  z-index: 2;
  max-width: 550px;
  animation: fadeSlideUp 0.5s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-glow);
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-play {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-play::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-play:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 40px rgba(0, 240, 255, 0.4), 0 0 30px rgba(112, 0, 255, 0.3);
  letter-spacing: 0.3px;
}

.btn-play:hover::before {
  opacity: 1;
}

.btn-play:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.btn-detail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-detail:hover {
  background: rgba(255, 255, 255, 0.20);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.btn-detail:hover::before {
  opacity: 1;
}

.btn-detail:active {
  transform: translateY(-1px) scale(1.01);
}

.hero-dots {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.hero-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--accent-primary);
}

.hero-prev,
.hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-prev:hover,
.hero-next:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

/* =============================================
   CONTENT SECTIONS
   ============================================= */
.content-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-accent {
  font-size: 20px;
}

.section-badge {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
}

/* =============================================
   DRAMA GRID
   ============================================= */
.drama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 18px;
}

.drama-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-subtle);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 1;
  isolation: isolate;
}

.drama-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 2;
}


.drama-card:hover {
  transform: translateY(-8px) scale(1.035);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-accent);
  z-index: 2;
}

.drama-card:hover::after {
  opacity: 1;
}

.drama-card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.drama-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.drama-card:hover .drama-card-poster img {
  transform: scale(1.1);
}

.drama-card-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}

.drama-card:hover .drama-card-overlay {
  opacity: 1;
}

.card-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
}

.card-play-btn:hover {
  transform: scale(1.05);
}

.drama-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drama-card-eps-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
}

.drama-card-info {
  padding: 12px 12px 14px;
}

.drama-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.drama-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =============================================
   DETAIL PAGE
   ============================================= */
.detail-hero {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.4);
  transform: scale(1.1);
}

.detail-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 40px 40px;
  gap: 32px;
  background: linear-gradient(transparent 10%, rgba(6, 6, 12, 0.85) 60%, var(--bg-primary) 100%);
  padding-top: var(--nav-height);
}

.detail-poster {
  width: 180px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-poster a {
  display: block;
  width: 180px;
  height: 245px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
}

.detail-poster a:hover {
  transform: scale(1.03);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 240, 255, 0.2);
  border-color: rgba(0, 240, 255, 0.3);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: high-quality;
  display: block;
}

.poster-actions {
  display: flex;
  justify-content: center;
}

.btn-cover-hd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  width: 100%;
  justify-content: center;
}

.btn-cover-hd:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-cover-hd:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ─── Poster clickable wrap ─────────────────────────────── */
.poster-img-wrap {
  position: relative;
  width: 180px;
  height: 245px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poster-img-wrap:hover {
  transform: scale(1.03);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 240, 255, 0.2);
  border-color: rgba(0, 240, 255, 0.3);
}

.poster-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-img-wrap:hover .poster-zoom-hint {
  opacity: 1;
}

.poster-zoom-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 10px 0 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* ─── Lightbox Modal ─────────────────────────────────────── */
.cover-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cover-lightbox.open {
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 90vw;
  max-height: 95vh;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cover-lightbox.open .lightbox-container {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 80, 80, 0.5);
}

.lightbox-img-wrap {
  position: relative;
  max-width: 80vw;
  max-height: 75vh;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 200px;
}

.lightbox-img {
  max-width: 80vw;
  max-height: 75vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  image-rendering: high-quality;
}

.lightbox-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.lightbox-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 20px;
  border-radius: 30px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox-title {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .lightbox-img {
    max-width: 95vw;
    max-height: 60vh;
  }

  .lightbox-footer {
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }

  .lightbox-title {
    max-width: 200px;
  }
}

.detail-info {
  flex: 1;
  min-width: 0;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.detail-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid var(--border-subtle);
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.detail-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 600px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.drama-tag {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.detail-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px 60px;
}

.episode-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.episode-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* TABS */
.ep-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.ep-tabs::-webkit-scrollbar {
  display: none;
}

.ep-tab-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ep-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.ep-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  box-shadow: var(--shadow-glow);
}

/* Episode Grid — 5-6 per baris di mobile, lebih di desktop */
.episode-grid {
  display: grid;
  /* 56px agar lebih rapat & pas banyak di HP */
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 12px 4px;
  padding: 10px 4px 24px;
  justify-items: center;
}

/* ═══════════════════════════════════════════════
   SLEEK GLASS ORB EPISODE BUTTON (Bulat Premium)
   ═══════════════════════════════════════════════ */
.ep-num-btn {
  position: relative;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  /* Membuat Bulat Sempurna */
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.ep-num-btn:hover {
  transform: translateY(-3px) scale(1.1);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.ep-num-btn:active {
  transform: scale(0.95);
}

/* Angka di dalam lingkaran */
.ep-num-val {
  position: relative;
  z-index: 2;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.3s ease;
}

.ep-num-btn:hover .ep-num-val {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* State: Sedang Diputar (Neon Glowing Circle) */
.ep-num-btn.now-playing {
  background: rgba(0, 229, 255, 0.1);
  border: 2px solid #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4),
    inset 0 0 10px rgba(0, 229, 255, 0.2);
}

.ep-num-btn.now-playing .ep-num-val {
  color: #00e5ff;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* Episode 3 digit → font kecil agar pas */
.ep-num-val.ep-tiny {
  font-size: 11px;
}


/* =============================================
   PLAYER PAGE
   ============================================= */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

.player-main {
  background: #000;
  padding: 24px;
}

.video-wrapper {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
}

.video-placeholder-icon {
  font-size: 56px;
}

.video-placeholder p {
  font-size: 14px;
}

.player-info {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player-drama-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.player-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.player-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.player-sidebar {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 50px;
}

.sidebar-episode-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.sidebar-ep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
}

.sidebar-ep-item:hover {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.sidebar-ep-item.active {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

.sidebar-ep-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.sidebar-ep-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sidebar-ep-item.active .sidebar-ep-num {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

.sidebar-ep-info {
  flex: 1;
  min-width: 0;
}

.sidebar-ep-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-ep-item.active .sidebar-ep-title {
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar-ep-free {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  flex-shrink: 0;
}

.sidebar-ep-lock {
  font-size: 11px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

/* =============================================
   BACK BUTTON
   ============================================= */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.btn-back:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  transform: translateX(-3px);
}

/* =============================================
   LOADING OVERLAY
   ============================================= */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-logo {
  font-size: 32px;
  animation: pulse 1.5s ease infinite;
}

.loading-text {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  box-shadow: var(--shadow-glow);
  z-index: 9000;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* =============================================
   PAGE TRANSITIONS
   ============================================= */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageFadeIn 0.4s ease;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .player-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .player-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-search-wrapper {
    max-width: none;
    flex: 1;
    margin-right: 8px;
  }

  .logo-text {
    font-size: 18px;
    /* Diperkecil di mobile agar tidak sempit */
  }

  .nav-logo-img {
    width: 28px;
    height: 28px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 100px;
    max-width: none;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-desc {
    display: none;
  }

  .hero-prev,
  .hero-next {
    display: none;
  }

  .drama-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .detail-hero-content {
    flex-direction: column;
    align-items: center;
    padding: 0;
    padding-top: calc(var(--nav-height) + 8px);
    gap: 0;
  }

  .detail-poster {
    width: 100%;
    border-radius: 0;
    overflow: visible;
  }

  .poster-img-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 82vh;
    border-radius: 0;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  }

  .poster-zoom-hint {
    opacity: 1;
    font-size: 12px;
  }

  .poster-actions {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.4);
  }

  .btn-cover-hd {
    border-radius: 8px;
  }

  .detail-info {
    width: 100%;
    padding: 16px 20px;
  }

  .detail-title {
    font-size: 20px;
  }

  .detail-meta {
    gap: 8px;
  }

  .detail-body {
    padding: 16px 20px 40px;
  }



  .player-main {
    padding: 0;
  }

  .video-wrapper {
    border-radius: 0;
  }

  .player-info {
    padding: 16px;
  }

  .content-section {
    padding: 32px 16px;
  }
}

@media (max-width: 480px) {
  .logo-text {
    display: none;
    /* Sembunyikan teks logo di HP sangat kecil agar pencarian lega */
  }

  .nav-search {
    padding: 8px 12px;
  }

  .nav-search input {
    font-size: 13px;
  }

  .nav-search-wrapper {
    margin-right: 0;
  }

  .drama-grid {
    grid-template-columns: repeat(2, 1fr);
    /* Tetap 2 di HP kecil agar tidak kekecilan */
    gap: 10px;
  }

  .hero-actions {
    gap: 8px;
  }

  .btn-play,
  .btn-detail {
    padding: 12px 18px;
    font-size: 13px;
  }
}

/* =============================================
   UTILITY
   ============================================= */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0 24px;
}

/* =============================================
   EXPLORE PAGE
   ============================================= */

/* Explore Header */
.explore-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.explore-title-block {
  flex: 1;
  min-width: 200px;
}

.explore-main-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.explore-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Stats Row */
.explore-stats-row {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.explore-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  min-width: 100px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.explore-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.7;
}

.explore-stat-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.stat-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
  transition: var(--transition);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animated number counting */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-number.counting {
  animation: countUp 0.4s ease forwards;
}

/* Filter Bar */
.explore-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.filter-chip.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(233, 30, 140, 0.35);
}

/* Load More Area */
.load-more-area {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Progress Bar */
.progress-bar-wrap {
  width: 100%;
  max-width: 500px;
}

.progress-label {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-label strong {
  color: var(--text-secondary);
  margin: 0 2px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShimmer 1.5s infinite;
}

@keyframes progressShimmer {
  to {
    left: 100%;
  }
}

/* Load More Button */
.load-more-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.load-more-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.load-more-btn:hover {
  border-color: transparent;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(233, 30, 140, 0.4);
  color: #fff;
}

.load-more-btn:hover::before {
  opacity: 1;
}

.load-more-btn:hover .load-more-badge {
  background: rgba(255, 255, 255, 0.25);
}

.load-more-btn>* {
  position: relative;
  z-index: 1;
}

.load-more-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.load-more-icon {
  font-size: 16px;
  animation: bounceDown 1.8s ease infinite;
}

@keyframes bounceDown {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

.load-more-text {
  letter-spacing: 0.2px;
}

.load-more-badge {
  background: rgba(233, 30, 140, 0.15);
  border: 1px solid var(--border-accent);
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 50px;
  transition: var(--transition);
}

.load-more-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* All Loaded Message */
.all-loaded-msg {
  margin-top: 48px;
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
}

.all-loaded-msg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.all-loaded-icon {
  font-size: 52px;
  margin-bottom: 16px;
  animation: celebrateBounce 0.6s ease;
}

@keyframes celebrateBounce {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.all-loaded-msg h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.all-loaded-msg p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.all-loaded-msg strong {
  color: var(--accent-primary);
}

/* Drama card appearing animation for load more */
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* tambahan: shimmer effect untuk kartun baru */
@keyframes shimmer {
  0% {
    background-position: -150% center;
  }

  100% {
    background-position: 150% center;
  }
}

.drama-card.new-card {
  animation: cardAppear 0.4s var(--transition-smooth) both;
}

.drama-card.new-card .drama-card-poster img {
  animation: shimmer 1.2s infinite;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
}

.drama-card.new-card {
  animation: cardAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Responsive Explore */
@media (max-width: 768px) {
  .explore-header {
    flex-direction: column;
  }

  .explore-stats-row {
    width: 100%;
    justify-content: stretch;
  }

  .explore-stat-card {
    flex: 1;
    min-width: 80px;
  }

  .stat-number {
    font-size: 22px;
  }

  .explore-main-title {
    font-size: 24px;
  }

  .load-more-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* =============================================
   VIDEO PLAYER — Loading Spinner & Player
   ============================================= */

/* Loading spinner di dalam video-wrapper */
.video-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  min-height: 300px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.video-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  animation: videoSpin 0.8s linear infinite;
}

@keyframes videoSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Real <video> element */
#drama-video {
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
  outline: none;
  border-radius: 0;
}

/* video-wrapper sudah ada di style utama, pastikan tepat */
.video-wrapper {
  position: relative;
  background: #000;
  overflow: hidden;
}

/* Error state */
.video-error-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.video-error-msg .error-icon {
  font-size: 48px;
}

.video-error-msg strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

/* =============================================
   DOWNLOAD BUTTON
   ============================================= */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  text-decoration: none;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-download.loading {
  opacity: 0.7;
  cursor: wait;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: rgba(6, 6, 12, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  margin-top: 80px;
  position: relative;
  z-index: 10;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 40px;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
}



.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-logo .logo-icon {
  font-size: 28px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-chip:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer-col-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-credit {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-dev {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}

.footer-dev:hover {
  color: var(--accent-secondary);
  text-shadow: 0 0 8px var(--accent-primary);
}

/* responsive footer */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    padding: 40px 20px 30px;
    gap: 32px;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-bottom-inner {
    padding: 16px 20px;
    flex-direction: column;
    text-align: center;
  }

  /* Hide footer on player page */
  #page-player.active~footer,
  #page-detail.active~footer {
    display: none;
  }
}