/* ============================================================
   For B27 💕 — Design System
   A romantic, cute, premium streaming UI
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #ff6b9d;
  --primary-dark: #e8457a;
  --primary-light: #ffb3cc;
  --primary-glow: rgba(255, 107, 157, 0.4);
  --secondary: #c084fc;
  --secondary-dark: #a855f7;
  --accent-gold: #ffd700;
  --accent-rose: #f4a0b5;

  --bg-deep: #0d0015;
  --bg-dark: #1a0a2e;
  --bg-card: rgba(255, 107, 157, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 107, 157, 0.2);
  --glass-border-light: rgba(255, 107, 157, 0.4);
  --safe-bottom: env(safe-area-inset-bottom, 20px);
  --plyr-color-main: var(--primary);
  --plyr-video-background: transparent;
  --plyr-range-thumb-height: 14px;

  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 20px rgba(255, 107, 157, 0.3);
  --shadow-glow-lg: 0 0 40px rgba(255, 107, 157, 0.4);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.5);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: all 0.3s var(--ease);

  --font-thai: 'Kanit', sans-serif;
  --font-display: 'Playfair Display', serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-thai);
  font-weight: 300;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ===== ANIMATED BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(255, 107, 157, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(255, 51, 133, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, #0d0015 0%, #1a0a2e 40%, #150520 100%);
  z-index: -2;
  animation: bg-shift 20s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(8deg) brightness(1.05); }
  100% { filter: hue-rotate(-5deg) brightness(0.98); }
}

/* ===== FLOATING HEARTS LAYER ===== */
#hearts-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -50px;
  animation: float-heart linear forwards;
  pointer-events: none;
  filter: blur(0.5px);
  will-change: transform, opacity;
}

@keyframes float-heart {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.3);
    opacity: 0;
  }
  8% {
    opacity: 0.8;
    transform: translateY(-8vh) rotate(10deg) scale(1);
  }
  25% {
    transform: translateY(-25vh) translateX(15px) rotate(-8deg) scale(1.05);
  }
  50% {
    transform: translateY(-50vh) translateX(-10px) rotate(12deg) scale(0.95);
    opacity: 0.6;
  }
  75% {
    transform: translateY(-75vh) translateX(8px) rotate(-5deg) scale(0.9);
    opacity: 0.3;
  }
  100% {
    transform: translateY(-110vh) translateX(-5px) rotate(15deg) scale(0.7);
    opacity: 0;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 157, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 157, 0.5);
}

/* ===== PAGE TRANSITIONS ===== */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.page {
  animation: page-enter 0.5s var(--ease) forwards;
}

.page-exit {
  animation: page-leave 0.3s var(--ease) forwards;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-leave {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-15px); }
}

/* ===== LANDING PAGE ===== */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 24px;
  text-align: center;
  position: relative;
}

.landing-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.25) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  animation: glow-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-pulse {
  0%, 100% { transform: translate(-50%, -60%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -60%) scale(1.3); opacity: 1; }
}

.landing-logo {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 40%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.5));
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: -1px;
}

.landing-heart-emoji {
  font-size: clamp(2rem, 8vw, 3.5rem);
  display: block;
  margin-bottom: 24px;
  animation: heart-beat 1.2s ease-in-out infinite;
  -webkit-text-fill-color: initial;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(0.95); }
  45% { transform: scale(1.1); }
}

.landing-greeting {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.landing-greeting span {
  color: var(--primary);
  font-weight: 500;
}

.landing-message {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 200;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.8;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
  font-style: italic;
  animation: fade-in-up 1s var(--ease) 0.3s both;
}

.landing-message::before,
.landing-message::after {
  content: '"';
  font-size: 2em;
  color: var(--primary);
  opacity: 0.4;
  font-family: var(--font-display);
  line-height: 0;
  vertical-align: middle;
}

.landing-message::after {
  content: '"';
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-enter-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-family: var(--font-thai);
  font-size: 1.1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow), 0 4px 15px rgba(232, 69, 122, 0.4);
  animation: fade-in-up 1s var(--ease) 0.6s both;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.landing-enter-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-glow-lg), 0 8px 25px rgba(232, 69, 122, 0.5);
}

.landing-enter-btn:active {
  transform: translateY(0) scale(0.98);
}

.landing-enter-btn .btn-sparkle {
  animation: sparkle-rotate 3s linear infinite;
}

@keyframes sparkle-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  padding-top: calc(12px + var(--safe-top));
  background: rgba(13, 0, 21, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.header-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 1.1rem;
  text-decoration: none;
}

.header-back:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: scale(1.05);
}

.header-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* ===== CONTENT CONTAINER ===== */
.content {
  padding: 24px 16px;
  padding-bottom: calc(24px + var(--safe-bottom));
  max-width: 800px;
  margin: 0 auto;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .emoji {
  font-size: 1.2em;
}

/* ===== CONTINUE WATCHING BANNER ===== */
.continue-banner {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(192, 132, 252, 0.1) 100%);
  border: 1px solid rgba(255, 107, 157, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}

.continue-banner:hover {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.22) 0%, rgba(192, 132, 252, 0.15) 100%);
  border-color: rgba(255, 107, 157, 0.35);
  transform: translateY(-1px);
}

.continue-banner-poster {
  width: 48px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.continue-banner-info {
  flex: 1;
  min-width: 0;
}

.continue-banner-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-banner-ep {
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 300;
}

.continue-banner-play {
  font-size: 1.4rem;
  flex-shrink: 0;
  animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ===== SERIES GRID ===== */
.series-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 600px) {
  .series-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 900px) {
  .series-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== SERIES CARD ===== */
.series-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  display: block;
  animation: card-appear 0.5s var(--ease) both;
}

.series-card:nth-child(1) { animation-delay: 0.05s; }
.series-card:nth-child(2) { animation-delay: 0.1s; }
.series-card:nth-child(3) { animation-delay: 0.15s; }
.series-card:nth-child(4) { animation-delay: 0.2s; }
.series-card:nth-child(5) { animation-delay: 0.25s; }
.series-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes card-appear {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.series-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-glow), var(--shadow-card-hover);
}

.series-card:active {
  transform: translateY(-2px) scale(0.99);
}

.series-card-poster {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.series-card:hover .series-card-poster {
  transform: scale(1.03);
}

.series-card-info {
  padding: 12px 14px 14px;
}

.series-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== SERIES DETAIL PAGE ===== */
.detail-hero {
  position: relative;
  margin: -24px -16px 0;
  padding: 0 16px 24px;
  background: linear-gradient(180deg, rgba(255, 107, 157, 0.08) 0%, transparent 100%);
}

.detail-poster-wrap {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  margin-bottom: 20px;
}

.detail-poster {
  width: 180px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  border: 2px solid rgba(255, 107, 157, 0.2);
  transition: var(--transition);
  aspect-ratio: 3/4;
  object-fit: cover;
}

.detail-poster:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-card-hover), var(--shadow-glow-lg);
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.3;
}

.detail-count {
  text-align: center;
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 300;
  margin-bottom: 16px;
}

.detail-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 200;
  line-height: 1.8;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.detail-desc-toggle {
  display: inline;
  color: var(--primary);
  cursor: pointer;
  font-weight: 400;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin-left: 4px;
}

/* ===== CONTINUE WATCHING (Detail page) ===== */
.detail-continue {
  margin: 24px 0 8px;
  display: flex;
  justify-content: center;
}

.detail-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-thai);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.detail-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-lg);
}

/* ===== EPISODE GRID ===== */
.episode-section {
  margin-top: 28px;
}

.episode-section-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (min-width: 500px) {
  .episode-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 768px) {
  .episode-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
  }
}

.episode-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-thai);
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.episode-btn:hover {
  background: rgba(255, 107, 157, 0.15);
  border-color: var(--primary);
  color: var(--text);
  transform: scale(1.05);
}

.episode-btn:active {
  transform: scale(0.95);
}

.episode-btn--watched {
  background: rgba(255, 107, 157, 0.12);
  border-color: rgba(255, 107, 157, 0.25);
  color: var(--primary-light);
}

.episode-btn--watched::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.5rem;
  color: var(--primary);
  font-weight: 700;
}

.episode-btn--active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}

/* ===== PLAYER PAGE ===== */
.player-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  min-height: calc(100dvh - 60px);
}

.video-wrapper {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 0 16px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.video-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 5;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.video-loading.visible {
  opacity: 1;
  pointer-events: none;
}

.video-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 107, 157, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.video-loading-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===== PLAYER CONTROLS ===== */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 16px;
  max-width: 450px;
  margin: 0 auto;
  width: 100%;
}

.player-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-thai);
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.player-nav-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.player-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.player-nav-btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
  font-weight: 500;
}

.player-nav-btn--primary:hover {
  box-shadow: var(--shadow-glow);
}

.player-ep-info {
  text-align: center;
  padding: 0 10px;
}

.player-ep-current {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-light);
}

.player-ep-total {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===== PLAYER EPISODE LIST ===== */
.player-episodes {
  padding: 20px 16px;
  max-width: 450px;
  margin: 0 auto;
  width: 100%;
}

.player-episodes-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.player-episode-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}

.loading-heart {
  font-size: 3rem;
  animation: heart-beat 1.2s ease-in-out infinite;
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 12px;
  text-align: center;
}

.empty-state-emoji {
  font-size: 4rem;
  opacity: 0.6;
}

.empty-state-text {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== STAGGERED ANIMATIONS ===== */
.stagger > * {
  animation: fade-in-up 0.4s var(--ease) both;
}

.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.09s; }
.stagger > *:nth-child(4) { animation-delay: 0.12s; }
.stagger > *:nth-child(5) { animation-delay: 0.15s; }
.stagger > *:nth-child(6) { animation-delay: 0.18s; }
.stagger > *:nth-child(7) { animation-delay: 0.21s; }
.stagger > *:nth-child(8) { animation-delay: 0.24s; }

/* ===== RESPONSIVE FINE TUNING ===== */
@media (max-width: 360px) {
  .episode-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .landing-logo {
    font-size: 2.5rem;
  }
  .detail-poster {
    width: 140px;
  }
}

@media (min-width: 768px) {
  .content {
    padding: 32px 24px;
  }
  .landing {
    padding: 60px 32px;
  }
  .detail-poster {
    width: 220px;
  }
  .video-wrapper {
    padding: 0;
  }
}

/* ===== POSTER OVERFLOW FIX ===== */
.series-card-poster-wrap {
  overflow: hidden;
}

/* ===== LOVE BADGE ===== */
.love-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(255, 107, 157, 0.12);
  border: 1px solid rgba(255, 107, 157, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 300;
  margin-bottom: 12px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: rgba(255, 107, 157, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.85rem;
  font-weight: 400;
  z-index: 9999;
  transition: transform 0.4s var(--ease-bounce);
  pointer-events: none;
  white-space: nowrap;
}

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

/* ===== PREMIUM UI UPDATES ===== */
.header-logo { display:flex; align-items:center; gap:6px; }
.header-logo-icon { width:22px; height:22px; display:inline-block; }
.landing-hero-icons { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 20px; }
.hero-icon-item { width: 90px; height: 90px; filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.4)); animation: float-fox 4s ease-in-out infinite; }
.hero-icon-item:nth-child(1) { animation-delay: 0.5s; }
.loading-hero-icons { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.loading-hero-icons .loading-heart { animation: float-fox 2s ease-in-out infinite; }
.loading-hero-icons .loading-heart:nth-child(1) { animation-delay: 0.3s; }
@keyframes float-fox { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.landing-greeting svg { width:20px; height:20px; vertical-align:middle; margin-left:6px; filter: drop-shadow(0 0 5px rgba(255, 107, 157, 0.5)); }
.btn-icon { display:flex; align-items:center; justify-content:center; width:20px; height:20px; }

/* Plyr Extra Fixes */
.plyr {
  height: 100% !important;
}
.plyr__video-wrapper {
  height: 100% !important;
  background: transparent !important;
}
.plyr__poster {
  background-size: cover !important;
  background-position: center !important;
}
.plyr video {
  object-fit: cover !important;
}
.svg-icon { display:inline-flex; width:20px; height:20px; vertical-align:middle; }
.continue-banner-play { width:24px; height:24px; display:flex; align-items:center; justify-content:center; }
.continue-banner-play svg { width:100%; height:100%; }
.meta-icon { width:14px; height:14px; display:inline-flex; vertical-align:middle; opacity:0.8; margin-right:4px; }
.episode-btn--watched::after { display:none; }
.episode-btn-check { position:absolute; top:3px; right:3px; width:12px; height:12px; color:var(--primary); }
.loading-heart svg { width:60px; height:60px; animation: heart-beat 1.2s ease-in-out infinite; }
.empty-state-emoji svg { width:60px; height:60px; opacity:0.3; }
.floating-heart svg { width:100%; height:100%; filter: drop-shadow(0 2px 4px rgba(255,107,157,0.3)); }
