:root {
  --bg: #080808;
  --bg-elevated: #0e0e10;
  --cyan: #00d4ff;
  --lunar-white: #f0f2f5;
  --lunar-gray: #9aa0a8;
  --lunar-silver: #c8cdd4;
  --lunar-dark: #141418;
  --text: #f0f2f5;
  --muted: #8a9099;
  --glass: rgba(14, 14, 16, 0.78);
  --glass-border: rgba(255, 255, 255, 0.10);
  --radius: 18px;
  --success: #7ee787;
  --warn: #facc15;
  --danger: #ff7b7b;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: 'Exo 2', 'Noto Sans SC', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: linear-gradient(180deg, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0) 100%);
  backdrop-filter: blur(8px);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: var(--lunar-white);
  text-shadow: 0 0 12px rgba(255,255,255,0.18);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: color 0.25s, text-shadow 0.25s;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--lunar-white);
  text-shadow: 0 0 10px rgba(255,255,255,0.35);
}

@media (max-width: 768px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; }
}

/* 3D Hero */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: radial-gradient(circle at center, #1a1a1c 0%, #080808 100%);
  overflow: hidden;
}

#canvas-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(8,8,8,0.45) 100%);
}

.hero-text {
  position: absolute;
  bottom: 10vh;
  left: 4vw;
  z-index: 3;
  pointer-events: none;
  max-width: 520px;
}

.hero-text h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(255,255,255,0.12);
  color: var(--lunar-white);
}

.hero-text h1 span {
  color: var(--lunar-silver);
}

.hero-text p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  max-width: 440px;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: float 2.2s ease-in-out infinite;
}

.scroll-hint::after {
  content: '';
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, var(--lunar-gray), transparent);
}

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

/* Loading */
#loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080808;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.loader-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: var(--lunar-white);
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 24px rgba(255,255,255,0.08);
}

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

.loader-text {
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.loader-percent {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--lunar-white);
  margin-top: 0.4rem;
  text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

/* Info Panel */
#info-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 50;
  width: 90%;
  max-width: 460px;
  padding: 1.8rem;
  background: rgba(14, 14, 16, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(255,255,255,0.04);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
  pointer-events: auto;
}

#info-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.info-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lunar-gray);
  margin-bottom: 0.35rem;
}

.info-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.9rem;
  color: var(--lunar-white);
}

.info-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1.3rem;
}

.info-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.info-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.info-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--lunar-white);
}

.info-stat-label {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

.info-extra {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}

.info-extra-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  line-height: 1.5;
}

.info-extra-label {
  color: var(--muted);
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.info-extra-value {
  color: var(--lunar-silver);
  text-align: right;
  word-break: break-word;
}

.info-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--lunar-white);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.btn:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.3);
  color: var(--lunar-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.1));
  box-shadow: 0 6px 24px rgba(255,255,255,0.12);
}

.btn-secondary {
  color: var(--muted);
  border-color: rgba(138,144,153,0.2);
  background: rgba(255,255,255,0.03);
}

.btn-secondary:hover {
  color: var(--lunar-white);
  background: rgba(255,255,255,0.08);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: var(--lunar-gray);
  font-size: 0.85rem;
}

.btn-ghost:hover {
  color: var(--lunar-white);
  background: rgba(255,255,255,0.05);
}

.info-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--lunar-white);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.25s;
}

.info-close:hover {
  background: rgba(255,255,255,0.15);
  transform: rotate(90deg);
}

/* Tooltip */
#marker-tooltip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  padding: 0.4rem 0.8rem;
  background: rgba(14,14,16,0.9);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--lunar-white);
  font-size: 0.8rem;
  opacity: 0;
  transform: translate(-50%, -140%);
  transition: opacity 0.2s;
  white-space: nowrap;
}

#marker-tooltip.visible { opacity: 1; }

/* Game Panel */
#game-panel {
  position: absolute;
  top: 6rem;
  right: 2vw;
  z-index: 40;
  width: 380px;
  max-width: 92vw;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding: 1.4rem;
  background: rgba(14, 14, 16, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 30px rgba(255,255,255,0.04);
  pointer-events: auto;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

#game-panel.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  pointer-events: none;
}

.game-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--lunar-white);
}

.game-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.site-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--lunar-silver);
  margin-bottom: 1rem;
}

.site-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lunar-white);
  box-shadow: 0 0 8px var(--lunar-white);
}

.progress-tag {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.7rem;
}

/* Decision Steps */
.decision-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.decision-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.25s;
}

.decision-card.active {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
}

.decision-card.locked {
  opacity: 0.5;
  filter: grayscale(0.7);
}

.decision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.decision-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lunar-white);
}

.decision-status {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
}

.decision-status.done {
  background: rgba(126,231,135,0.12);
  color: var(--success);
}

.decision-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.7rem;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-btn {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.option-btn:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
}

.option-btn.selected {
  border-color: var(--lunar-white);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 16px rgba(255,255,255,0.08);
}

.option-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.option-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.15rem;
  color: var(--lunar-white);
}

.option-hint {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
}

/* Stats Board */
.stats-board {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}

.stats-board h4 {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lunar-silver);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
}

.stat-row:last-child { border-bottom: none; }

.stat-label { color: var(--muted); }

.stat-value {
  font-weight: 600;
  color: var(--lunar-white);
}

.stat-value.good { color: var(--success); }
.stat-value.warn { color: var(--warn); }
.stat-value.bad { color: var(--danger); }

/* Agent Actions */
.agent-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.agent-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--lunar-gray);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.agent-action:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  color: var(--lunar-white);
  transform: translateY(-2px);
}

.agent-action-icon {
  font-size: 1.3rem;
}

/* Result Modal */
#result-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

#result-panel.visible {
  opacity: 1;
  visibility: visible;
}

.result-card {
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  background: rgba(14,14,16,0.98);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
  position: relative;
}

.result-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  color: var(--lunar-white);
}

.result-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.result-body {
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.result-body h2 {
  color: var(--lunar-white);
  margin: 1.2rem 0 0.5rem;
  font-size: 1.2rem;
}

.result-body h3 {
  color: var(--lunar-silver);
  margin: 1.2rem 0 0.5rem;
  font-size: 1.05rem;
}

.result-body ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

.result-body li {
  margin-bottom: 0.3rem;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* AI Chat */
#agent-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 120;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  color: var(--lunar-white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}

#agent-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 40px rgba(255,255,255,0.12);
}

#agent-chat {
  position: fixed;
  right: 1.5rem;
  bottom: 5rem;
  z-index: 120;
  width: 380px;
  max-width: 92vw;
  height: 520px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: rgba(14,14,16,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#agent-chat.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.chat-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lunar-white);
}

.chat-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.message {
  max-width: 90%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.message.user {
  align-self: flex-end;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--lunar-white);
}

.message.agent {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.chat-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chat-chip:hover {
  background: rgba(255,255,255,0.08);
  color: var(--lunar-white);
  border-color: rgba(255,255,255,0.2);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat-input-row input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.chat-input-row input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.25);
}

.chat-input-row .btn {
  flex: 0 0 auto;
  padding: 0.6rem 0.9rem;
}

.typing {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Sections */
section {
  position: relative;
  z-index: 10;
  padding: 6rem 4vw;
  background: var(--bg);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 0.6rem;
  text-align: center;
  color: var(--lunar-white);
}

.section-title span { color: var(--lunar-gray); }

.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* Modules */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.module-card {
  position: relative;
  padding: 2rem 1.6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.module-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 12px 40px rgba(255,255,255,0.06);
}

.module-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--lunar-white), transparent 30%);
  opacity: 0;
  transition: opacity 0.4s;
  animation: rotate 6s linear infinite;
  pointer-events: none;
}

.module-card:hover::before { opacity: 0.05; }

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

.module-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--lunar-white);
}

.module-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  color: var(--lunar-white);
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 2.2rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), rgba(255,255,255,0.15), transparent);
}

.timeline-track {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18%;
  text-align: center;
  cursor: default;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--lunar-gray);
  box-shadow: 0 0 16px rgba(255,255,255,0.15);
  margin-bottom: 1rem;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

.timeline-node:hover .timeline-dot {
  transform: scale(1.35);
  box-shadow: 0 0 26px rgba(255,255,255,0.3);
}

.timeline-node.artemis .timeline-dot { border-color: #3b82f6; box-shadow: 0 0 16px rgba(59,130,246,0.25); }
.timeline-node.ilrs .timeline-dot { border-color: #8b5cf6; box-shadow: 0 0 16px rgba(139,92,246,0.25); }
.timeline-node.china .timeline-dot { border-color: #ef4444; box-shadow: 0 0 16px rgba(239,68,68,0.25); }
.timeline-node.commercial .timeline-dot { border-color: #ec4899; box-shadow: 0 0 16px rgba(236,72,153,0.25); }
.timeline-node.other .timeline-dot { border-color: #06b6d4; box-shadow: 0 0 16px rgba(6,182,212,0.25); }

.timeline-year {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--lunar-white);
  margin-bottom: 0.4rem;
}

.timeline-label {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--lunar-gray);
  background: var(--bg);
  display: inline-block;
  margin-right: 0.35rem;
}

.legend-dot.artemis { border-color: #3b82f6; }
.legend-dot.ilrs { border-color: #8b5cf6; }
.legend-dot.china { border-color: #ef4444; }
.legend-dot.commercial { border-color: #ec4899; }
.legend-dot.other { border-color: #06b6d4; }

.timeline-programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.program-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.program-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.program-card.artemis { border-left: 3px solid #3b82f6; }
.program-card.ilrs { border-left: 3px solid #8b5cf6; }
.program-card.china { border-left: 3px solid #ef4444; }
.program-card.commercial { border-left: 3px solid #ec4899; }
.program-card.other { border-left: 3px solid #06b6d4; }

.program-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  color: var(--lunar-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.program-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}

.program-card li { margin-bottom: 0.25rem; }

@media (max-width: 768px) {
  .timeline::before { top: 1.6rem; }
  .timeline-track { flex-wrap: wrap; gap: 1.5rem 0; }
  .timeline-node { width: 33%; }
  .timeline-year { font-size: 0.8rem; }
  .timeline-label { font-size: 0.7rem; }
  .timeline-legend { gap: 0.5rem 0.8rem; }
  .timeline-programs { grid-template-columns: 1fr; }
}

/* Data */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-box {
  padding: 1.8rem 1.4rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-align: center;
  transition: border-color 0.3s;
}

.stat-box:hover { border-color: rgba(255,255,255,0.22); }

.stat-box .stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.stat-box .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--lunar-white);
  text-shadow: 0 0 18px rgba(255,255,255,0.1);
}

.stat-unit {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 0.2rem;
}

.stat-fluctuate {
  font-size: 0.75rem;
  color: var(--lunar-gray);
  margin-top: 0.4rem;
  min-height: 1.2em;
}

.data-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding: 0 4vw;
}

.data-table-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.4rem 1.3rem;
  transition: border-color 0.3s;
}

.data-table-card:hover { border-color: rgba(255,255,255,0.22); }

.data-table-card h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--lunar-white);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: var(--lunar-silver);
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: none;
}

.data-source {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding: 0 4vw 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .data-tables {
    grid-template-columns: 1fr;
    padding: 0 4vw;
  }
  .data-table {
    font-size: 0.75rem;
  }
  .data-table th,
  .data-table td {
    padding: 0.5rem 0.35rem;
  }
}

/* Footer */
footer {
  position: relative;
  z-index: 10;
  padding: 2.5rem 4vw;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--bg);
}

footer a { color: var(--lunar-silver); text-decoration: none; }

/* Plan page layout */
.page-plan {
  padding-top: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.006) 2px, rgba(255,255,255,0.006) 4px),
    var(--bg);
}

.page-plan::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,255,0.04) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(0,212,255,0.02) 0%, transparent 50%);
}

.plan-header {
  position: relative;
  padding: 8rem 4vw 3rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 20%, rgba(0,212,255,0.06) 0%, rgba(26,26,28,0.3) 50%, transparent 80%);
  overflow: hidden;
}

.plan-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,212,255,0.04) 0%, transparent 70%);
  animation: header-pulse 6s ease-in-out infinite;
  pointer-events: none;
}

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

.plan-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.25), rgba(255,255,255,0.15), rgba(0,212,255,0.25), transparent);
}

.plan-header h1 {
  position: relative;
  margin: 0 0 0.6rem;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lunar-white);
  text-shadow: 0 0 60px rgba(0,212,255,0.15), 0 0 120px rgba(0,212,255,0.06);
}

.plan-header p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* Progress Pipeline */
.progress-pipeline {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 4vw 2rem;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
  flex: 1;
  min-width: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pipeline-node:hover {
  transform: translateY(-3px);
}

.pipeline-node.locked {
  cursor: default;
  opacity: 0.35;
  filter: grayscale(0.6);
}

.pipeline-node.locked:hover {
  transform: none;
}

.pipeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(14,14,16,0.9);
  border: 2px solid rgba(255,255,255,0.12);
  color: var(--muted);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.pipeline-node.active .pipeline-dot {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(0,212,255,0.35), 0 0 36px rgba(0,212,255,0.12);
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0,212,255,0.35), 0 0 36px rgba(0,212,255,0.12); }
  50% { box-shadow: 0 0 28px rgba(0,212,255,0.55), 0 0 48px rgba(0,212,255,0.2); }
}

.pipeline-node.done .pipeline-dot {
  border-color: var(--success);
  background: rgba(126,231,135,0.12);
  color: var(--success);
  box-shadow: 0 0 12px rgba(126,231,135,0.2);
}

.pipeline-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s;
}

.pipeline-node.active .pipeline-label {
  color: var(--cyan);
}

.pipeline-node.done .pipeline-label {
  color: var(--success);
}

.pipeline-connector {
  flex: 0 0 40px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  position: relative;
  margin: 0 -4px;
  margin-bottom: 1.5rem;
  transition: background 0.5s;
}

.pipeline-connector.done {
  background: rgba(126,231,135,0.3);
}

.pipeline-connector.active-half {
  background: linear-gradient(90deg, rgba(0,212,255,0.3), rgba(255,255,255,0.08));
}

/* Plan Main Layout */
.plan-main {
  position: relative;
  z-index: 5;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 4vw 4rem;
}

.plan-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 2.5rem;
  align-items: start;
}

.plan-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.plan-right {
  position: relative;
  min-width: 0;
  border-left: 1px solid rgba(0,212,255,0.08);
  padding-left: 2rem;
}

.page-plan .info-subtitle {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
}

.page-plan .info-title {
  font-size: 1.8rem;
  letter-spacing: 0.03em;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.info-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--lunar-gray);
  letter-spacing: 0.03em;
}

.info-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.page-plan #info-panel {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
  width: 100%;
  max-width: none;
  margin: 0;
  border-color: rgba(0,212,255,0.1);
  background: rgba(14,14,16,0.92);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 30px rgba(0,212,255,0.03);
}

.page-plan #info-panel .no-site {
  text-align: center;
  color: var(--muted);
  padding: 1rem 0;
}

.page-plan #info-panel .no-site a {
  color: var(--lunar-white);
  text-decoration: underline;
}

.page-plan #game-panel {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  background: rgba(14,14,16,0.85);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}

.page-plan #game-panel.hidden {
  display: none;
}

/* Stats Dashboard (right column) */
.stats-dashboard {
  position: sticky;
  top: 5rem;
  padding: 1.5rem;
  background: rgba(14,14,16,0.9);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: var(--radius);
  box-shadow: 0 12px 50px rgba(0,0,0,0.45), 0 0 30px rgba(0,212,255,0.03);
  backdrop-filter: blur(20px);
}

.stats-dashboard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,212,255,0.015) 1px, rgba(0,212,255,0.015) 2px);
  pointer-events: none;
}

.stats-dashboard.hidden {
  display: none;
}

.stats-dashboard h3 {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lunar-silver);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-dashboard h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,212,255,0.2), transparent);
}

.stats-metric-group {
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-metric-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.stats-group-title {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.stats-highlight {
  text-align: center;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.12);
}

.stats-highlight .highlight-value {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--lunar-white);
  line-height: 1;
  text-shadow: 0 0 30px rgba(0,212,255,0.15);
}

.stats-highlight .highlight-label {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.82rem;
}

.metric-label {
  color: var(--muted);
  flex: 0 0 auto;
}

.metric-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin: 0 0.6rem;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-bar-fill.good { background: var(--success); box-shadow: 0 0 6px rgba(126,231,135,0.4); }
.metric-bar-fill.warn { background: var(--warn); box-shadow: 0 0 6px rgba(250,204,21,0.4); }
.metric-bar-fill.bad { background: var(--danger); box-shadow: 0 0 6px rgba(255,123,123,0.4); }

.metric-value {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--lunar-white);
  flex: 0 0 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.metric-value.good { color: var(--success); }
.metric-value.warn { color: var(--warn); }
.metric-value.bad { color: var(--danger); }

/* Enhanced Decision Cards */
.page-plan .decision-list {
  gap: 1.2rem;
}

.page-plan .decision-card {
  position: relative;
  padding: 1.3rem 1.3rem 1.3rem 1.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.015);
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s;
}

/* Left edge status indicator */
.page-plan .decision-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: rgba(255,255,255,0.08);
  transition: background 0.35s, box-shadow 0.35s, top 0.35s, bottom 0.35s;
}

.page-plan .decision-card.active::before {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0,212,255,0.5), 0 0 20px rgba(0,212,255,0.2);
  top: 8%;
  bottom: 8%;
}

.page-plan .decision-card.active {
  border-color: rgba(0,212,255,0.18);
  background: rgba(0,212,255,0.03);
  box-shadow: 0 4px 30px rgba(0,212,255,0.06), inset 0 0 30px rgba(0,212,255,0.02);
}

.page-plan .decision-card.done::before {
  background: var(--success);
  box-shadow: 0 0 8px rgba(126,231,135,0.3);
}

.page-plan .decision-card.locked::before {
  background: rgba(255,255,255,0.04);
}

/* Connector between cards */
.page-plan .decision-card:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.5px;
  bottom: -1.35rem;
  width: 1px;
  height: 1.35rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  z-index: 0;
}

.page-plan .decision-card.done:not(:last-child)::after {
  background: linear-gradient(180deg, rgba(126,231,135,0.15), transparent);
}

.page-plan .decision-header {
  margin-bottom: 0.4rem;
}

.page-plan .decision-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.page-plan .decision-desc {
  font-size: 0.84rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
  color: var(--muted);
}

/* Enhanced option buttons */
.page-plan .option-list {
  gap: 0.6rem;
}

.page-plan .option-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.2s;
}

.page-plan .option-btn:hover:not(:disabled) {
  border-color: rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.04);
  transform: translateX(3px);
}

.page-plan .option-btn.selected {
  border-color: rgba(0,212,255,0.4);
  background: rgba(0,212,255,0.08);
  box-shadow: 0 0 20px rgba(0,212,255,0.08), inset 0 0 20px rgba(0,212,255,0.03);
}

.page-plan .option-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--lunar-white);
  flex: 0 0 auto;
}

.page-plan .option-hint {
  font-size: 0.76rem;
  color: var(--muted);
  flex: 1;
}

/* Site tag enhancement */
.page-plan .site-tag {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.page-plan .site-tag .dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0,212,255,0.6);
}

.page-plan .progress-tag {
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* Game panel inner title */
.page-plan .game-title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--lunar-silver);
}

.page-plan .game-subtitle {
  font-size: 0.76rem;
  line-height: 1.6;
}

/* Responsive tweaks */
@media (max-width: 1100px) {
  .plan-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .plan-right {
    border-left: none;
    padding-left: 0;
  }

  .stats-dashboard {
    position: relative;
    top: auto;
    order: -1;
  }

  .progress-pipeline {
    gap: 0;
    padding: 1rem 2vw 1.5rem;
  }

  .pipeline-label {
    font-size: 0.65rem;
  }

  .pipeline-connector {
    flex: 0 0 24px;
  }
}

@media (max-width: 768px) {
  .hero-text {
    bottom: auto;
    top: 6rem;
    left: 4vw;
    max-width: 90%;
  }

  #agent-chat {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .plan-header {
    padding: 6rem 4vw 2rem;
  }

  .plan-header h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .plan-header p {
    font-size: 0.85rem;
  }

  .plan-main {
    padding: 0 4vw 3rem;
  }

  .plan-content {
    gap: 1rem;
  }

  .progress-pipeline {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.8rem 1rem 1.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .progress-pipeline::-webkit-scrollbar { display: none; }

  .pipeline-node {
    flex: 0 0 auto;
  }

  .pipeline-dot {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .pipeline-label {
    font-size: 0.6rem;
    max-width: 50px;
    white-space: normal;
    line-height: 1.3;
  }

  .pipeline-connector {
    flex: 0 0 16px;
  }

  #game-panel,
  .page-plan #game-panel {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: none;
    max-height: none;
    border-radius: var(--radius);
  }

  .stats-dashboard {
    position: relative;
    top: auto;
  }

  .stats-highlight .highlight-value {
    font-size: 1.8rem;
  }
}

/* Hero CTA */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--lunar-white);
  font-size: 0.95rem;
  text-decoration: none;
  pointer-events: auto;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
}

.hero-cta:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,255,255,0.1);
}

.hero-cta-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.25));
}

.hero-cta-arrow {
  transition: transform 0.3s;
}

.hero-cta:hover .hero-cta-arrow {
  transform: translateX(4px);
}

.logo {
  text-decoration: none;
}

/* Menu page */
.page-menu {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.menu-header {
  padding: 8rem 4vw 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #1a1a1c 0%, #080808 70%);
}

.menu-header h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--lunar-white);
}

.menu-header h1 span {
  color: var(--lunar-gray);
}

.menu-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 4vw 4rem;
  flex: 1;
}

.menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.menu-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 16px 50px rgba(255,255,255,0.08);
}

.menu-card.featured {
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(14,14,16,0.78));
}

.menu-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--lunar-white), transparent 30%);
  opacity: 0;
  transition: opacity 0.4s;
  animation: rotate 6s linear infinite;
  pointer-events: none;
}

.menu-card:hover .menu-card-glow {
  opacity: 0.05;
}

.menu-card .menu-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.4rem;
}

.menu-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  color: var(--lunar-white);
}

.menu-card p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  flex: 1;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--lunar-gray);
  transition: color 0.25s, gap 0.25s;
}

.menu-card:hover .menu-link {
  color: var(--lunar-white);
  gap: 0.6rem;
}


/* Background Music Toggle */
.moon-music-toggle {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 110;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  color: var(--lunar-white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.moon-music-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
}

.moon-music-toggle .moon-music-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.moon-music-toggle .moon-music-wave {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  opacity: 0;
  transform: scale(0.85);
  animation: music-wave 1.6s ease-out infinite;
  pointer-events: none;
}

.moon-music-toggle.playing .moon-music-wave {
  opacity: 1;
}

@keyframes music-wave {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 768px) {
  .moon-music-toggle {
    left: 1rem;
    bottom: 1rem;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
}
