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

html { scroll-behavior: smooth; }

:root {
  --bg: #05070f;
  --panel: #0b0e1a;
  --panel-raised: #10141f;
  --border: #1c2233;
  --rose: #e88ba3;
  --neutral: #6b7595;
  --text: #e8ebf5;
  --text-dim: #8a90a8;
  --gold: #ffd54f;
  --silver: #c9ced8;
  --bronze: #cd7f32;
  --danger: #ff5f6d;
  --good: #4ade80;
}

* { box-sizing: border-box; }

body {
  background: #05070f;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  margin: 0;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Real lobby screenshot, pre-blurred at the image level. Fixed so it doesn't scroll
   with content. Overlay is deliberately lighter than a first attempt that made the
   photo nearly invisible - readable text matters more, but the photo should still
   actually be visible, not just theoretically present. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/assets/lobby-bg.jpg') center center / cover no-repeat;
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.6);
  z-index: -1;
}

h1, h2, h3, .display, .big-number {
  font-family: 'Teko', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
  /* Flat solid color text - no gradient text, that's the generic-AI tell to avoid */
  color: var(--text);
}

.mono, .stat-value, code {
  font-family: 'JetBrains Mono', monospace;
}

a { color: var(--rose); text-decoration: none; }

/* --- Layout shell --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 2px solid var(--border);
  background: var(--panel);
  /* Flat repeating stripe for texture - deliberately not a blurred gradient */
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(79,140,255,0.03) 18px 19px);
}
.topbar .brand {
  font-family: 'Teko', sans-serif;
  font-size: 32px;
  letter-spacing: 1px;
  color: var(--rose);
}
.topbar .brand:hover { color: #6d9fff; }
.topbar .user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
}
.topbar img.avatar {
  width: 32px; height: 32px;
  /* Sharp-ish corners everywhere, deliberately not fully round avatars */
  border-radius: 4px;
  border: 2px solid var(--border);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
  animation: pageFadeIn 0.4s ease;
  flex: 1 0 auto;
  width: 100%;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Category tab strip (pvphq-style layout, our own colors) --- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: 'Teko', sans-serif;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.tab svg { stroke: var(--text-dim); transition: stroke 0.12s; }
.tab.active { color: var(--text); border-bottom-color: var(--rose); }
.tab.active svg { stroke: var(--rose); }
.tab:hover:not(.active) { color: var(--text); }
.tab:hover:not(.active) svg { stroke: var(--text); }

/* --- Podium (top 3), flat solid cards, no blur/gradient --- */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 16px;
  margin-bottom: 40px;
}
.podium-card {
  background: var(--panel-raised);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
  position: relative;
  transition: transform 0.15s;
}
.podium-card:hover { transform: translateY(-4px); }
.podium-card.rank-1 {
  border-color: var(--gold);
  padding-top: 32px;
  padding-bottom: 32px;
  animation: goldPulse 2.4s ease-in-out infinite;
}
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--gold), 0 0 20px -6px var(--gold); }
  50% { box-shadow: 0 0 0 1px var(--gold), 0 0 32px -4px var(--gold); }
}
.podium-card.rank-2 { border-color: var(--silver); }
.podium-card.rank-3 { border-color: var(--bronze); }

.rank-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Teko', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 12px;
  color: #05070f;
}
.rank-1 .rank-circle { background: var(--gold); }
.rank-2 .rank-circle { background: var(--silver); }
.rank-3 .rank-circle { background: var(--bronze); }

.podium-card img.skin {
  width: 64px; height: 128px;
  image-rendering: pixelated;
  margin-bottom: 10px;
}
.podium-card .name {
  font-family: 'Teko', sans-serif;
  font-size: 26px;
  letter-spacing: 0.3px;
}
.podium-card .stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--neutral);
  font-size: 15px;
  margin-top: 6px;
}
.podium-card .stat svg { stroke: var(--neutral); }

/* --- Flat scoreboard rows for rank 4+ --- */
.board-row {
  display: grid;
  grid-template-columns: 40px 40px 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 16px;
  margin-bottom: 6px;
  transition: border-color 0.12s, background 0.12s;
}
.board-row:hover { border-color: var(--neutral); background: var(--panel-raised); }
.board-row .rank {
  font-family: 'Teko', sans-serif;
  font-size: 22px;
  color: var(--text-dim);
}
.board-row img.head { width: 28px; height: 28px; image-rendering: pixelated; border-radius: 3px; }
.board-row .name { font-weight: 600; }
.board-row .stat {
  display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; color: var(--neutral);
}
.board-row .stat svg { stroke: var(--neutral); }

/* --- Stat cards (profile page) --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.stat-card {
  background: rgba(16, 20, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 139, 163, 0.3);
}
.stat-card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.stat-card .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 600;
}

.bar-track {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  height: 18px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--neutral); /* flat solid, no gradient fill */
}
.bar-fill.purple { background: var(--rose); }

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}
.login-screen h1 { font-size: 56px; color: var(--rose); }
.btn {
  font-family: 'Teko', sans-serif;
  font-size: 20px;
  letter-spacing: 0.5px;
  background: var(--rose);
  color: #05070f;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px -4px rgba(232, 139, 163, 0.5); }
.btn:active { transform: translateY(0); }
.btn:hover { background: #6d9fff; }
.btn.purple { background: var(--rose); }

/* ===================================================================
   Responsive — phones and small tablets. The podium especially needs
   real changes here, not just smaller text: 3 fixed columns genuinely
   don't fit a phone screen without this.
   =================================================================== */
@media (max-width: 720px) {
  .container { padding: 16px; }

  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .topbar .brand { font-size: 26px; }
  .topbar .user { font-size: 13px; }

  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; margin-bottom: 20px; }
  .tab { padding: 10px 14px; font-size: 17px; white-space: nowrap; flex-shrink: 0; }

  /* Stack the podium into a single column, in rank order (1, 2, 3) rather than
     the visual "2nd-1st-3rd" arrangement that only makes sense side-by-side. */
  .podium {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .podium-card.rank-1 { order: -1; padding-top: 20px; padding-bottom: 20px; }
  .podium-card img.skin { width: 48px; height: 96px; }
  .podium-card .name { font-size: 20px; }

  .board-row {
    grid-template-columns: 28px 24px 1fr auto;
    gap: 10px;
    padding: 8px 12px;
  }
  .board-row .stat { font-size: 14px; }

  .login-screen h1 { font-size: 40px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card .value { font-size: 18px; }
}

/* ===================================================================
   Icon/text alignment fix — inline <svg> defaults to baseline
   alignment (like a text character with descender space beneath it),
   which is what actually caused icons to look offset next to text.
   Forcing them into a flex row with vertical centering fixes it
   everywhere at once rather than patching each spot separately.
   =================================================================== */
.stat-icon, .stat-icon svg {
  display: inline-flex;
  align-items: center;
}
.tab, .podium-card .stat, .board-row .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.podium-card .stat, .board-row .stat { justify-content: center; }
.board-row .stat { justify-content: flex-end; }

/* Sparse podium (fewer than 3 players) — center what's real instead of
   stretching one card across empty grid columns. */
.podium.podium-sparse {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.podium.podium-sparse .podium-card { max-width: 260px; }

/* ===================================================================
   Home / welcome page — trailer placeholder + navigation cards
   =================================================================== */
.trailer-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  /* Flat diagonal stripe texture, same technique as the topbar - not a blur/gradient */
  background-image: repeating-linear-gradient(135deg, transparent 0 24px, rgba(139,111,232,0.04) 24px 25px);
}
.trailer-box-inner { text-align: center; }
.coming-soon-badge {
  display: inline-block;
  font-family: 'Teko', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--rose);
  border: 2px solid var(--rose);
  border-radius: 4px;
  padding: 8px 24px;
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.nav-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s;
}
.nav-card:hover { border-color: var(--neutral); transform: translateY(-2px); }
.nav-card-title {
  font-family: 'Teko', sans-serif;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 4px;
}
.nav-card-sub { color: var(--text-dim); font-size: 14px; }

@media (max-width: 720px) {
  .trailer-box { margin-bottom: 20px; }
  .coming-soon-badge { font-size: 18px; padding: 6px 16px; }
}

/* ===================================================================
   Rules page
   =================================================================== */
.rule-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(16, 20, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.rule-item:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 139, 163, 0.3);
}
.rule-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--neutral);
  color: #05070f;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Teko', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.rule-title { font-family: 'Teko', sans-serif; font-size: 22px; margin-bottom: 4px; }
.rule-body { color: var(--text-dim); margin: 0; line-height: 1.5; }

.staff-notice {
  margin-top: 24px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--neutral);
  border-radius: 4px;
}
.staff-notice-title {
  font-family: 'Teko', sans-serif;
  font-size: 20px;
  color: var(--neutral);
}

/* ===================================================================
   Tier/rank badges — matches the bot's exact ore-tier system
   =================================================================== */
.tier-badge {
  display: inline-block;
  font-family: 'Teko', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6); /* keeps text readable on the lighter tiers too */
  padding: 3px 10px;
  border-radius: 3px;
}

/* ===================================================================
   Player search
   =================================================================== */
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.search-input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
}
.search-input:focus { outline: none; border-color: var(--neutral); }
.search-result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 32px;
}

@media (max-width: 720px) {
  .search-row { flex-direction: column; }
}

/* ===================================================================
   Gamemode tutorial steps
   =================================================================== */
.tutorial-step {
  display: flex;
  gap: 16px;
  padding: 20px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(16, 20, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.tutorial-step:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 139, 163, 0.3);
}
.tutorial-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--neutral);
  color: #05070f;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Teko', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.tutorial-title { font-family: 'Teko', sans-serif; font-size: 22px; margin-bottom: 4px; }
.tutorial-body { color: var(--text-dim); margin: 0; line-height: 1.5; }

/* ===================================================================
   Home page hero + event banner + edit mode — more visual presence
   =================================================================== */
.hero-bg {
  background:
    radial-gradient(ellipse 800px 400px at 20% -10%, rgba(79,140,255,0.12), transparent),
    radial-gradient(ellipse 600px 400px at 90% 10%, rgba(139,111,232,0.10), transparent);
  padding-top: 8px;
}
.hero-title {
  font-size: 56px;
  margin-bottom: 4px;
  color: var(--text);
}

.event-banner {
  background: rgba(16, 20, 31, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--rose);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  animation: rosePulse 2.6s ease-in-out infinite;
}
@keyframes rosePulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--rose), 0 0 18px -6px var(--rose); }
  50% { box-shadow: 0 0 0 1px var(--rose), 0 0 30px -4px var(--rose); }
}
.event-banner-empty {
  animation: none;
  border-style: dashed;
  border-color: var(--border);
  color: var(--text-dim);
  text-align: center;
}
.event-banner-label {
  font-family: 'Teko', sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--rose);
  margin-bottom: 6px;
}
.event-banner-title {
  font-family: 'Teko', sans-serif;
  font-size: 34px;
  line-height: 1.1;
}
.event-banner-desc { color: var(--text-dim); margin: 8px 0 0; }
.event-banner-time {
  font-family: 'JetBrains Mono', monospace;
  color: var(--rose);
  margin-top: 10px;
  font-size: 14px;
}

.edit-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}
.edit-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 14px 0 6px;
}
.edit-label:first-child { margin-top: 0; }
.edit-form textarea.search-input { resize: vertical; font-family: 'Manrope', sans-serif; }

@media (max-width: 720px) {
  .hero-title { font-size: 38px; }
  .event-banner-title { font-size: 26px; }
}

/* ===================================================================
   Sidebar nav (desktop) — permanently expanded, rankedbw.net-style.
   No collapse/hover-expand - it's just always at full width with labels
   visible, and the current page is highlighted via .active.
   =================================================================== */
:root { --sidebar-width: 200px; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: rgba(11, 14, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  z-index: 100;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px 20px;
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  white-space: nowrap;
}
.brand-label { font-family: 'Teko', sans-serif; font-size: 22px; letter-spacing: 1px; }

.sidebar-items { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-item, .sidebar-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}
.sidebar-item:hover, .sidebar-logout:hover { color: var(--text); background: var(--panel-raised); }
.sidebar-item.active { color: var(--rose); }
.sidebar-icon { flex-shrink: 0; display: inline-flex; }
.sidebar-label { font-size: 15px; font-weight: 600; }

/* Push every page's content clear of the fixed sidebar */
body { padding-left: var(--sidebar-width); }
body.no-sidebar { padding-left: 0; }

/* Mobile nav toggle + bottom slide-up drawer, hidden on desktop */
.mobile-nav-toggle, .mobile-drawer, .mobile-drawer-overlay { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  body { padding-left: 0; }

  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 16px; right: 16px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--rose);
    color: #05070f;
    border: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  }
  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #05070f;
    border-radius: 1px;
    margin: 3px 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  /* Morphs into an X: top and bottom lines rotate to cross, middle fades out */
  .mobile-nav-toggle.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-nav-toggle.open .hamburger-line:nth-child(2) { opacity: 0; }
  .mobile-nav-toggle.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
  }
  .mobile-drawer-overlay.open { opacity: 1; pointer-events: auto; }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--panel);
    border-top: 2px solid var(--border);
    border-radius: 12px 12px 0 0;
    padding: 12px 0 24px;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.2s ease;
  }
  .mobile-drawer.open { transform: translateY(0); }
  .mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: var(--text-dim);
    text-decoration: none;
  }
  .mobile-drawer-item.active { color: var(--rose); }
}

.no-stats-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: 6px;
}
.no-stats-title {
  font-family: 'Teko', sans-serif;
  font-size: 24px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* ===================================================================
   Bust-only skin crop (My Stats + player search) — shows head/shoulders
   only, not a squished or overly-tall full body render. Key fix: the
   <img> keeps its TRUE natural aspect ratio (height: auto, never a
   forced fixed height), and the smaller fixed-height container with
   overflow:hidden crops the bottom off - no distortion, genuine crop.
   =================================================================== */
.bust-frame {
  width: 96px;
  height: 100px;
  overflow: hidden;
  border-radius: 4px;
  flex-shrink: 0;
}
.bust-img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  display: block;
}

@media (max-width: 900px) {
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(100vh) rotate(540deg); opacity: 0; }
}

.online-ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good, #4ade80);
  animation: dot-pulse 1.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ===================================================================
   Loading skeletons — shown while a page's first fetch is in flight,
   instead of a blank flash before real content replaces it.
   =================================================================== */
.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-raised) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line { height: 16px; margin-bottom: 10px; }
.skeleton-block { height: 120px; }

/* ===================================================================
   Gamemode block editor
   =================================================================== */
.section-editor-row {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}
.section-editor-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.block-type-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--panel);
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: auto;
}
.mini-btn {
  background: var(--panel-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}
.mini-btn:disabled { opacity: 0.3; cursor: default; }
.section-editor-preview { opacity: 0.85; }

/* ===================================================================
   Credits page
   =================================================================== */
.credits-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.credit-card {
  position: relative;
  background: rgba(16, 20, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  width: 100px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.credit-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 139, 163, 0.3);
}
.credit-name {
  font-size: 13px;
  margin-top: 8px;
  word-break: break-word;
}
.credit-remove {
  position: absolute;
  top: 4px; right: 4px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
}

/* ===================================================================
   Partners page
   =================================================================== */
.partner-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(16, 20, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.partner-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 139, 163, 0.3);
}
.partner-icon {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.partner-name { font-family: 'Teko', sans-serif; font-size: 22px; }
.partner-message { color: var(--text-dim); margin: 4px 0 8px; }

.about-us-block {
  background: rgba(16, 20, 31, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
}
.about-us-label {
  font-family: 'Teko', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--neutral);
  margin-bottom: 8px;
}
.about-us-block p { color: var(--text-dim); line-height: 1.6; margin: 0; }

/* ===================================================================
   Favorite heart toggle on gamemode cards
   =================================================================== */
.favorite-heart {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.favorite-heart:hover { color: #ff5f6d; }
.favorite-heart.active { color: #ff5f6d; }
.favorite-count { font-family: 'JetBrains Mono', monospace; font-size: 12px; }


/* ===================================================================
   Footer — rankedbw-style columns
   =================================================================== */
.site-footer {
  background: rgba(11, 14, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  flex-shrink: 0;
}
.site-footer p { margin: 2px 0; }
