:root {
  --bg-color: #121216;
  --text-color: #e2e2e2;
  --text-muted: #8b8b99;
  --brand-color: #ff3b5c;
  --brand-gradient: linear-gradient(135deg, #ff3b5c 0%, #d81b60 100%);
  --card-bg: #1e1e24;
  --border-color: #33333d;
  --font-main: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Top Progress Bar */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

#progress-bar {
  height: 100%;
  background: var(--brand-color);
  width: 0%;
  transition: width 0.1s;
}

#current-scene-label {
  position: fixed;
  top: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 1000;
  pointer-events: none;
}

/* Header */
header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: rgba(18, 18, 22, 0.9);
  backdrop-filter: blur(10px);
  z-index: 900;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-container img {
  height: 32px;
  width: auto;
}

.logo-container span {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Navigation Episode Strip */
.nav-episodes {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 20px;
  scrollbar-width: none;
}
.nav-episodes::-webkit-scrollbar {
  display: none;
}

.nav-episodes a {
  white-space: nowrap;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.3s;
}

.nav-episodes a.active {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
}

/* Main Layout */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

h1, h2, h3 {
  font-weight: 600;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 40px;
}

h2 {
  font-size: 1.8rem;
  color: #fff;
}

h3 {
  font-size: 1.2rem;
  color: #ddd;
}

p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* Scene 1: Opening */
.scene-opening {
  text-align: center;
  padding: 80px 0 60px;
  position: relative;
}

.scene-opening p.subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

.btn-download {
  display: inline-block;
  background: var(--brand-gradient);
  color: #fff;
  padding: 14px 40px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255, 59, 92, 0.4);
  transition: transform 0.2s;
}

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

.marquee-container {
  margin-top: 50px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
}

.marquee-content img {
  height: 160px;
  width: auto;
  border-radius: 8px;
  margin: 0 10px;
  object-fit: cover;
  display: inline-block;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Scene 2: Characters */
.scene-characters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
}

.character-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s;
}

.character-card:hover {
  transform: translateY(-5px);
}

.character-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.character-info {
  padding: 15px;
}

.character-info .tag {
  display: inline-block;
  background: rgba(255, 59, 92, 0.2);
  color: var(--brand-color);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* Scene 3: Conflict (Split layout) */
.scene-conflict {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.script-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.script-card:hover {
  transform: rotateY(5deg) translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.script-card h3 {
  border-bottom: 2px solid var(--brand-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.dialogue {
  margin-bottom: 15px;
  font-style: italic;
  color: #bbb;
}

.script-images {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.script-images img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

/* Scene 4: Highlights (Polaroid) */
.scene-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.polaroid {
  background: #fff;
  padding: 10px 10px 40px 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  position: relative;
  width: 160px;
  transition: transform 0.3s;
}

.polaroid:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 10;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.polaroid .caption {
  color: #333;
  font-family: "Kaiti", "STKaiti", serif;
  font-size: 14px;
  text-align: center;
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
}

.polaroid .tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 60px;
  height: 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px);
}

.polaroid.top-3 {
  border: 4px solid #ffd700;
  width: 200px;
}

/* Scene 5: Next Episode */
.scene-next {
  background: var(--brand-gradient);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: #fff;
}

.scene-next h2 {
  color: #fff;
  font-size: 2rem;
}

.scene-next .countdown {
  font-size: 2.5rem;
  font-weight: bold;
  font-family: monospace;
  margin: 20px 0;
  letter-spacing: 2px;
}

.btn-reserve {
  background: #fff;
  color: var(--brand-color);
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.next-covers {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.next-covers img {
  width: 80px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Scene 6: Finale (Phone Mockup) */
.scene-finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  border: 12px solid #333;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  background: #000;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  animation: scrollPhone 20s linear infinite;
}

.phone-screen img {
  width: 100%;
  object-fit: cover;
}

@keyframes scrollPhone {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.download-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-episode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--branch-color);
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-episode:hover {
  background: var(--brand-color);
  color: #fff;
}

/* Danmaku (Bullet Comments) */
.danmaku-layer {
  position: fixed;
  bottom: 30px;
  left: 0;
  width: 100%;
  height: 100px;
  pointer-events: none;
  z-index: 800;
  overflow: hidden;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  background: rgba(0,0,0,0.6);
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatDanmaku linear forwards;
  pointer-events: auto;
}

.danmaku-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.danmaku-layer:hover .danmaku-item {
  animation-play-state: paused;
}

@keyframes floatDanmaku {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* Footer */
footer {
  padding: 40px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: #0a0a0c;
}

.footer-links {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .scene-conflict { grid-template-columns: 1fr; }
  .marquee-content img { height: 120px; }
  .phone-mockup { width: 220px; height: 440px; }
  .polaroid { width: 120px; padding-bottom: 30px; }
  .polaroid.top-3 { width: 140px; }
  .polaroid .caption { font-size: 12px; bottom: 5px; }
  .danmaku-layer { display: none; } /* Hide danmaku on mobile per request to use vertical comments instead, but since it's fixed, hiding is easier, or we adapt. Let's just hide to avoid layout issues, or adapt to vertical. Client asks: mobile end danmaku changed to vertical comment list. We will convert it. */
  
  /* Mobile Danmaku as Vertical List */
  .danmaku-layer {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    pointer-events: auto;
    overflow: visible;
  }
  .danmaku-item {
    position: static;
    animation: none;
    transform: none;
    background: var(--card-bg);
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .scene-next .next-covers { flex-wrap: wrap; }
  .download-buttons { flex-direction: column; width: 100%; }
  .btn-episode { justify-content: center; }
}