/* Noob Nation — Core Theme (Dark + Gold) */
:root{
  --bg:#0b0b0f;
  --panel:#121218;
  --panel-2:#0f0f15;
  --line:#23232c;
  --fg:#ffffff;
  --muted:#bdbdbd;
  --gold:#e5ae0f;
  --gold-weak:rgba(229,174,15,.15);
  --shadow:0 20px 50px rgba(0,0,0,.45);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--fg);
  font:16px/1.6 system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Layout */
.container{max-width:1200px;margin:0 auto;padding:24px}
.section{margin:28px 0}
.grid{display:grid;gap:20px}
.grid-2{grid-template-columns:1.4fr .6fr}
@media (max-width: 980px){ .grid-2{grid-template-columns:1fr} }

/* Header / Nav */
.header{
  position:sticky;top:0;z-index:10;
  background:linear-gradient(180deg, rgba(11,11,15,.9), rgba(11,11,15,.7) 60%, transparent);
  backdrop-filter:saturate(120%) blur(6px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;padding:14px 24px;gap:10px}
.brand{display:flex;align-items:center;gap:12px;font-weight:800;letter-spacing:.5px}
.brand .logo{
  width:38px;height:38px;border-radius:10px;background:var(--gold-weak);border:1px solid var(--gold);
  display:grid;place-items:center;font-weight:900;color:var(--gold);
}

/* Actions / Buttons */
.nav .actions{display:flex;gap:10px;flex-wrap:wrap;transition:max-height .18s ease, opacity .18s ease;overflow:hidden;max-height:999px}
.btn{
  display:inline-block;padding:10px 14px;border-radius:12px;border:1px solid var(--line);
  background:var(--panel);color:var(--fg);text-decoration:none;font-weight:700;
  transition:transform .12s ease, box-shadow .12s ease;
}
.btn:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.35)}
.btn.gold{border-color:var(--gold);background:var(--gold);color:#0b0b0f}
.btn.ghost{background:transparent;border-color:var(--line)}

/* Mobile toggle */
.mobile-toggle{
  display:none;width:42px;height:36px;margin-left:auto;margin-right:10px;
  background:transparent;border:1px solid var(--line);border-radius:10px;
  align-items:center;justify-content:center;gap:4px;
}
.mobile-toggle span{display:block;width:18px;height:2px;background:var(--fg)}

/* Hero */
.hero{
  margin-top:10px;border:1px solid var(--line);border-radius:var(--radius);background:
  radial-gradient(60% 100% at 40% 0%, rgba(229,174,15,.08), transparent 60%),
  linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow:var(--shadow); padding:38px 28px; text-align:center;
}
.hero h1{margin:0 0 10px;font-size:36px;letter-spacing:.4px}
.hero p{margin:0;color:var(--muted)}
.hero .cta{margin-top:16px;display:flex;gap:12px;flex-wrap:wrap;justify-content:center}

/* Cards / Panels */
.card{
  border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);
  box-shadow:var(--shadow);padding:18px;
}
.card h2,.card h3{margin:0 0 8px;font-weight:800}
.card p.small{line-height:1.5}
.meta{display:flex;gap:10px;flex-wrap:wrap}
.badge{
  display:inline-block;padding:6px 10px;border:1px solid var(--gold);color:var(--gold);
  background:var(--gold-weak);border-radius:999px;font-weight:700
}

/* Live Panel */
.players{margin-top:14px;border-top:1px solid var(--line);padding-top:12px;max-height:460px;overflow:auto}
.player{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;padding:10px;border-radius:12px}
.player:not(:last-child){border-bottom:1px dashed var(--line)}
.ava{width:44px;height:44px;border-radius:10px;background:#1e1e25;object-fit:cover}
.name{font-weight:700}
.small{font-size:13px;color:var(--muted)}
.tag{display:inline-block;padding:4px 8px;border:1px solid var(--line);border-radius:999px;font-size:12px;color:var(--muted)}
.right{color:var(--muted);min-width:72px;text-align:right}

/* Footer */
.footer{margin:26px 0 6px;color:var(--muted);text-align:center;font-size:13px}

/* Links */
a:not(.btn){color:var(--gold);text-decoration:none;font-weight:700}
a:not(.btn):hover{ text-decoration:underline; text-underline-offset:2px; text-decoration-thickness:2px }
.small a:not(.btn), .muted a:not(.btn){color:var(--gold);font-weight:600}
a.btn{color:inherit;text-decoration:none;font-weight:700}

/* Steam login pill */
.steam-pill{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--line);padding:6px 10px;border-radius:999px;
}
.steam-pill img{width:20px;height:20px;border-radius:50%;object-fit:cover}

/* Anchor offset for sticky header */
#cookies { scroll-margin-top: 120px; }

/* ——— Phones (<=640px) ——— */
@media (max-width: 640px){
  html, body{overflow-x:hidden}
  img, video{max-width:100%; height:auto}

  .container{padding:14px}
  .nav{padding:10px 14px;flex-wrap:wrap}
  .brand{flex:1;min-width:160px}
  .mobile-toggle{display:flex}

  /* collapse actions into sheet */
  .nav .actions{display:flex;width:100%;margin-top:10px;flex-direction:column;gap:8px;max-height:0;opacity:0}
  .nav .actions.open{max-height:480px;opacity:1}
  .nav .actions .btn{width:100%;text-align:center}

  /* hero & cards */
  .hero{padding:24px 16px}
  .hero h1{font-size:clamp(20px,7vw,28px)}
  .card{padding:14px}

  /* servers grid single column */
  .servers{grid-template-columns:1fr !important}

  /* server title clamp */
  .server-title{
    font-weight:800;margin:0;
    font-size:clamp(13px,5.2vw,18px);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }

  /* badges / buttons */
  .badge{padding:6px 9px;font-size:13px}
  .btn{padding:10px 12px;border-radius:10px}

  /* meta wraps nicely */
  .meta{flex-wrap:wrap}

  /* players list tighter */
  .players{max-height:50vh;-webkit-overflow-scrolling:touch}
  .player{grid-template-columns:36px 1fr;gap:10px;padding:8px}
  .ava{width:36px;height:36px;border-radius:8px}

  /* toast fit */
  .toast{left:12px;right:12px;transform:none;text-align:center;font-size:14px;padding:10px 12px}
}

/* ——— Tablets (641–999px) ——— */
@media (min-width: 641px) and (max-width: 999px){
  .servers{grid-template-columns:1fr 1fr}
  .players{max-height:54vh}
}
/* Top-status grid: 3 → 2 → 1 columns responsively */
#top-status .grid{ grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 999px){
  #top-status .grid{ grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px){
  #top-status .grid{ grid-template-columns: 1fr !important; }
}

/* Mobile polish for those 3 cards */
@media (max-width: 640px){
  /* Let the countdown badge fit without spilling */
  .badge#wipeCountdown{
    min-width: 0 !important;
    width: 100%;
    font-size: 18px !important;
    padding: 8px 10px !important;
  }
  /* Slightly tighter padding so nothing feels cramped */
  #top-status .card{ padding: 14px; }
}

/* Top status bar grid: 3 on desktop, 2 on tablet, 1 on mobile */
.grid-top{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:18px;
}
@media (max-width: 999px){
  .grid-top{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .grid-top{ grid-template-columns: 1fr; }
}

/* Top status cards — equal height, centered, clean */
#top-status .stat-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
  min-height: 180px;           /* equal visual weight */
  padding: 20px;
}

#top-status .stat-icon{
  width:56px; height:56px; border-radius:12px;
  display:grid; place-items:center;
  border:1px solid var(--gold);
  background:var(--gold-weak);
}

#top-status .stat-title{ font-weight:800; }
#top-status .stat-sub{ color:var(--muted); font-size:13px; }

#top-status .metric{
  font: 800 28px/1 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing:.5px;
}

#top-status .push{ margin-top:auto; }        /* pushes next element to the bottom */

/* Make the countdown badge fill nicely without looking tiny */
#top-status #wipeCountdown{
  width:100%;
  max-width: 360px;
}

/* Responsive grid for the 3 cards (desktop 3, tablet 2, mobile 1) */
#top-status .grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:18px;
}
@media (max-width: 999px){
  #top-status .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  #top-status .grid{ grid-template-columns: 1fr; }
  #top-status .stat-card{ min-height: 160px; }
}

/* Compact user chip used when logged in (no duplicates elsewhere) */
.header .actions .user-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  vertical-align:middle;
  max-width:200px;
  overflow:hidden;
}
.header .actions .user-btn img{
  width:18px;
  height:18px;
  border-radius:50%;
  object-fit:cover;
  display:block;
}
.header .actions .user-btn .name{
  display:block;
  max-width:160px; /* 200 total minus img+gap */
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


