/* === Velocity Arena Interactive — Shared Styles === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

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

:root {
  /* VA Brand Colors */
  --bg: #0D0D1A;
  --card: #161A2E;
  --active: #1E2240;
  --cyan: #00E5FF;
  --teal: #007A99;
  --slate: #8899AA;
  --white: #FFFFFF;
  --orange: #CC7700;
  --green: #44CC88;
  --red: #FF4466;

  /* Semantic */
  --text-primary: var(--white);
  --text-secondary: var(--slate);
  --accent: var(--cyan);
  --accent-dim: rgba(0, 229, 255, 0.15);
  --success: var(--green);
  --warning: var(--orange);

  /* Typography */
  --font: 'DM Sans', sans-serif;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms;
  --t-med: 350ms;
  --t-slow: 600ms;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  overflow-x: hidden;
}

/* === SITE BANNER === */
.site-banner {
  background: #2B2D42;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-banner a { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.site-banner .logo-text { font-size: 13px; font-weight: 800; color: #fff; letter-spacing: .08em; text-transform: uppercase; }
.site-banner .logo-sub { font-size: 11px; font-weight: 400; color: rgba(255,255,255,.7); letter-spacing: .04em; }
.site-banner .back-btn {
  font-size: 12px; font-weight: 600; color: #fff; text-decoration: none;
  border: 1.5px solid rgba(255,255,255,.3); padding: 7px 12px; border-radius: 4px;
  transition: border-color .15s;
}
.site-banner .back-btn:hover { border-color: #fff; }

/* === NAV BAR === */
.nav-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--card);
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  color: var(--cyan);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: var(--sp-2);
}
.nav-brand svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--white); background: var(--active); }
.nav-links a.active {
  color: var(--cyan);
  background: var(--accent-dim);
}
.nav-links a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* === PAGE LAYOUT === */
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) var(--sp-12);
}

/* === TITLE BAR === */
.title-bar {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.title-bar .concept-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--accent-dim);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-3);
}
.title-bar h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
}
.title-bar .subtitle {
  font-size: 14px;
  color: var(--slate);
  margin-top: var(--sp-2);
}

/* === SECTION CARDS === */
.section-card {
  background: var(--card);
  border: 1px solid rgba(0, 229, 255, 0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}
.section-card .section-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--sp-5);
}
.section-card .section-label .icon {
  width: 24px; height: 24px;
  background: var(--accent-dim);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* === SLIDERS === */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.slider-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.slider-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  min-width: 80px;
  text-align: right;
}
.slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--active);
  outline: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
  transition: transform var(--t-fast) var(--ease);
}
.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}
.slider-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
  min-width: 50px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* === FORMULA DISPLAY === */
.formula-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--active);
  border-radius: var(--r-md);
  margin-top: var(--sp-5);
  flex-wrap: wrap;
}
.formula-display .num {
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem);
  font-weight: 800;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.formula-display .op {
  font-size: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  font-weight: 600;
  color: var(--slate);
}
.formula-display .result {
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem);
  font-weight: 800;
  color: var(--green);
}
.formula-display .unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
}

/* === KEY WORD BADGE === */
.keyword-badge {
  display: inline-block;
  font-size: clamp(1rem, 0.8rem + 1vw, 1.4rem);
  font-weight: 800;
  color: var(--cyan);
  border: 2px solid var(--cyan);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  letter-spacing: 0.05em;
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, 0.2); }
  50% { box-shadow: 0 0 24px rgba(0, 229, 255, 0.5); }
}

/* === STEP-BY-STEP === */
.steps-container {
  position: relative;
  min-height: 200px;
}
.step {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
  animation: fadeSlideIn var(--t-med) var(--ease);
}
.step.active { display: flex; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-visual {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.step-text {
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.1rem);
  font-weight: 500;
  color: var(--white);
  max-width: 420px;
}
.step-text strong {
  color: var(--cyan);
  font-weight: 800;
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
.step-dots {
  display: flex;
  gap: var(--sp-2);
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--active);
  transition: all var(--t-fast) var(--ease);
}
.step-dot.active { background: var(--cyan); transform: scale(1.3); }
.step-dot.done { background: var(--teal); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast) var(--ease);
}
.btn-primary {
  background: var(--cyan);
  color: var(--bg);
}
.btn-primary:hover { background: #33EBFF; transform: translateY(-1px); }
.btn-secondary {
  background: var(--active);
  color: var(--slate);
}
.btn-secondary:hover { color: var(--white); background: #252a48; }

/* === TRY IT === */
.try-it-card {
  background: linear-gradient(135deg, var(--card), var(--active));
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.try-it-card .section-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: var(--sp-5);
}
.try-it-prompt {
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: var(--sp-5);
  line-height: 1.5;
}
.try-it-input-row {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
}
.try-it-input-row input[type="number"],
.try-it-input-row input[type="text"] {
  width: 120px;
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg);
  border: 2px solid var(--active);
  border-radius: var(--r-md);
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
  text-align: center;
  outline: none;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast) var(--ease);
}
.try-it-input-row input:focus {
  border-color: var(--cyan);
}
.btn-check {
  background: var(--orange);
  color: var(--bg);
  padding: var(--sp-2) var(--sp-6);
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast) var(--ease);
}
.btn-check:hover { background: #e68a00; transform: translateY(-1px); }

.feedback {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  display: none;
}
.feedback.correct {
  display: block;
  background: rgba(68, 204, 136, 0.15);
  color: var(--green);
  border: 1px solid rgba(68, 204, 136, 0.3);
}
.feedback.incorrect {
  display: block;
  background: rgba(255, 68, 102, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 68, 102, 0.3);
}

/* === CELEBRATION ANIMATION === */
@keyframes celebratePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.celebrate { animation: celebratePop 0.4s var(--ease); }

@keyframes confettiDrop {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(60px) rotate(360deg); opacity: 0; }
}

/* === TRACK / BOT === */
.track-container {
  position: relative;
  width: 100%;
  height: 80px;
  background: var(--active);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: var(--sp-4);
}
.track-line {
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transform: translateY(-50%);
  border-radius: 2px;
}
.track-ticks {
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
}
.track-ticks span {
  width: 2px; height: 10px;
  background: var(--teal);
  border-radius: 1px;
  opacity: 0.5;
}

/* Bot icon */
.bot-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  transition: left var(--t-slow) var(--ease);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .page-container { padding: var(--sp-4) var(--sp-3) var(--sp-8); }
  .section-card { padding: var(--sp-4); }
  .try-it-card { padding: var(--sp-4); }
  .slider-row { flex-wrap: wrap; gap: var(--sp-2); }
  .slider-row label { min-width: 60px; font-size: 12px; }
  .formula-display { padding: var(--sp-3); gap: var(--sp-2); }
  .nav-brand span { display: none; }
}


