/* ============================================================================
   RUST SERVER — DESIGN SYSTEM
   Dark industrial. Concrete, steel, rust-orange.
   ========================================================================= */

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

:root {
  /* ---------------------------------------------------------------------
     Palette sampled from the Dank Servers logo and banner.
     Change --accent to recolour the entire site.
     ------------------------------------------------------------------ */

  /* Surfaces — near-black with a warm red tint, matching the banner */
  --bg:          #0a0809;
  --surface-1:   #121011;
  --surface-2:   #1a1617;
  --surface-3:   #241e1f;
  --border:      #2e2627;
  --border-lit:  #3f3436;

  /* Text */
  --text:        #eceaea;
  --text-dim:    #a59d9e;
  --text-faint:  #6e6667;

  /* Blood red — the logo's dominant colour */
  --accent:      #d9232b;
  --accent-lit:  #f23842;
  --accent-dim:  #8c1219;
  --accent-glow: rgba(217, 35, 43, 0.35);

  /* Gold — from the shield behind the skull */
  --gold:        #d4a03c;
  --gold-lit:    #e8b855;

  /* Support colors — green taken from the leaves in the logo */
  --green:       #3d8c42;
  --amber:       #d4a03c;
  --red:         #c0392b;
  --blue:        #4a7fb5;

  /* Type */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing / shape */
  --radius:      4px;
  --radius-lg:   8px;
  --maxw:        1240px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.65);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; }

/* Subtle noise/grit over the whole page — sells the industrial feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------- typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.lead { font-size: 1.1rem; color: var(--text-dim); max-width: 60ch; }

/* ------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
main  { flex: 1; position: relative; z-index: 2; }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }

.section-head { margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: 0.6rem; }

/* Hazard stripe divider — red and gold, taken from the logo's shield */
.hazard {
  height: 5px;
  background: repeating-linear-gradient(
    45deg,
    var(--accent) 0 14px,
    #16100f 14px 28px
  );
  opacity: 0.85;
  border-bottom: 1px solid rgba(212, 160, 60, 0.35);
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease,
              background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-lit);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border-lit);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--accent); }

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 15, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
/* When a logo image is set in config.js it replaces the letter tile */
.brand-mark.has-logo { background: none; border-radius: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

/* Logo lockup in the hero */
.hero-logo {
  width: clamp(150px, 26vw, 230px);
  height: auto;
  margin-bottom: 1.6rem;
  filter: drop-shadow(0 6px 28px rgba(217, 35, 43, 0.4));
}

.nav { display: flex; gap: 0.35rem; margin-left: auto; }
.nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

/* Steam sign-in button */
.auth-wrap { position: relative; }

.auth-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-lit);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  max-width: 190px;
}
.auth-btn:hover { border-color: var(--accent); color: var(--text); }
.auth-btn:disabled { opacity: 0.6; cursor: wait; }

.auth-btn.is-authed {
  border-color: rgba(61, 140, 66, 0.5);
  color: var(--text);
}
.auth-btn.is-authed svg { color: var(--green); }

.auth-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Popover shown when an already-signed-in player taps their name */
.auth-pop {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 250px;
  background: var(--surface-2);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  z-index: 120;
}
.auth-pop[hidden] { display: none; }

.auth-pop-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  word-break: break-word;
}
.auth-pop-name svg { color: var(--green); flex-shrink: 0; }
.auth-pop p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.9rem; }

.auth-pop-out {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  width: 100%;
  transition: color 0.15s;
}
.auth-pop-out:hover { color: var(--red); }

/* Cart button */
.cart-btn { position: relative; padding: 0.55rem 0.9rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-lit); transition: border-color .15s; }
.cart-btn:hover { border-color: var(--accent); }
.cart-count {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: #fff;
  border-radius: 10px;
  font-size: 0.72rem; font-weight: 700;
  display: grid; place-items: center;
}
.cart-count:empty, .cart-count[data-n="0"] { display: none; }

/* Mobile menu toggle */
.menu-toggle { display: none; padding: 0.5rem; }

/* -------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
  isolation: isolate;           /* keeps the media layers behind this section only */
  min-height: clamp(520px, 78vh, 820px);
  display: flex;
  align-items: center;
}
.hero > .wrap { position: relative; z-index: 2; width: 100%; }

/* --- looping background footage (images and/or video) --- */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--surface-1);
}
.hero-media > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity var(--hero-fade, 2.8s) ease-in-out;
  will-change: opacity, transform;
}
.hero-media > .is-active { opacity: 1; }

/* Slow drift while an image is on screen, so stills don't feel frozen.
   The zoom runs over the fade plus the hold, so it never visibly restarts. */
.hero-media.has-drift > .is-active {
  transform: scale(var(--hero-zoom, 1.08));
  transition:
    opacity   var(--hero-fade, 2.8s) ease-in-out,
    transform var(--hero-drift, 11s) linear;
}

@media (prefers-reduced-motion: reduce) {
  .hero-media.has-drift > .is-active { transform: none; transition: opacity 0.01ms; }
}

/* Darkening + brand glow, so headline text stays readable over any footage */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 58%),
    linear-gradient(
      100deg,
      rgba(10, 8, 9, calc(var(--hero-dark, 0.66) + 0.16)) 0%,
      rgba(10, 8, 9, var(--hero-dark, 0.66)) 46%,
      rgba(10, 8, 9, calc(var(--hero-dark, 0.66) * 0.72)) 100%
    ),
    linear-gradient(to bottom, transparent 62%, var(--bg) 100%);
}

/* No footage configured — fall back to the original glow-on-dark look */
.hero:not(:has(.hero-media)) .hero-scrim,
.hero-media:empty + .hero-scrim {
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 62%),
    linear-gradient(to bottom, transparent 70%, var(--bg) 100%);
}

.hero h1 { margin-bottom: 1.1rem; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: 1.2rem; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Live status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-lit);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74,157,95,0.7);
  animation: pulse 2.2s infinite;
}
.dot.offline { background: var(--text-faint); animation: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,157,95,0.6); }
  70%  { box-shadow: 0 0 0 9px rgba(74,157,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,157,95,0); }
}

/* ---------------------------------------------------------- IP / copy */
.connect-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 430px;
}
.connect-box code {
  flex: 1;
  padding: 0.85rem 1.1rem;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.copy-btn {
  padding: 0 1.3rem;
  background: var(--surface-3);
  border-left: 1px solid var(--border-lit);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.copied { background: var(--green); color: #fff; }

/* ------------------------------------------------------------ countdown */
.countdown { display: flex; gap: 0.7rem; }
.cd-unit {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 0.4rem;
  text-align: center;
  min-width: 74px;
  flex: 1;
}
.cd-num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

/* ------------------------------------------------------- stat strip */
/* Key selling points under the hero, built from server.tagline */
.stat-strip {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.stat-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 2.4rem;
  padding-block: 1.1rem;
}
.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.stat-item svg { color: var(--accent); flex-shrink: 0; }

@media (max-width: 640px) {
  .stat-strip-inner { gap: 0.7rem 1.4rem; padding-block: 1rem; }
  .stat-item { font-size: 0.92rem; }
}

/* --------------------------------------------------------------- grid */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* --------------------------------------------------------------- card */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border-lit); }

.card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: rgba(217, 84, 30, 0.12);
  border: 1px solid rgba(217, 84, 30, 0.28);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* ------------------------------------------------------- store: packages */
.store-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; align-items: start; }

.cat-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 0.2rem; }
.cat-nav button {
  text-align: left;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.cat-nav button:hover { background: var(--surface-1); color: var(--text); }
.cat-nav button.active {
  background: var(--surface-2);
  color: var(--accent);
  border-left-color: var(--accent);
}

.pkg {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pkg:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.pkg-img {
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  object-fit: cover;
  width: 100%;
  border-bottom: 1px solid var(--border);
}
.pkg-img-fallback {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-faint);
}
.pkg-body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
.pkg-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; }
.pkg-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pkg-desc p { margin: 0; }

/* Perk bullets pulled out of the Tebex description's <li> items */
.pkg-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}
.pkg-perks li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.89rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.pkg-perks li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.52em;
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}
.pkg-perks li.more {
  color: var(--text-faint);
  font-style: italic;
}
.pkg-perks li.more::before { background: var(--text-faint); }
.pkg-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pkg-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.pkg-price .was {
  display: block;
  font-size: 0.85rem;
  color: var(--text-faint);
  text-decoration: line-through;
  font-family: var(--font-body);
  font-weight: 400;
}
.pkg-badge {
  position: absolute; top: 0.8rem; right: 0.8rem;
  background: var(--accent); color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: var(--radius);
}
.pkg-wrap { position: relative; }

/* -------------------------------------------------------------- cart */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--surface-1);
  border-left: 1px solid var(--border-lit);
  z-index: 201;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-panel.open { transform: translateX(0); }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cart-head h3 { margin: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-foot { padding: 1.5rem; border-top: 1px solid var(--border); background: var(--surface-2); }

.cart-row { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cart-row:last-child { border-bottom: none; }
.cart-row-main { flex: 1; min-width: 0; }
.cart-row-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; }
.cart-row-meta { font-size: 0.85rem; color: var(--text-faint); }
.cart-row-price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.cart-remove { color: var(--text-faint); font-size: 0.82rem; margin-top: 0.3rem; }
.cart-remove:hover { color: var(--red); }

.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.1rem; }
.cart-total span:first-child { color: var(--text-dim); }
.cart-total strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--accent); }

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--text-faint); }

/* ------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
thead { background: var(--surface-2); }
th {
  text-align: left;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
td { padding: 0.85rem 1.1rem; border-top: 1px solid var(--border); }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--surface-1); }
.rank { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text-faint); width: 56px; }
.rank-1 { color: #e8c14a; } .rank-2 { color: #c4cad2; } .rank-3 { color: #c87f3e; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* -------------------------------------------------------------- rules */
.rule-group { margin-bottom: 2.8rem; }
.rule-group > h3 {
  display: flex; align-items: center; gap: 0.7rem;
  padding-bottom: 0.7rem;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
}
.rule {
  display: flex;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.rule:last-child { border-bottom: none; }
.rule-num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-faint);
  flex-shrink: 0;
  min-width: 2.4rem;
}
.rule-text strong { display: block; margin-bottom: 0.25rem; }
.rule-text p { color: var(--text-dim); font-size: 0.93rem; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  margin-top: 0.5rem;
}
.tag-ban  { background: rgba(192,57,43,0.16);  color: #e06055; border: 1px solid rgba(192,57,43,0.35); }
.tag-warn { background: rgba(217,154,30,0.16); color: #e0b053; border: 1px solid rgba(217,154,30,0.35); }
.tag-kick { background: rgba(74,127,181,0.16); color: #6fa3d6; border: 1px solid rgba(74,127,181,0.35); }

/* ------------------------------------------------------------- footer */
.site-footer {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  z-index: 2;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-col h4 {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}
.footer-col a { display: block; color: var(--text-dim); padding: 0.32rem 0; font-size: 0.93rem; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-faint);
}

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

.notice {
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  border-left: 3px solid;
  background: var(--surface-1);
  font-size: 0.93rem;
  margin-bottom: 1.5rem;
}
.notice-info  { border-color: var(--blue);  }
.notice-warn  { border-color: var(--amber); }
.notice-error { border-color: var(--red);   }
.notice strong { display: block; margin-bottom: 0.3rem; }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--surface-3);
  border: 1px solid var(--border-lit);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 0.85rem 1.4rem;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1.4);
  font-size: 0.93rem;
  max-width: calc(100vw - 40px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.hidden { display: none !important; }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; }
  .cat-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 0.4rem;
  }
  .cat-nav button { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .cat-nav button.active { border-left: none; border-bottom-color: var(--accent); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem;
    gap: 0.2rem;
    margin-left: 0;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 0.75rem 1rem; }
  .header-inner { gap: 0.8rem; }

  /* Space is tight — the Steam button drops to icon only */
  .auth-label { display: none; }
  .auth-btn { padding: 0.55rem 0.7rem; }
  .auth-pop { width: min(250px, calc(100vw - 32px)); }

  /* Long server names must not push the cart button off screen */
  .brand { font-size: 1.2rem; min-width: 0; }
  .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-actions .btn { flex: 1; }
  .countdown { gap: 0.45rem; }
  .cd-unit { min-width: 0; padding: 0.7rem 0.25rem; }
  .cd-num { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
