/* ═══════════════════════════════════════════════════════════════
   Slay the Spire 2 Tier List — Shared Site CSS
   Fonts: Cinzel (headings) · Rajdhani (body) · Orbitron (data/labels)
═══════════════════════════════════════════════════════════════ */

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

/* ─── CSS VARIABLES ──────────────────────────────────────────── */
:root {
  --bg:       #06080e;
  --surface:  #0b0e18;
  --surf2:    #111520;
  --surf3:    #171d2c;
  --border:   #1e2638;
  --border2:  #263044;
  --text:     #c8d6f0;
  --text2:    #7f93b8;
  --muted:    #3d4d68;
  --accent:   #4f8ef7;
  --gold:     #f0c040;
  --red:      #dc2626;
  --s:  #dc2626; --sg:  rgba(220,38,38,.18);
  --a:  #ea7c1a; --ag:  rgba(234,124,26,.16);
  --b:  #d4a017; --bg2: rgba(212,160,23,.14);
  --c:  #16a34a; --cg:  rgba(22,163,74,.14);
  --d:  #2563eb; --dg:  rgba(37,99,235,.16);
  --font-body: 'Rajdhani', sans-serif;
  --font-head: 'Cinzel', serif;
  --font-data: 'Orbitron', monospace;
}

/* ─── BASE ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 140% 70% at 50% -15%, rgba(220,38,38,.08) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(79,142,247,.04) 0%, transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hex grid overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'%3E%3Cpath d='M30 2L58 17v18L30 50 2 35V17z' fill='none' stroke='rgba(79,142,247,0.03)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  pointer-events: none;
  z-index: 0;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
header {
  background: rgba(6,8,14,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(220,38,38,.25);
  padding: 0 48px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky; top: 0; z-index: 500;
  box-shadow: 0 2px 40px rgba(0,0,0,.9), 0 1px 0 rgba(220,38,38,.15);
}

header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(220,38,38,.5) 20%,
    rgba(240,192,64,.4) 50%,
    rgba(79,142,247,.4) 80%,
    transparent 100%);
  animation: headerLine 4s ease-in-out infinite alternate;
}
@keyframes headerLine { 0%{opacity:.4} 100%{opacity:1} }

/* ─── LOGO ───────────────────────────────────────────────────── */
.logo {
  font-family: var(--font-head);
  font-weight: 900; font-size: 15px;
  letter-spacing: 2px; text-transform: uppercase;
  color: #fff;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; text-decoration: none;
}
.logo em { color: var(--gold); font-style: normal; }

.logo-gem {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #c0392b 0%, #f39c12 60%, #f0c040 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 22px rgba(240,192,64,.5), 0 0 8px rgba(220,38,38,.4);
  flex-shrink: 0; position: relative; overflow: hidden;
}
.logo-gem::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.25) 0%, transparent 60%);
}

/* ─── DESKTOP NAV ────────────────────────────────────────────── */
.desktop-nav { display: flex; gap: 6px; flex-shrink: 0; }

.nav-btn {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--text2); text-decoration: none;
  padding: 7px 16px; border-radius: 7px;
  border: 1px solid var(--border);
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.nav-btn:link, .nav-btn:visited { color: var(--text2); }
.nav-btn:hover { color: #fff; border-color: var(--border2); background: var(--surf2); }
.nav-btn.active-nav {
  border-color: rgba(240,192,64,.4);
  background: rgba(240,192,64,.07);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(240,192,64,.1);
}

/* ─── HAMBURGER BUTTON ───────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 1px solid var(--border2); border-radius: 8px;
  padding: 8px 10px; cursor: pointer; flex-shrink: 0; z-index: 600;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE MENU ────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed; top: 68px; left: 0; right: 0;
  background: rgba(6,8,14,0.98);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border2);
  flex-direction: column;
  z-index: 499;
  padding: 8px 16px 16px; gap: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.8);
}
.mobile-menu.open { display: flex; }

.mobile-menu a,
.mobile-menu a:link,
.mobile-menu a:visited {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 700; letter-spacing: .5px;
  color: var(--text); text-decoration: none;
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.mobile-menu a:hover { background: var(--surf2); border-color: var(--border2); color: #fff; }
.mobile-menu a.active-mobile {
  color: var(--gold);
  border-color: rgba(240,192,64,.2);
  background: rgba(240,192,64,.04);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  position: relative; z-index: 1;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700;
  color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase;
}
.footer-logo em { color: var(--gold); font-style: normal; }

.footer-right {
  font-family: var(--font-data);
  font-size: 10px; color: var(--muted);
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}
.footer-right span:first-child {
  color: var(--gold); font-size: 9px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
}

.footer-links { display: flex; gap: 16px; margin-top: 6px; }
.footer-links a,
.footer-links a:link,
.footer-links a:visited {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  letter-spacing: .3px; transition: color .15s;
}
.footer-links a:hover { color: var(--gold); }

/* ─── TIER COLORS (shared across pages) ─────────────────────── */
.tier-row[data-tier="S"] { border-color: var(--s); }
.tier-row[data-tier="A"] { border-color: var(--a); }
.tier-row[data-tier="B"] { border-color: var(--b); }
.tier-row[data-tier="C"] { border-color: var(--c); }
.tier-row[data-tier="D"] { border-color: var(--d); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── UTILITY ────────────────────────────────────────────────── */
.z1 { position: relative; z-index: 1; }

/* ─── RESPONSIVE: SHARED BREAKPOINTS ────────────────────────── */
@media (max-width: 900px) {
  header { padding: 0 20px; }
  footer  { padding: 20px; }
}

@media (max-width: 480px) {
  header { padding: 0 16px; height: 56px; gap: 10px; }
  .logo { font-size: 11px; gap: 8px; }
  .logo-gem { width: 28px; height: 28px; font-size: 13px; border-radius: 7px; }
  .desktop-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { top: 56px; }
  footer { padding: 16px; flex-direction: column; align-items: flex-start; }
  .footer-right { align-items: flex-start; }
}
