:root {
  --bg: #090e18;
  --surface: #101827;
  --surface-border: #1e293b;
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.2);
  --accent: #06b6d4;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --code-bg: #030712;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

/* Glow Background Effects */
.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow-1 {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  top: -100px;
  left: 20%;
}
.glow-2 {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  top: 500px;
  right: 10%;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  background: rgba(9, 14, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
  z-index: 100;
  padding: 1rem 2rem;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-badge {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
}
.logo-title {
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--primary);
}
.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  color: var(--text-main) !important;
}
.github-btn:hover {
  border-color: var(--primary);
}

/* Main */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 5rem;
}
.hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 2.5rem;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section */
.section {
  margin-bottom: 5rem;
}
.section-header {
  margin-bottom: 2rem;
}
.section-tag {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.5rem;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Timeline Studio */
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.75rem;
}
.timeline-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.transport-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.transport-btn {
  background: #1e293b;
  border: 1px solid var(--surface-border);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.transport-btn:hover {
  background: #334155;
}
.timecode-display {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  background: #030712;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--surface-border);
}
.timeline-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Video Monitor */
.preview-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.video-monitor {
  width: 100%;
  max-width: 520px;
  height: 292px;
  background: #000;
  border: 2px solid var(--surface-border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.monitor-layer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  transition: background 0.1s;
}
.monitor-hud {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Tracks */
.tracks-wrapper {
  background: #030712;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}
.playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f59e0b;
  z-index: 10;
  pointer-events: none;
  left: calc(140px + (100% - 140px) * 0.375);
}
.track-row {
  display: flex;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
}
.track-header {
  width: 140px;
  background: #111827;
  border-right: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
}
.track-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}
.track-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
}
.track-btn.active { opacity: 1.0; }
.track-lane {
  flex: 1;
  background: #0b1120;
  position: relative;
}
.clip-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.clip-block.v2-clip { background: rgba(6, 182, 212, 0.35); color: #a5f3fc; }
.clip-block.v1-a { background: rgba(59, 130, 246, 0.35); color: #bfdbfe; }
.clip-block.v1-b { background: rgba(245, 158, 11, 0.35); color: #fde68a; }
.clip-block.a1-clip { background: rgba(16, 185, 129, 0.35); color: #a7f3d0; }

.transition-pill {
  position: absolute;
  top: 8px;
  bottom: 8px;
  background: rgba(168, 85, 247, 0.4);
  border: 1px dashed #a855f7;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e9d5ff;
  z-index: 2;
}

.scrub-slider {
  width: 100%;
  margin-top: 1rem;
}

/* XML Card */
.xml-card {
  background: var(--code-bg);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
}
.xml-header {
  background: #111827;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-border);
}
.copy-btn {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}
.xml-code {
  display: block;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  max-height: 300px;
  overflow-y: auto;
}

/* Code */
.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.code-card {
  background: var(--code-bg);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
}
.code-header {
  background: #111827;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}
pre {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-x: auto;
  line-height: 1.5;
}
.comment { color: #64748b; }
.keyword { color: #f59e0b; }
.fn { color: #38bdf8; }
.string { color: #10b981; }
.macro { color: #ec4899; }

/* Footer */
.footer {
  border-top: 1px solid var(--surface-border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
