:root {
  --bg-deep: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #161619;
  --text-primary: #f4f1ea;
  --text-secondary: #9a958c;
  --text-muted: #5e5a54;
  --gold: #c9a86c;
  --gold-dim: #8f7646;
  --terracotta: #b35c38;
  --rust: #8a3b1f;
  --olive: #1f2e24;
  --olive-light: #2a3f31;
  --cream: #f4f1ea;
  --border: rgba(201, 168, 108, 0.15);
  --border-strong: rgba(201, 168, 108, 0.35);
  --accent-gradient: linear-gradient(135deg, var(--gold) 0%, var(--terracotta) 100%);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Typography */
.font-display {
  font-family: 'Cinzel Decorative', 'Noto Serif SC', 'Songti SC', serif;
}

.font-serif-cn {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

.font-condensed {
  font-family: 'Oswald', 'Noto Sans SC', sans-serif;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-route {
  width: 240px;
  height: 2px;
  background: rgba(201, 168, 108, 0.15);
  position: relative;
  overflow: hidden;
  margin-top: 24px;
}

.loader-route::after {
  content: '';
  position: absolute;
  left: -40%;
  top: 0;
  width: 40%;
  height: 100%;
  background: var(--gold);
  animation: routeMove 1.8s ease-in-out infinite;
}

@keyframes routeMove {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* Navigation */
.nav-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 260px;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 100;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-sidebar.open {
  transform: translateX(0);
}

.nav-toggle {
  position: fixed;
  left: 24px;
  top: 24px;
  z-index: 101;
  width: 48px;
  height: 48px;
  background: rgba(10, 10, 11, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gold);
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 108, 0.1);
}

.nav-brand {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 8px;
}

.nav-title {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.nav-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
}

.nav-list::-webkit-scrollbar {
  width: 4px;
}

.nav-list::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 2px;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.25s ease;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(201, 168, 108, 0.06);
}

.nav-link.active {
  color: var(--gold);
  background: rgba(201, 168, 108, 0.1);
  border-left-color: var(--gold);
}

.nav-link .day-num {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent-gradient);
  z-index: 102;
  width: 0%;
  transition: width 0.1s linear;
}

/* Main Content */
.main-content {
  margin-left: 0;
  min-height: 100vh;
}

.section {
  min-height: 100vh;
  padding: 80px 8vw 100px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

/* Hero */
.hero {
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/hero-bg.jpg') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 11, 0.3) 0%,
    rgba(10, 10, 11, 0.6) 50%,
    rgba(10, 10, 11, 0.95) 100%
  );
}

.hero-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.hero-label {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
}

.hero-title {
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.hero-subtitle {
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 48px;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.hero-meta-item {
  text-align: center;
}

.hero-meta-num {
  font-family: 'Oswald', sans-serif;
  font-size: 42px;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.hero-meta-label {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: bounce 2s infinite;
}

.scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Section Headers */
.section-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  margin-bottom: 24px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 760px;
  margin-bottom: 48px;
}

/* Day Card Layout */
.day-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.day-header {
  padding: 32px 40px;
  background: linear-gradient(135deg, rgba(31, 46, 36, 0.8) 0%, rgba(22, 22, 25, 0.95) 100%);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.day-badge {
  font-family: 'Oswald', sans-serif;
  width: 90px;
  height: 90px;
  border: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.day-badge-small {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.day-badge-num {
  font-size: 42px;
  line-height: 1;
  color: var(--gold);
}

.day-route {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-route-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(24px, 3vw, 38px);
  font-family: 'Noto Serif SC', serif;
}

.day-route-arrow {
  color: var(--gold);
  font-size: 0.7em;
}

.day-route-meta {
  display: flex;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.day-route-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-gpx {
  text-align: right;
}

.day-gpx-code {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.day-gpx-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.day-body {
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}

.day-body-full {
  padding: 40px;
}

/* Content Blocks */
.content-block {
  margin-bottom: 36px;
}

.content-block:last-child {
  margin-bottom: 0;
}

.block-title {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.block-title::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.block-text {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.9;
}

.block-list {
  list-style: none;
}

.block-list li {
  padding: 10px 0 10px 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 15px;
  border-bottom: 1px solid rgba(201, 168, 108, 0.08);
}

.block-list li:last-child {
  border-bottom: none;
}

.block-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--terracotta);
}

/* Douyin Script Timeline */
.script-timeline {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
}

.script-timeline::before {
  content: '';
  position: absolute;
  left: 44px;
  top: 70px;
  bottom: 40px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), var(--terracotta), transparent);
}

.script-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.script-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--bg-deep);
}

.script-title {
  font-size: 16px;
  font-weight: 600;
}

.script-total {
  margin-left: auto;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.script-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
}

.script-time {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-align: right;
  padding-top: 2px;
}

.script-dot {
  position: absolute;
  left: 48px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--bg-elevated);
}

.script-content {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.script-tags {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.script-tag {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* Route Overview Map */
.route-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.route-phase {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.route-phase:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.route-phase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient);
}

.route-phase-num {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.route-phase-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.route-phase-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.route-phase-meta {
  margin-top: 16px;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* Timeline Section */
.timeline-list {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 24px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
}

.timeline-month {
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  color: var(--gold);
}

.timeline-content {
  color: var(--text-secondary);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px;
}

.tip-num {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  color: var(--terracotta);
  margin-bottom: 12px;
  line-height: 1;
}

.tip-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.tip-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Film Frame Effect */
.film-frame {
  position: relative;
}

.film-frame::before,
.film-frame::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--bg-deep) 0px,
    var(--bg-deep) 8px,
    transparent 8px,
    transparent 16px
  );
  opacity: 0.5;
  pointer-events: none;
}

.film-frame::before { top: 0; }
.film-frame::after { bottom: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .nav-sidebar {
    width: 280px;
  }
  
  .day-header {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  
  .day-badge {
    margin: 0 auto;
  }
  
  .day-route-line {
    justify-content: center;
  }
  
  .day-route-meta {
    justify-content: center;
  }
  
  .day-gpx {
    text-align: center;
  }
  
  .day-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .route-overview,
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 80px 5vw 80px;
  }
  
  .day-header,
  .day-body,
  .day-body-full {
    padding: 24px;
  }
  
  .hero-meta {
    gap: 24px;
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .script-timeline::before {
    left: 38px;
  }
  
  .script-dot {
    left: 42px;
  }
}
