/* ── Google Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Share+Tech+Mono&family=Orbitron:wght@700;900&display=swap');

/* ── CSS Variables ────────────────────────────────────────────────────── */
:root {
  --bg:      #060d18;
  --bg2:     #0a1220;
  --bg3:     #0f1a2e;
  --card:    #0c1526;
  --border:  #1a2e48;
  --accent:  #00e5ff;
  --gold:    #ffd700;
  --red:     #ff4757;
  --green:   #00e676;
  --text:    #e8f8ff;
  --muted:   #4a7a9a;
  --dim:     #2a4a6a;

  --font:    'Rajdhani', sans-serif;
  --mono:    'Share Tech Mono', monospace;
  --orb:     'Orbitron', sans-serif;

  --radius:  10px;
  --radius-sm: 6px;
  --shadow:  0 4px 24px rgba(0,0,0,0.5);
  --glow:    0 0 16px rgba(0,229,255,0.25);
  --glow-g:  0 0 16px rgba(0,230,118,0.25);
  --glow-r:  0 0 16px rgba(255,71,87,0.25);
}

/* ── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Typography ───────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font); font-weight: 700; letter-spacing: 0.5px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility Classes ──────────────────────────────────────────────────── */
.relative  { position: relative; }
.z1        { position: relative; z-index: 1; }
.flex      { display: flex; }
.flex-col  { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1     { gap: 8px; }
.gap-2     { gap: 16px; }
.gap-3     { gap: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.font-mono   { font-family: var(--mono); }
.uppercase   { text-transform: uppercase; letter-spacing: 2px; }
.w-full      { width: 100%; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { box-shadow: var(--glow); background: #33eaff; }

.btn-gold {
  background: var(--gold);
  color: var(--bg);
}
.btn-gold:hover { box-shadow: 0 0 16px rgba(255,215,0,0.35); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-sm { padding: 7px 14px; font-size: 0.9rem; }
.btn-lg { padding: 14px 32px; font-size: 1.15rem; }

/* ── Card ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card:hover { border-color: var(--dim); }

/* ── Badge ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge-tech    { background: rgba(0,229,255,0.15); color: var(--accent); border: 1px solid rgba(0,229,255,0.3); }
.badge-general { background: rgba(255,215,0,0.15); color: var(--gold);   border: 1px solid rgba(255,215,0,0.3); }
.badge-extra   { background: rgba(255,71,87,0.15); color: var(--red);    border: 1px solid rgba(255,71,87,0.3); }
.badge-easy    { background: rgba(0,230,118,0.15); color: var(--green);  border: 1px solid rgba(0,230,118,0.3); }
.badge-medium  { background: rgba(255,215,0,0.12); color: var(--gold);   border: 1px solid rgba(255,215,0,0.25); }
.badge-hard    { background: rgba(255,71,87,0.12); color: var(--red);    border: 1px solid rgba(255,71,87,0.25); }

/* ── Top Navigation ───────────────────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,13,24,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topnav-brand {
  font-family: var(--orb);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
}
.topnav-brand:hover { text-decoration: none; color: #33eaff; }
.topnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.callsign {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 2px;
}

/* ── Page wrapper ─────────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

/* ── Section header ───────────────────────────────────────────────────── */
.section-label {
  font-family: var(--orb);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ── Progress bar ─────────────────────────────────────────────────────── */
.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Loading spinner ──────────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fade/slide animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-up  { animation: fadeUp 0.25s ease both; }
.fade-in  { animation: fadeIn 0.2s ease both; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page { padding: 20px 12px 60px; }
  .card { padding: 16px; }
  .btn-lg { padding: 12px 22px; font-size: 1rem; }
  .topnav { padding: 0 12px; }
  .callsign { display: none; }
}
