/* ═══════════════════════════════════════════════════════════
   CS MALTA — Shared Design System
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Barlow:wght@400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #09090c;
  --surf:      #0f1014;
  --surf2:     #16181f;
  --surf3:     #1c1f28;
  --border:    #1e2130;
  --border2:   #272b3a;
  --accent:    #f97316;
  --accent-d:  #c45a0c;
  --accent-g:  rgba(249,115,22,0.12);
  --text:      #e2e5f0;
  --muted:     #636880;
  --dim:       #383c4e;

  --gold:      #f5c542;
  --silver:    #aab4c4;
  --bronze:    #c07940;

  --c10: #f97316;
  --c9:  #f97316;
  --c8:  #fb923c;
  --c7:  #fdba74;
  --c6:  #fdba74;
  --c5:  #fcd34d;
  --c4:  #fcd34d;
  --c3:  #d4a85a;
  --c2:  #b8956e;
  --c1:  #636880;

  --font-cond: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;

  --radius:    10px;
  --radius-lg: 14px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Background ─────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(#1e2130 1px, transparent 1px),
    linear-gradient(90deg, #1e2130 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.2;
}
.bg-glow {
  position: fixed; top: -300px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse, rgba(249,115,22,0.07) 0%, transparent 65%);
}

/* ── Nav ─────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9,9,12,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-flag { font-size: 1.3rem; }

.nav-logo-text {
  font-family: var(--font-cond);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo-text span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover       { color: var(--text); background: var(--surf2); }
.nav-links a.active      { color: var(--accent); }

.nav-ext {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.nav-ext-link {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.nav-ext-link.discord {
  background: rgba(88,101,242,0.12);
  color: #7289da;
  border: 1px solid rgba(88,101,242,0.2);
}
.nav-ext-link.discord:hover {
  background: rgba(88,101,242,0.2);
  box-shadow: 0 0 12px rgba(88,101,242,0.2);
}



/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: background 0.15s;
}
.nav-toggle:hover span { background: var(--text); }

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

/* ── Section heading ────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-family: var(--font-cond);
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.section-heading .accent-line {
  flex: 1;
  height: 1px;
  background: var(--border2);
}

.section-heading a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.section-heading a:hover { color: var(--accent); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surf);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #fb923c;
  box-shadow: 0 0 20px rgba(249,115,22,0.35);
}

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

/* ── Badge / pill ───────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid var(--border2);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ELO level colours ──────────────────────────────────── */
.elo-val { font-family: var(--font-cond); font-size: 1rem; font-weight: 700; }
.level-10 { color: var(--c10); }
.level-9  { color: var(--c9);  }
.level-8  { color: var(--c8);  }
.level-7  { color: var(--c7);  }
.level-6  { color: var(--c6);  }
.level-5  { color: var(--c5);  }
.level-4  { color: var(--c4);  }
.level-3  { color: var(--c3);  }
.level-2  { color: var(--c2);  }
.level-1  { color: var(--c1);  }

/* ── Badge img ──────────────────────────────────────────── */
.badge-img {
  width: 28px; height: 28px; display: block;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive nav ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-ext    { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    background: var(--surf);
    border-bottom: 1px solid var(--border2);
    padding: 12px 16px;
    gap: 2px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 0.95rem; }

  .page-content { padding: 0 14px 60px; }

  /* Tables: allow horizontal scroll on small screens */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 420px; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 14px; }
  .page-content { padding: 0 12px 48px; }
}

/* ── Fade-in animation ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.45s ease both; }
.fade-up-2 { animation: fadeUp 0.45s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.45s 0.2s ease both; }
.fade-up-4 { animation: fadeUp 0.45s 0.3s ease both; }
