/* ==========================================================================
   WSLGames Network — games.weasel.gg
   Palette, type and the hard-offset-shadow treatment are lifted from
   noahtemplet.dev: #131313 sections on #191919, #393e46 header, #735243
   copper accent, with Lato throughout (italic-bold headings).
   ========================================================================== */

:root {
  /* surfaces */
  --bg:            #191919;
  --bg-deep:       #0c0c0c;
  --surface:       #131313;
  --surface-2:     #1e1e1e;
  --slate:         #393e46;
  --slate-lit:     #464c56;

  /* ink */
  --text:          #fcfcfc;
  --text-muted:    #a6adb5;
  --text-dim:      #7d848c;

  /* accent — the copper out of the logo gradient */
  --accent:        #735243;
  --accent-lit:    #96705c;
  --accent-pale:   #c7a993;

  --online:        #00cd00;
  --offline:       #d64545;
  --warn:          #ff7900;
  /* Currencies and boosts in their in-game colours: XP aqua, W coins gold, W Gems light purple */
  --xp:            #55ffff;
  --coins:         #ffaa00;
  --gems:          #ff55ff;

  --border:        #2a2a2a;
  --border-lit:    #383838;

  --radius:        15px;
  --radius-sm:     8px;

  --header-hgt:    68px;
  --shadow-hard:   5px 5px 3px rgba(0, 0, 0, .55);
  --shadow-soft:   0 18px 40px -18px rgba(0, 0, 0, .8);

  --font-body:     'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display:  var(--font-body);

  --wrap:          1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-hgt) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); margin: 0; line-height: 1.15; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace; }
img { max-width: 100%; display: block; }

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

:focus-visible { outline: 2px solid var(--accent-pale); outline-offset: 3px; border-radius: 3px; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--accent); color: var(--text);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ============================== header ============================== */

.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  height: var(--header-hgt);
  padding: 0 24px;
  background: var(--slate);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}

.logo-sec { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-sec:hover { text-decoration: none; }
.header-logo { width: 40px; height: 40px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.5)); }

.header-wordmark {
  font-family: var(--font-display);
  font-weight: 900; font-style: italic;
  font-size: 1.2rem; letter-spacing: .3px;
  color: var(--text);
  text-shadow: 2px 2px var(--bg-deep);
}

.tab-list { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.tab-item {
  position: relative;
  padding: 8px 14px;
  color: var(--text);
  font-size: .95rem;
  white-space: nowrap;
}
.tab-item:hover { text-decoration: none; }
.tab-item::after {
  content: ''; display: block;
  position: absolute; left: 14px; right: 14px; bottom: 2px;
  border-bottom: 3px solid var(--text);
  transform: scaleX(0);
  transition: transform 250ms ease-in-out;
}
.tab-item:hover::after { transform: scaleX(1); }

.tab-cta {
  margin-left: 8px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  transition: background 160ms ease;
}
.tab-cta::after { content: none; }
.tab-cta:hover { background: var(--accent-lit); }

.menu-button {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  background: none; border: 0; padding: 9px;
  cursor: pointer;
}
.menu-button span {
  display: block; height: 2px; margin: 5px 0;
  background: var(--text); border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== hero ============================== */

.hero {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-hgt));
  padding: 72px 0 88px;
  overflow: hidden;
  background: var(--bg-deep);
  text-align: center;
}

/* copper wash behind the mark, standing in for the blurred hero image */
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 130%;
  background:
    radial-gradient(58% 52% at 50% 34%, rgba(150, 112, 92, .34) 0%, rgba(150, 112, 92, 0) 68%),
    radial-gradient(42% 40% at 82% 78%, rgba(57, 62, 70, .55) 0%, rgba(57, 62, 70, 0) 70%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-logo {
  width: 152px; height: 152px;
  margin: 0 auto 24px;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, .7));
  animation: mark-in 700ms ease both;
}
@keyframes mark-in {
  from { opacity: 0; transform: translateY(18px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 900; font-style: italic;
  letter-spacing: -1px;
  text-shadow: 3px 3px var(--bg-deep);
}
.hero-title-sub {
  display: block;
  font-size: clamp(.9rem, 2.4vw, 1.15rem);
  font-weight: 700; font-style: normal;
  letter-spacing: .5em; text-indent: .5em;
  text-transform: uppercase;
  color: var(--accent-pale);
  margin-top: 10px;
  text-shadow: 2px 2px var(--bg-deep);
}

.hero-tagline {
  max-width: 44ch;
  margin: 22px auto 0;
  color: var(--text-muted);
  font-size: 1.08rem;
  text-shadow: 1px 1px var(--bg-deep);
}

/* server address */
.ip-card { margin: 34px auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }

.ip-label {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 700;
}

.ip-copy {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 13px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.ip-copy:hover { background: var(--surface-2); border-color: var(--accent); transform: translateY(-2px); }
.ip-copy:active { transform: translateY(0); }

.ip-value { font-size: clamp(1.05rem, 3.4vw, 1.4rem); font-weight: 700; letter-spacing: .4px; }
.ip-copy-icon { display: flex; color: var(--accent-pale); }

.ip-feedback { min-height: 1.25em; font-size: .85rem; color: var(--online); font-weight: 700; }

/* live status */
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px; padding: 7px 16px;
  background: rgba(19, 19, 19, .72);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .92rem;
  color: var(--text-muted);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); flex: none; }
.status[data-state="loading"] .status-dot { animation: pulse 1.3s ease-in-out infinite; }
.status[data-state="online"]  .status-dot { background: var(--online); box-shadow: 0 0 0 4px rgba(0, 205, 0, .16); }
.status[data-state="offline"] .status-dot { background: var(--offline); box-shadow: 0 0 0 4px rgba(214, 69, 69, .16); }
.status[data-state="unknown"] .status-dot { background: var(--warn); }
.status[data-state="online"] .status-text strong { color: var(--text); }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700; font-size: .98rem;
  letter-spacing: .2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 140ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary { background: var(--accent); color: var(--text); box-shadow: var(--shadow-hard); }
.btn-primary:hover { background: var(--accent-lit); }

.btn-ghost { background: rgba(252, 252, 252, .04); color: var(--text); border-color: var(--border-lit); }
.btn-ghost:hover { border-color: var(--accent-pale); background: rgba(252, 252, 252, .08); }

/* ============================== sections ============================== */

.main-content { position: relative; background: var(--bg); }

.section { padding: 104px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-title {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 900;
  text-shadow: 2px 2px var(--bg-deep);
}
.section-kicker {
  font-size: 1.05rem; font-style: italic; font-weight: 400;
  color: var(--text-muted);
  margin-top: 8px;
  text-shadow: 2px 2px var(--bg-deep);
}
.section hr {
  height: 3px; border: 0; margin: 26px 0 40px;
  width: 84px;
  background: var(--accent);
  border-radius: 2px;
}

.muted { color: var(--text-dim); font-size: .93rem; }

/* game cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms ease, transform 180ms ease;
}
.game-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.game-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.game-card h4 {
  font-size: 1.5rem; font-weight: 900; font-style: italic;
  text-shadow: 2px 2px var(--bg-deep);
}

.pill {
  padding: 4px 12px;
  background: var(--slate);
  border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text);
}

/* A retired game: outlined and muted, so it reads as a status, not a category. */
.pill-legacy {
  background: transparent;
  border: 1px solid var(--border-lit);
  color: var(--text-dim);
}
/* A closed beta: outlined in the accent, so it reads as a status, not a category. */
.pill-beta {
  background: transparent;
  border: 1px solid var(--accent-lit);
  color: var(--accent-pale);
}
.game-card > p.beta-note,
.game-card > p.legacy-note {
  margin-top: -6px;
  font-size: .85rem; font-style: italic;
  color: var(--text-dim);
}

.game-card > p { color: var(--text-muted); }

.spec-list { list-style: none; margin: 20px 0; padding: 0; border-top: 1px solid var(--border); }
.spec-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .93rem;
}
.spec-list span { color: var(--text-dim); }
.spec-list strong { font-weight: 700; text-align: right; }

.cmd {
  display: inline-block;
  margin: 4px 0 0;
  padding: 8px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  color: var(--accent-pale);
}

.note-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 48px; }
.note { padding: 20px 22px; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.note h5 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.note p { color: var(--text-muted); font-size: .93rem; margin: 0; }

/* ============================== ranks ============================== */

.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }

.rank-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease;
}
.rank-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--r1), var(--r2));
}
.rank-card:hover { transform: translateY(-3px); border-color: var(--border-lit); }

.rank-name {
  font-size: 1.35rem; font-weight: 900; font-style: italic;
  letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--r1), var(--r2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.perk-list { list-style: none; margin: 0; padding: 0; }
.perk-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: .92rem;
  color: var(--text-muted);
}
.perk-list li::before {
  content: ''; position: absolute; left: 0; top: 14px;
  width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(135deg, var(--r1), var(--r2));
}
.perk-list strong { color: var(--text); font-weight: 700; }

.booster-panel {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  margin-top: 32px; padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.booster-copy { flex: 1 1 380px; }
.booster-copy h4 { font-size: 1.35rem; font-weight: 900; font-style: italic; margin-bottom: 12px; }
.booster-copy p { color: var(--text-muted); font-size: .95rem; }
.booster-copy code {
  background: var(--bg-deep); padding: 2px 7px; border-radius: 4px;
  font-size: .87rem; color: var(--accent-pale);
}
.btn-store { flex: none; }

/* ============================== rules ============================== */

.rules-list {
  list-style: none; counter-reset: rule; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}
.rules-list li {
  counter-increment: rule;
  position: relative;
  padding: 22px 24px 22px 62px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.rules-list li::before {
  content: counter(rule);
  position: absolute; left: 22px; top: 22px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--accent);
  border-radius: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  color: var(--text);
}
.rules-list h5 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.rules-list p { color: var(--text-muted); font-size: .93rem; margin: 0; }

.rules-foot { margin-top: 28px; color: var(--text-dim); font-size: .93rem; font-style: italic; }

/* ============================== versions ============================== */

.version-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.version-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.version-card.is-yes { border-color: rgba(0, 205, 0, .3); }
.version-card.is-no { opacity: .82; }

.version-flag {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.is-yes .version-flag { background: rgba(0, 205, 0, .14); color: #63d963; }
.is-no  .version-flag { background: rgba(255, 121, 0, .14); color: var(--warn); }

.version-card h4 { font-size: 1.35rem; font-weight: 900; font-style: italic; }
.version-range { font-size: 1.02rem; color: var(--accent-pale); font-weight: 700; margin: 6px 0 14px; }
.version-card > p:not(.version-range) { color: var(--text-muted); font-size: .94rem; }

.join-strip {
  margin-top: 32px; padding: 26px 30px;
  background: linear-gradient(120deg, var(--slate), var(--surface-2));
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.join-strip h4 { font-size: 1.2rem; font-weight: 900; font-style: italic; margin-bottom: 6px; }
.join-strip p { color: var(--text-muted); margin: 0; }
.join-strip code {
  background: rgba(0, 0, 0, .45); padding: 3px 9px; border-radius: 5px;
  color: var(--text); font-size: .92rem;
}

/* ============================== footer ============================== */

.footer { background: var(--bg-deep); border-top: 1px solid var(--border); padding: 48px 0 28px; }

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand strong { display: block; font-family: var(--font-display); font-weight: 700; }
.footer-ip { font-size: .88rem; color: var(--text-dim); font-family: ui-monospace, Menlo, Consolas, monospace; }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: .93rem; }
.footer-links a:hover { color: var(--text); }

.footer-legal {
  max-width: var(--wrap); margin: 32px auto 0; padding: 20px 24px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .8rem; text-align: center;
}

/* ============================== mobile ============================== */

@media (max-width: 860px) {
  body { font-size: 16px; }

  .menu-button { display: block; }

  .tab-list {
    position: absolute; top: var(--header-hgt); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 6px 0;
    background: var(--slate);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .45);
    display: none;
  }
  .tab-list.is-open { display: flex; }

  .tab-item { padding: 14px 24px; }
  .tab-item::after { content: none; }
  .tab-item:hover { background: var(--slate-lit); }

  .tab-cta { margin: 8px 24px; text-align: center; }

  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; min-height: 0; }
  .hero-logo { width: 112px; height: 112px; }
  .booster-panel { padding: 24px; }
  .btn-store { width: 100%; text-align: center; }
  .rules-list li { padding: 20px 20px 20px 56px; }
}

/* ===================== live booster chip (hero) ===================== */

.booster-live {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 9px 18px;
  background: linear-gradient(100deg, rgba(255, 121, 0, .16), rgba(115, 82, 67, .16));
  border: 1px solid rgba(255, 121, 0, .38);
  border-radius: 999px;
  font-size: .92rem;
  color: var(--text-muted);
  animation: chip-in 400ms ease both;
}
.booster-live[hidden] { display: none; }
.booster-live strong { color: #ffb457; font-weight: 700; }
.booster-live-bolt { font-size: 1.05rem; line-height: 1; animation: bolt 2.2s ease-in-out infinite; }

@keyframes chip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bolt { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* ===================== footer legal / copyright ===================== */

.footer-copyright { color: var(--text-muted); margin-bottom: .4rem; }
.footer-copyright #year { font-variant-numeric: tabular-nums; }
.footer-dba { font-style: italic; color: var(--text-dim); }
.footer-disclaimer { margin: 0; }

/* XP, W coins and W Gems in their colours, wherever they are named */
.xp, .booster-live strong .xp { color: var(--xp); }
.coins, .booster-live strong .coins { color: var(--coins); }
.gems, .booster-live strong .gems { color: var(--gems); }
