/* ---------------------------------------------------------------
   Spin the Block — shared stylesheet
   Every page links this one file, so a style change happens once.

   Palette: near-black surfaces, one red accent, muted gray text.
   --------------------------------------------------------------- */

:root {
  /* Near-black surfaces with a faint purple cast, so the page reads as
     related to the logo without washing out. Accent values are sampled
     directly from the STB cube logo (#A030F0 dominant). */
  --bg:        #0f0c12;
  --surface:   #16121a;
  --surface-2: #1d1823;
  --line:      #2b2433;
  --line-2:    #3b3145;

  --text:      #f3f0f5;
  --text-dim:  #c9c2d0;
  --text-mute: #8d859a;
  --text-faint:#6e667a;

  --purple:      #A030F0;
  --purple-dark: #8810DD;
  --purple-lite: #B156F3;

  /* --red is kept as an alias so any existing rule that still references it
     picks up the new accent instead of the old red. */
  --red:       var(--purple);
  --red-dark:  var(--purple-dark);
  --amber:     #EF9F27;
  --green:     #7ac74f;

  --maxw: 1080px;
  --radius: 6px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------------- nav ---------------- */

.nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.brand-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 20px; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-mute);
  font-size: 13.5px;
  text-decoration: none;
}
.nav-links a:hover { color: var(--text-dim); text-decoration: none; }
.nav-links a.active { color: var(--red); }

/* ---------------- hero ---------------- */

.hero { padding: 52px 0 40px; border-bottom: 1px solid var(--line); }
.eyebrow {
  color: var(--red);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero p {
  margin: 0;
  color: var(--text-mute);
  font-size: 16px;
  max-width: 560px;
}
.cta-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); text-decoration: none; }
.btn-ghost { border-color: var(--line-2); color: var(--text-dim); background: transparent; }
.btn-ghost:hover { border-color: var(--text-mute); color: var(--text); text-decoration: none; }

/* ---------------- stat strip ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { background: var(--surface); padding: 16px 20px; }
.stat-label {
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.stat-value { color: var(--text); font-size: 20px; font-weight: 600; }
.stat-value.good { color: var(--green); }
.stat-value.hot  { color: var(--red); }

/* ---------------- sections ---------------- */

.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--text-mute); font-size: 14.5px; margin: 0 0 24px; }

/* ---------------- leaderboard ---------------- */

.lb-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.lb-updated { color: var(--text-faint); font-size: 12px; }

.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 64px 64px 58px 90px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  margin-bottom: 4px;
  font-size: 14px;
  border-left: 2px solid transparent;
}
.lb-row.hdr {
  background: transparent;
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 0;
  padding-bottom: 7px;
  margin-bottom: 2px;
}
.lb-row.top { background: var(--surface-2); border-left-color: var(--red); }
.lb-rank { color: var(--text-mute); font-weight: 600; }
.lb-row.top .lb-rank { color: var(--red); }
.lb-name {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-row.top .lb-name { color: var(--text); font-weight: 500; }
.lb-num { text-align: right; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.lb-kills { color: var(--text); font-weight: 500; }
.lb-note { color: var(--text-faint); font-size: 13px; padding: 14px 0; }

/* Group tag chip shown before a player's name (and before a group's name on
   the group board). Defaults to white; the mod may override the colour inline
   per group via a validated #RRGGBB style. */
.lb-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  padding: 1px 6px;
  margin-right: 7px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  color: #ffffff;
  vertical-align: middle;
  white-space: nowrap;
}

/* Group-on-group board: same look as the player board but with an extra
   Members column (rank / group / members / kills / deaths / kd). */
.lb-row.grp {
  grid-template-columns: 40px 1fr 74px 70px 70px 62px;
}

/* ---------------- rules ---------------- */

.rule-group { margin-bottom: 34px; }
.rule-group h3 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}
.rule {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.6;
}
.rule:last-child { border-bottom: 1px solid var(--line); }

/* Severity accents, mirroring the in-game rules page colouring:
   .sev  = red   (bannable / zero tolerance)
   .warn = amber (procedural, easy to trip over accidentally) */
.rule.sev  { color: var(--text); }
.rule.sev  .rule-num { color: var(--red); }
.rule.warn .rule-num { color: var(--amber); }

.rule-num {
  color: var(--text-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  flex-shrink: 0;
  min-width: 22px;
}

.callout {
  background: var(--surface);
  border-left: 2px solid var(--red);
  padding: 14px 18px;
  margin: 0 0 30px;
  color: var(--text-dim);
  font-size: 14.5px;
}
.callout strong { color: var(--text); font-weight: 600; }

.closer {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px;
  margin-top: 38px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.closer span {
  display: block;
  margin-top: 6px;
  color: var(--text-mute);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0;
}

/* ---------------- cards ---------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}
.card h3 { margin: 0 0 7px; font-size: 15.5px; font-weight: 600; color: var(--text); }
.card p { margin: 0; color: var(--text-mute); font-size: 14px; line-height: 1.6; }

.pill {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.pill.ok  { color: var(--green); border-color: #2f4a24; }
.pill.no  { color: var(--red);   border-color: #4a2424; }

.list-check, .list-cross { list-style: none; padding: 0; margin: 0; }
.list-check li, .list-cross li {
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14.5px;
  position: relative;
  line-height: 1.6;
}
.list-check li:last-child, .list-cross li:last-child { border-bottom: 1px solid var(--line); }
.list-check li::before {
  content: "✓";
  position: absolute; left: 4px; top: 9px;
  color: var(--green); font-size: 13px;
}
.list-cross li::before {
  content: "✕";
  position: absolute; left: 4px; top: 9px;
  color: var(--red); font-size: 13px;
}

/* ---------------- footer ---------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
  color: var(--text-faint);
  font-size: 12.5px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--text-mute); }
.footer a:hover { color: var(--text-dim); }

/* ---------------- responsive ---------------- */

@media (max-width: 640px) {
  .hero { padding: 36px 0 30px; }
  .hero h1 { font-size: 29px; }
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 11px; }
  .nav-links { gap: 15px; }
  .lb-row { grid-template-columns: 30px 1fr 52px 52px; gap: 9px; font-size: 13.5px; }
  .lb-row.grp { grid-template-columns: 30px 1fr 52px 52px; }
  .hide-sm { display: none !important; }
  .section { padding: 32px 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
}

/* ---------------- feature cards with icons ---------------- */
/* Extends .card: an icon sits above the heading and a purple bar
   wipes down the left edge on hover, echoing the in-game accent. */
.card.feat { position: relative; overflow: hidden; }
.card.feat::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--purple);
  transition: height 0.22s ease;
}
.card.feat:hover::after { height: 100%; }
.feat-icon {
  width: 30px; height: 30px;
  color: var(--purple);
  margin-bottom: 12px;
  display: block;
}

/* ---------------- gallery ---------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.shot {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.shot:hover img { transform: scale(1.04); }
.shot::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* ---------------- lightbox ---------------- */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(6,4,9,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 100%; max-height: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}

/* ---------------- hero mark (logo/skull above title) ---------------- */
.hero-mark-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hero-mark-row svg { width: 40px; height: 40px; color: var(--purple); flex: none; }
