/* shve.net — Cyber Matrix Dark Teal & Lime .IO Arena Portal */
:root {
  --bg: #050f12;
  --panel: #0a1b20;
  --panel-alt: #112a31;
  --ink: #f0fdf4;
  --muted: #86efac;
  --muted-dim: #7ca3a8;
  --accent: #22c55e;
  --gold: #38bdf8;
  --danger: #f43f5e;
  --warn: #facc15;
  --border: rgba(56, 189, 248, 0.16);
  --border-lime: rgba(34, 197, 94, 0.28);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #0c2c33 0%, var(--bg) 65%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 14px; }

.site-header {
  background: rgba(5, 15, 18, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: #fff; letter-spacing: 0.02em; }
.brand-badge {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  color: #031510;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 900;
}
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link { color: var(--muted-dim); padding: 6px 11px; border-radius: 7px; font-size: 0.9rem; font-weight: 600; }
.nav-link:hover, .nav-link.active { background: rgba(34, 197, 94, 0.12); color: #fff; text-decoration: none; }
.nav-link.active { border: 1px solid var(--border-lime); color: var(--accent); }

.ad-slot { margin: 12px auto; display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.ad-leaderboard { min-height: 90px; max-width: 970px; }
.ad-rectangle { min-height: 250px; max-width: 728px; }
.ad-placeholder {
  width: 100%;
  min-height: inherit;
  border: 1px dashed rgba(56, 189, 248, 0.22);
  background: rgba(17, 42, 49, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(240, 253, 244, 0.45);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}
.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.game-title-wrap h1 { margin: 0; font-size: 1.38rem; color: #fff; }
.game-subtitle { margin: 2px 0 0; font-size: 0.84rem; color: var(--muted-dim); }
.hud-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.84rem;
  color: var(--muted-dim);
}
.stat-pill strong { color: #fff; margin-left: 4px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.btn {
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: var(--panel-alt);
  color: #fff;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}
.btn:hover:not(:disabled) { background: #183a44; border-color: var(--gold); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-accent { background: #16a34a; border-color: #22c55e; color: #03150b; font-weight: 800; }
.btn-accent:hover:not(:disabled) { background: #22c55e; border-color: #4ade80; }
.btn-gold { background: #0284c7; border-color: #38bdf8; color: #fff; font-weight: 700; }
.btn-gold:hover:not(:disabled) { background: #0369a1; }
.select-ctrl {
  background: var(--panel-alt);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.86rem;
  font-weight: 600;
}
.toast {
  min-height: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
  text-align: center;
}

/* Quick-Start Bar & Tutorial Modal */
.quickstart-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  background: rgba(17, 42, 49, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.qs-item { font-size: 0.8rem; color: var(--muted-dim); display: flex; gap: 6px; align-items: flex-start; }
.qs-num {
  background: var(--accent);
  color: #03150b;
  font-weight: 800;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  margin-top: 2px;
}
.qs-item strong { color: #fff; }

.tut-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 10, 0.78);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.tut-backdrop.open { display: flex; }
.tut-modal {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border-lime);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.68);
  max-height: 90vh;
  overflow-y: auto;
}
.tut-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.tut-head h2 { margin: 4px 0 2px; font-size: 1.3rem; color: var(--accent); }
.tut-sub { margin: 0; font-size: 0.84rem; color: var(--muted-dim); }
.tut-badge { background: rgba(34, 197, 94, 0.18); color: var(--accent); padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; }
.tut-close { background: transparent; border: none; color: var(--muted-dim); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.tut-goal { background: var(--panel-alt); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; margin-bottom: 12px; }
.tut-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tut-step { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, 0.04); padding: 9px 11px; border-radius: 9px; }
.tut-num { background: var(--accent); color: #03150b; font-weight: 800; width: 22px; height: 22px; min-width: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.tut-step p { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted-dim); }
.tut-box { font-size: 0.84rem; margin-bottom: 10px; }
.tut-box ul { margin: 4px 0 0 18px; padding: 0; color: var(--muted-dim); }
.tut-tip { background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.35); padding: 8px 11px; border-radius: 8px; font-size: 0.84rem; margin-bottom: 14px; }
.tut-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.tut-check { font-size: 0.82rem; color: var(--muted-dim); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.tut-start { background: var(--accent); color: #03150b; border: none; padding: 9px 18px; border-radius: 8px; font-weight: 800; cursor: pointer; font-size: 0.9rem; }

/* Responsive .IO Arena, Live Top-5 Leaderboard & Controls */
.arena-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 14px;
  align-items: start;
}
.arena-layout.single-col {
  grid-template-columns: minmax(0, 1fr);
}
.arena-stage {
  position: relative;
  width: 100%;
  background: #030a0d;
  border: 2px solid var(--border-lime);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 32px rgba(34, 197, 94, 0.08);
}
.arena-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 580px;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}
.arena-canvas.square-canvas {
  max-width: 520px;
  margin: 0 auto;
}
.arena-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 13, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  gap: 10px;
  z-index: 5;
}
.arena-overlay.hidden { display: none; }
.arena-overlay h3 { margin: 0; font-size: 1.4rem; color: var(--accent); }
.arena-overlay p { margin: 0; font-size: 0.9rem; color: #cbd5e1; max-width: 380px; }

.io-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.io-lb-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
}
.io-lb-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.io-lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.io-lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(5, 15, 18, 0.65);
  font-size: 0.82rem;
  color: #dbeafe;
}
.io-lb-row.me {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid var(--border-lime);
  color: #fff;
  font-weight: 800;
}
.io-lb-rank { color: var(--gold); font-weight: 800; min-width: 22px; }
.io-lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-lb-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }

.io-lb-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 175px;
  background: rgba(5, 15, 18, 0.78);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 9px;
  pointer-events: none;
  z-index: 3;
  font-size: 0.75rem;
}

/* Tank / Horde Upgrades */
.upgrade-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.up-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(5, 15, 18, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.up-btn:hover:not(:disabled) { border-color: var(--accent); background: rgba(34, 197, 94, 0.16); }
.up-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.up-lv { color: var(--gold); font-size: 0.75rem; }

.upgrade-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin-top: 6px;
}
.upgrade-card {
  background: var(--panel-alt);
  border: 1px solid var(--border-lime);
  border-radius: 10px;
  padding: 12px 10px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.12s ease;
}
.upgrade-card:hover { transform: translateY(-2px); border-color: var(--gold); background: #163740; }
.upgrade-card strong { display: block; color: var(--accent); font-size: 0.9rem; margin-bottom: 4px; }
.upgrade-card span { font-size: 0.78rem; color: #cbd5e1; }

/* Mobile Touch D-pad & Boost */
.touch-pad { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.mobile-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.dpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(2, 44px);
  gap: 6px;
  margin: 0 auto;
}
.dpad-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: #fff;
  border-radius: 9px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.dpad-btn:active { background: var(--accent); color: #03150b; }
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }

.boost-btn {
  appearance: none;
  border: 2px solid var(--accent);
  background: rgba(34, 197, 94, 0.2);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.boost-btn.active, .boost-btn:active {
  background: var(--accent);
  color: #03150b;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.55);
}

/* Catalog, Article & Footer */
.section-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
}
.section-card h2 { margin-top: 0; font-size: 1.28rem; color: var(--accent); }
.section-card h3 { color: var(--gold); margin-top: 18px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.catalog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: #fff;
}
.catalog-card:hover { border-color: var(--accent); text-decoration: none; }
.catalog-card.current { border-color: var(--accent); background: rgba(34, 197, 94, 0.14); }
.catalog-card p { margin: 0; font-size: 0.8rem; color: var(--muted-dim); }
.badge-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--gold);
}

.faq-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq-item:last-child { border-bottom: none; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 14px 36px;
  margin-top: 24px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted-dim);
}
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

@media (max-width: 820px) {
  .arena-layout { grid-template-columns: 1fr; }
  .io-lb-overlay { display: none; }
}
@media (max-width: 720px) {
  .quickstart-bar { grid-template-columns: 1fr; }
  .upgrade-picker { grid-template-columns: 1fr; }
  .game-shell { padding: 12px; }
}

/* Extra .IO Arena Sidebar Action & Stamina Utilities */
.io-side .boost-btn,
.io-side .arena-action-btn {
  width: 100%;
  text-align: center;
}
.arena-action-btn {
  appearance: none;
  border: 2px solid var(--gold);
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: background 0.14s ease, transform 0.08s ease;
}
.arena-action-btn:hover { background: rgba(56, 189, 248, 0.28); }
.arena-action-btn:active,
.arena-action-btn.active {
  background: var(--gold);
  color: #031510;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}
.io-tip-pill {
  background: rgba(5, 15, 18, 0.65);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.78rem;
  color: var(--muted-dim);
  line-height: 1.45;
}

/* Batch-3 .IO Arena Utilities */
.arena-action-btn.warn-action {
  border-color: var(--warn);
  background: rgba(250, 204, 21, 0.14);
}
.arena-action-btn.warn-action:hover,
.arena-action-btn.warn-action.active {
  background: var(--warn);
  color: #031510;
}
.io-mode-pill {
  background: rgba(17, 42, 49, 0.72);
  border: 1px solid var(--border-lime);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

/* Batch-4 .IO Arena Utilities */
.arena-action-btn.hold-action {
  touch-action: none;
}
.io-craft-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.io-craft-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(5, 15, 18, 0.75);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.io-craft-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.16);
}
.io-craft-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.io-craft-cost {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
}
