/* ============================================================
   Moonstable SMP — style.css
   Edited by Dark_Devil900
   ============================================================
   COLOR SYSTEM: expanded from the original 4-color palette into a full
   tint/shade scale per accent, so hovers/glows/borders have somewhere
   to go instead of reusing the exact same value everywhere. Still the
   same core identity (gold + teal + purple + green), just with depth.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-deep: #07091a;
  --bg-panel: #12162e;
  --bg-panel-hi: #1c2145;
  --bg-panel-hi2: #262c58;
  --line: rgba(143, 155, 220, 0.14);
  --line-bright: rgba(143, 155, 220, 0.32);

  --aurora-teal: #4fc3f7;
  --aurora-teal-dim: #2b7fa8;
  --aurora-teal-bright: #8fe0ff;

  --aurora-purple: #9c6ade;
  --aurora-purple-dim: #6a4a94;
  --aurora-purple-bright: #c9a3ff;

  --aurora-green: #69f0ae;
  --aurora-green-dim: #3a9c6f;

  --gold: #ffd700;
  --gold-dim: #b89400;
  --gold-bright: #ffe680;

  --text-hi: #f3f4fc;
  --text: #c3c8e6;
  --text-muted: #7d84ad;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg-deep); color: var(--text); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; position: relative; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--aurora-purple); color: var(--bg-deep); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Grain texture overlay (subtle, adds depth without a photo) ---------- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cursor-reactive aurora glow (signature interaction) ---------- */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 195, 247, 0.10), rgba(156, 106, 222, 0.06) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  transition: opacity 0.3s ease;
}
@media (max-width: 900px), (hover: none) {
  #cursor-glow { display: none; }
}

/* ---------- Scroll progress bar ---------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--aurora-green), var(--aurora-teal), var(--aurora-purple));
  z-index: 999;
  transition: width 0.1s linear;
}

#aurora-canvas { position: fixed; inset: 0; z-index: 0; opacity: 0.55; pointer-events: none; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(7, 9, 26, 0.72); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; }
.brand .moon { font-size: 1.3rem; filter: drop-shadow(0 0 8px var(--aurora-teal)); display: inline-block; animation: moon-glow 4s ease-in-out infinite; }
@keyframes moon-glow {
  0%, 100% { filter: drop-shadow(0 0 6px var(--aurora-teal)); transform: rotate(0deg); }
  50% { filter: drop-shadow(0 0 14px var(--aurora-purple)); transform: rotate(8deg); }
}
.nav-links { display: flex; gap: 26px; font-size: 0.9rem; color: var(--text-muted); }
.nav-links a { position: relative; padding: 4px 0; transition: color 0.2s ease; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -2px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-purple));
  transition: width 0.25s var(--ease-out), left 0.25s var(--ease-out);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--aurora-teal-bright); }
.nav-links a:hover::after { width: 100%; left: 0; }
.nav-cta { background: linear-gradient(135deg, var(--gold), #ffb347); color: #1a1400; font-weight: 600; padding: 9px 20px; border-radius: 999px; font-size: 0.88rem; transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease; position: relative; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255, 215, 0, 0.28); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 120px 0 90px; text-align: center; }
.hero .eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--aurora-teal); margin-bottom: 18px;
  opacity: 0; animation: fade-up 0.7s var(--ease-out) 0.1s forwards;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; line-height: 1.05;
  background: linear-gradient(120deg, var(--text-hi) 20%, var(--aurora-teal-bright) 45%, var(--aurora-purple-bright) 65%, var(--text-hi) 85%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fade-up 0.8s var(--ease-out) 0.2s forwards, shimmer 8s ease-in-out infinite 1s;
  opacity: 0;
}
@keyframes shimmer { 0%, 100% { background-position: 0% center; } 50% { background-position: 100% center; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero p.sub { max-width: 560px; margin: 22px auto 0; color: var(--text-muted); font-size: 1.08rem; opacity: 0; animation: fade-up 0.7s var(--ease-out) 0.35s forwards; }
.hero .actions { margin-top: 38px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; opacity: 0; animation: fade-up 0.7s var(--ease-out) 0.5s forwards; }

.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; padding: 13px 28px; border-radius: 999px;
  border: 1px solid var(--line); transition: transform 0.15s var(--ease-out), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; position: relative;
}
.btn-primary {
  background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-purple));
  color: #060812; border: none;
  box-shadow: 0 0 0 0 rgba(79, 195, 247, 0.4);
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 195, 247, 0.28); }
  50% { box-shadow: 0 0 0 8px rgba(79, 195, 247, 0); }
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 30px rgba(79, 195, 247, 0.3); animation-play-state: paused; }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--aurora-teal); color: var(--aurora-teal); transform: translateY(-2px); }

.ip-pill { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.9rem; background: var(--bg-panel); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; color: var(--aurora-green); cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease; opacity: 0; animation: fade-up 0.7s var(--ease-out) 0.65s forwards; }
.ip-pill:hover { border-color: var(--aurora-green); transform: translateY(-1px); }
.ip-pill .copied { color: var(--gold); display: none; }

/* ---------- Moon-phase divider ---------- */
.phase-divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 90px 0 46px; color: var(--text-muted); position: relative; z-index: 1; }
.phase-divider .line { flex: 1; max-width: 220px; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.phase-divider .icon { font-size: 1.4rem; transition: transform 0.4s var(--ease-out); }
.phase-divider:hover .icon { transform: rotate(20deg) scale(1.15); }
.phase-divider .label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }

section { position: relative; z-index: 1; padding-bottom: 20px; }
h2.section-title { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); text-align: center; margin-bottom: 12px; }
p.section-sub { text-align: center; color: var(--text-muted); max-width: 520px; margin: 0 auto 46px; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; transition: transform 0.25s var(--ease-out), border-color 0.25s ease, background 0.25s ease; }
.stat-card:hover { transform: translateY(-3px); border-color: var(--line-bright); background: var(--bg-panel-hi); }
.stat-card .value { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 500; color: var(--aurora-teal); }
.stat-card .label { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.rank-strip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 34px 0 10px; }
.rank-chip { font-family: var(--font-mono); font-size: 0.78rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-muted); transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.rank-chip:hover { border-color: var(--gold-dim); color: var(--gold-bright); transform: translateY(-2px); }

/* ---------- Store (3D tilt cards) ---------- */
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; perspective: 1200px; }
.key-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px;
  position: relative; overflow: hidden;
  transition: transform 0.15s ease-out, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.key-card:hover { border-color: var(--aurora-teal); box-shadow: 0 20px 50px -20px rgba(79, 195, 247, 0.35); }
.key-card .glow { position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%; filter: blur(50px); opacity: 0.35; transition: opacity 0.3s ease, transform 0.3s ease; }
.key-card:hover .glow { opacity: 0.55; transform: scale(1.2); }
.key-card.common .glow { background: var(--aurora-green); }
.key-card.rare .glow { background: var(--aurora-purple); }
.key-card.mystic .glow { background: var(--aurora-teal); }
.key-card.pvp .glow { background: #ff5c5c; }
.key-card.legendary .glow { background: var(--gold); }
.key-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 6px; }
.key-card .tier-tag { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.key-card ul { list-style: none; margin: 18px 0 22px; font-size: 0.88rem; color: var(--text-muted); }
.key-card ul li { margin-bottom: 7px; padding-left: 18px; position: relative; }
.key-card ul li::before { content: '◆'; position: absolute; left: 0; top: 0; font-size: 0.6rem; color: var(--aurora-teal); }
.key-card .price { font-family: var(--font-mono); font-size: 1.5rem; color: var(--text-hi); margin-bottom: 16px; }
.key-card .price span { font-size: 0.85rem; color: var(--text-muted); }
.key-card .buy-btn { display: block; width: 100%; text-align: center; padding: 11px; border-radius: 10px; background: var(--bg-panel-hi); border: 1px solid var(--line); font-weight: 600; font-size: 0.88rem; transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease; }
.key-card .buy-btn:hover { background: var(--aurora-teal); color: #060812; border-color: var(--aurora-teal); transform: translateY(-1px); }
.store-note { margin-top: 34px; text-align: center; font-size: 0.82rem; color: var(--text-muted); max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Changelog ---------- */
.changelog { max-width: 720px; margin: 0 auto; border-left: 2px solid var(--line); padding-left: 28px; }
.log-entry { position: relative; padding-bottom: 34px; transition: transform 0.2s ease; }
.log-entry:hover { transform: translateX(4px); }
.log-entry::before { content: ''; position: absolute; left: -34px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--aurora-teal); box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.15); transition: box-shadow 0.2s ease; }
.log-entry:hover::before { box-shadow: 0 0 0 6px rgba(79, 195, 247, 0.28); }
.log-entry .date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--aurora-teal); letter-spacing: 0.06em; }
.log-entry h4 { font-family: var(--font-display); font-size: 1.08rem; margin: 6px 0 8px; }
.log-entry p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 100px; padding: 44px 0 32px; text-align: center; color: var(--text-muted); font-size: 0.85rem; position: relative; z-index: 1; }
footer .foot-links { display: flex; gap: 22px; justify-content: center; margin-bottom: 18px; font-size: 0.85rem; flex-wrap: wrap; }
footer .foot-links a { transition: color 0.2s ease; }
footer .foot-links a:hover { color: var(--aurora-teal); }

/* ---------- Staggered scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); transition-delay: var(--reveal-delay, 0s); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hero { padding: 90px 0 60px; }
}

/* ============================================================
   Mobile nav drawer + hamburger
   ============================================================ */
.nav-burger { display: none; background: none; border: 1px solid var(--line); color: var(--text-hi); font-size: 1.1rem; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; transition: border-color 0.2s ease, transform 0.15s ease; }
.nav-burger:active { transform: scale(0.92); }
.mobile-drawer { display: none; flex-direction: column; gap: 4px; padding: 14px 24px 22px; background: rgba(7, 9, 26, 0.97); border-bottom: 1px solid var(--line); position: sticky; top: 68px; z-index: 49; }
.mobile-drawer a { padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 0.95rem; }
.mobile-drawer.open { display: flex; animation: fade-up 0.25s var(--ease-out); }
@media (max-width: 720px) { .nav-burger { display: inline-flex; align-items: center; justify-content: center; } }

/* ---------- Announcement banner ---------- */
.announce-bar { position: relative; z-index: 60; background: linear-gradient(90deg, var(--aurora-purple), var(--aurora-teal)); background-size: 200% auto; animation: shimmer 6s ease-in-out infinite; color: #05060f; font-weight: 600; font-size: 0.85rem; padding: 10px 20px; display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.announce-bar button { background: none; border: none; color: #05060f; font-size: 1.1rem; cursor: pointer; line-height: 1; }

/* ---------- Confirm modal ---------- */
.ms-modal-backdrop { position: fixed; inset: 0; background: rgba(5, 6, 15, 0.75); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 200; }
.ms-modal-backdrop.show { display: flex; animation: fade-up 0.2s var(--ease-out); }
.ms-modal { background: var(--bg-panel); border: 1px solid var(--line-bright); border-radius: var(--radius); padding: 28px; max-width: 360px; width: 90%; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6); }
.ms-modal p { font-size: 0.95rem; margin-bottom: 20px; color: var(--text-hi); }
.ms-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Skeleton loaders ---------- */
.skeleton { background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-panel-hi) 50%, var(--bg-panel) 75%); background-size: 200% 100%; animation: skeleton-sheen 1.4s ease-in-out infinite; border-radius: var(--radius); min-height: 200px; }
@keyframes skeleton-sheen { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Loading spinner ---------- */
.loading-spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- Focus states ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--aurora-teal); outline-offset: 2px; }

/* ---------- Forms ---------- */
.ms-form { max-width: 560px; margin: 0 auto; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.ms-form .field { margin-bottom: 18px; }
.ms-form label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.ms-form input, .ms-form textarea, .ms-form select { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-deep); color: var(--text-hi); font-family: var(--font-body); font-size: 0.9rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.ms-form input:focus, .ms-form textarea:focus, .ms-form select:focus { border-color: var(--aurora-teal); box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.12); outline: none; }
.ms-form textarea { min-height: 110px; resize: vertical; }
.ms-form .submit-status { margin-top: 14px; font-size: 0.85rem; display: none; }
.ms-form .submit-status.success { color: var(--aurora-green); display: block; }
.ms-form .submit-status.error { color: #ff8a8a; display: block; }

/* ---------- Rules list ---------- */
.rules-list { max-width: 640px; margin: 0 auto; }
.rule-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding-left 0.2s ease; }
.rule-item:hover { padding-left: 6px; }
.rule-item .num { font-family: var(--font-mono); color: var(--aurora-teal); font-weight: 600; min-width: 28px; }

/* ---------- Vote sites ---------- */
.vote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 760px; margin: 0 auto; }
.vote-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; transition: transform 0.2s var(--ease-out), border-color 0.2s ease; }
.vote-card:hover { transform: translateY(-3px); border-color: var(--aurora-purple); }
.vote-card h4 { font-family: var(--font-display); margin-bottom: 8px; }
.vote-card p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }

/* ---------- Crate odds table ---------- */
.odds-table { width: 100%; max-width: 640px; margin: 0 auto 50px; border-collapse: collapse; font-size: 0.9rem; }
.odds-table th, .odds-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.odds-table th { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.odds-table tbody tr { transition: background 0.2s ease; }
.odds-table tbody tr:hover { background: var(--bg-panel); }
.odds-table td.odds-val { font-family: var(--font-mono); color: var(--aurora-teal); }
.odds-table tr:last-child td { color: var(--gold); font-weight: 600; }
.odds-table tr:last-child { background: linear-gradient(90deg, rgba(255,215,0,0.06), transparent); }

/* ---------- Staff page ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 40px 0 80px; perspective: 1200px; }
.staff-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px; text-align: center; transition: transform 0.15s ease-out, border-color 0.25s ease, box-shadow 0.25s ease; }
.staff-card:hover { border-color: var(--aurora-teal); box-shadow: 0 20px 50px -20px rgba(79, 195, 247, 0.3); }
.staff-avatar { width: 64px; height: 64px; border-radius: 12px; margin: 0 auto 14px; image-rendering: pixelated; border: 1px solid var(--line); transition: transform 0.3s var(--ease-out); }
.staff-card:hover .staff-avatar { transform: scale(1.08) rotate(-2deg); }
.staff-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 6px; }
.staff-rank { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); background: rgba(255, 215, 0, 0.1); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.staff-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent); color: var(--text-hi); font-size: 0.8rem; padding: 20px 12px 10px; }

/* ---------- Top Players ---------- */
.tops-list { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.top-row { display: flex; align-items: center; gap: 14px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; transition: transform 0.2s ease, border-color 0.2s ease; }
.top-row:hover { transform: translateX(4px); border-color: var(--gold-dim); }
.top-rank { font-family: var(--font-mono); color: var(--gold); font-weight: 600; width: 28px; }
.top-avatar { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; }
.top-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
.top-stat { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed; bottom: 24px; left: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-panel); border: 1px solid var(--line); color: var(--aurora-teal); font-size: 1.2rem;
  cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out), border-color 0.2s ease;
  z-index: 40;
}
#back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { border-color: var(--aurora-teal); transform: translateY(-3px); }
@media (max-width: 640px) {
  #back-to-top { bottom: 100px; left: 16px; width: 40px; height: 40px; font-size: 1.05rem; }
}

/* ============================================================
   Admin panel
   ============================================================ */
.admin-shell { max-width: 1040px; margin: 0 auto; padding: 40px 24px 100px; position: relative; z-index: 1; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-family: var(--font-display); font-size: 1.6rem; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-tab { font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); color: var(--text-muted); cursor: pointer; background: var(--bg-panel); transition: all 0.2s ease; }
.admin-tab:hover { border-color: var(--line-bright); color: var(--text); }
.admin-tab.active { color: var(--bg-deep); background: var(--aurora-teal); border-color: var(--aurora-teal); }
.admin-panel-view { display: none; }
.admin-panel-view.active { display: block; animation: fade-up 0.3s var(--ease-out); }

.admin-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; transition: border-color 0.2s ease; }
.admin-card:hover { border-color: var(--line-bright); }
.admin-card .row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-card .row > * { flex: 1; min-width: 140px; }
.admin-card label { display: block; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-card input, .admin-card textarea, .admin-card select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-deep); color: var(--text-hi); font-family: var(--font-body); font-size: 0.88rem; transition: border-color 0.2s ease; }
.admin-card input:focus, .admin-card textarea:focus { border-color: var(--aurora-teal); outline: none; }
.admin-card textarea { min-height: 70px; resize: vertical; }
.admin-card .card-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.admin-btn { font-size: 0.82rem; font-weight: 600; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; background: var(--bg-panel-hi); color: var(--text); transition: filter 0.15s ease, transform 0.15s ease; }
.admin-btn.primary { background: var(--aurora-teal); color: var(--bg-deep); border-color: var(--aurora-teal); }
.admin-btn.danger { color: #ff8a8a; border-color: rgba(255, 92, 92, 0.35); }
.admin-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.admin-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.admin-add-bar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.admin-empty { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 0.9rem; }
.save-toast { position: fixed; bottom: 24px; right: 24px; background: var(--aurora-green); color: var(--bg-deep); padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 0.86rem; opacity: 0; transform: translateY(10px); transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out); pointer-events: none; z-index: 100; }
.save-toast.show { opacity: 1; transform: translateY(0); }

.settings-toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.settings-toggle input[type="checkbox"] { width: auto; }
.export-box textarea { min-height: 140px; font-family: var(--font-mono); font-size: 0.78rem; }
.app-status-pill { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.app-status-pill.pending { background: rgba(255,215,0,0.12); color: var(--gold); }
.app-status-pill.approved { background: rgba(105,240,174,0.12); color: var(--aurora-green); }
.app-status-pill.denied { background: rgba(255,92,92,0.12); color: #ff8a8a; }

/* ---------- Edit-on-admin hint buttons ---------- */
.edit-hint { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 10px; border-radius: 6px; background: var(--bg-panel-hi); border: 1px solid var(--line); color: var(--gold); font-size: 0.8rem; cursor: pointer; vertical-align: middle; transition: transform 0.15s ease, border-color 0.2s ease; }
.edit-hint:hover { border-color: var(--gold); transform: scale(1.1) rotate(-8deg); }

/* ---------- Custom scrollbar (webkit) ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-panel-hi2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--aurora-teal-dim); }

/* ---------- Reduced motion: respect the setting for everything above ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
