:root {
  --bg: #12161f;
  --card: #1a202b;
  --border: #2c3442;
  --text: #ece6da;
  --muted: #9a92a6;
  --accent: #f0913a;
  --accent-2: #ffc46b;
  --bad: #ff6b5a;
  --good: #8fd16a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at top, #1b2430 0%, #12161f 60%) fixed;
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding: max(20px, env(safe-area-inset-top)) 16px 40px;
}

.brand { display: inline-block; line-height: 0; }
.brand img { width: 120px; height: auto; border-radius: 16px; }
.brand-large img { width: min(260px, 70vw); border-radius: 24px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #1b1208;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--accent-2); }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.text-btn {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
.text-btn:hover { color: var(--text); }

/* ---------- Hub ---------- */

.hub-header {
  max-width: 900px;
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hub-account { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who { color: var(--muted); font-size: 13px; }

.hub-games {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.game-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  transition: transform 0.15s, border-color 0.15s;
}
.game-tile:hover { transform: translateY(-3px); border-color: var(--accent); }
.game-art { display: block; aspect-ratio: 16 / 10; background: #000 center / cover no-repeat; }
.game-dice .game-art { background-size: contain; background-color: #00070a; }
.game-dusk .game-art { background-position: center 12%; }
.game-info { padding: 14px 16px 18px; }
.game-info h2 { margin: 0; font-size: 22px; }
.game-version { display: inline-block; margin: -2px 0 6px; color: var(--muted); font-size: 12px; text-decoration: none; }
.game-version:hover { color: var(--text); }
.game-tag { margin: 0 0 6px; color: var(--accent-2); font-size: 13px; letter-spacing: 1px; }
.game-desc { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.game-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}
.game-stats dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.game-stats dd { margin: 0; font-size: 17px; font-weight: 700; }
.game-stats small { color: var(--muted); font-size: 12px; font-weight: 400; }
.game-stats-note { margin: -6px 0 14px; color: var(--muted); font-size: 13px; }
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.best-player { margin-left: auto; color: var(--muted); font-size: 13px; }
.best-player strong { color: var(--accent-2); }

.hub-note { max-width: 900px; margin: 24px auto 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Auth pages ---------- */

.page-auth { display: flex; flex-direction: column; align-items: center; }
.page-auth .brand { margin: 10px 0 4px; }
.auth-for { margin: 0 0 12px; color: var(--muted); }

.card {
  width: 100%;
  max-width: 400px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}
.card h1 { margin: 0 0 12px; font-size: 20px; }
.card form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.card form:last-child { margin-bottom: 0; }
.card label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.card input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #12161f;
  color: var(--text);
  font: inherit;
}
.card form .btn { margin-top: 10px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab-btn {
  flex: 1;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.tab-btn.active { background: rgba(240,145,58,0.15); border-color: var(--accent); color: var(--text); }
.tab-casual:hover { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.flash { padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.flash-error { background: rgba(255,107,90,0.12); border: 1px solid rgba(255,107,90,0.4); color: var(--bad); }
.flash-success { background: rgba(143,209,106,0.12); border: 1px solid rgba(143,209,106,0.4); color: var(--good); }

.stat-list { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; }
.stat-list li { padding: 6px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.stat-list strong { color: var(--text); margin-right: 6px; }

.row-links { display: flex; gap: 18px; }

/* ---------- Supporters ---------- */

.tier { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; border: 1px solid; }
.tier-bronze { color: #e0a070; border-color: rgba(205, 127, 50, 0.6); background: rgba(205, 127, 50, 0.12); }
.tier-silver { color: #dfe4ea; border-color: rgba(192, 200, 210, 0.6); background: rgba(192, 200, 210, 0.12); }
.tier-gold { color: #ffd76a; border-color: rgba(255, 200, 60, 0.6); background: rgba(255, 200, 60, 0.12); }
.tier-platinum { color: #b8f0ff; border-color: rgba(140, 220, 255, 0.7); background: rgba(140, 220, 255, 0.12); }
.supporter-line { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.supporter-line .tier { margin: 0 6px 0 0; }

.support-banner {
  max-width: 900px;
  margin: 24px auto 0;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 196, 107, 0.5);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(240, 145, 58, 0.18), rgba(255, 196, 107, 0.06));
}
.support-banner > div:first-child { flex: 1 1 300px; }
.support-banner h2 { margin: 0 0 4px; font-size: 18px; color: var(--accent-2); }
.support-banner p { margin: 0; color: var(--text); font-size: 14px; opacity: 0.85; }
.support-banner .btn { flex: 0 0 auto; padding: 12px 18px; font-size: 15px; }
@media (max-width: 600px) { .support-banner { flex-direction: column; align-items: stretch; text-align: center; } }

.stat-rows { margin: 0; font-size: 14px; }
.stat-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.stat-rows div:last-child { border-bottom: none; }
.stat-rows dt { color: var(--muted); }
.stat-rows dd { margin: 0; font-weight: 700; text-align: right; }

.supporters { max-width: 900px; margin: 14px auto 0; text-align: center; }
.supporters h3 { margin: 0 0 8px; font-size: 13px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.supporters ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.supporters .tier { margin: 0; font-size: 13px; padding: 3px 10px; }

.thanks { max-width: 900px; margin: 0 auto 18px; padding: 12px 16px; border: 1px solid rgba(143, 209, 106, 0.5); border-radius: 12px; background: rgba(143, 209, 106, 0.12); }

/* Support button with the PayPal mark; the banner folds out the amounts. */
.btn-paypal { display: inline-flex; align-items: center; gap: 8px; }
.paypal-logo { width: 20px; height: 20px; padding: 2px; border-radius: 5px; background: #fff; }
.banner-options { flex: 1 1 100%; display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255, 196, 107, 0.25); }
.banner-options[hidden] { display: none; }
.banner-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.banner-amounts a { padding: 12px 8px; border-radius: 8px; font-weight: 700; font-size: 17px; text-align: center; text-decoration: none; }
.banner-amounts a:hover { filter: brightness(1.15); }
.banner-amounts .zs-lime { background: #c7db2a; color: #111; }
.banner-amounts .zs-blue { background: #57a5f4; color: #111; }
.banner-amounts .zs-orange { background: #d9560d; color: #fff; }
.banner-amounts .zs-dark { background: #333; color: #fff; border: 1px solid #555; }
.banner-custom label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.banner-custom-row { display: flex; align-items: center; gap: 8px; }
.banner-custom-row span { font-weight: 700; }
.banner-custom input {
  width: 120px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #12161f; color: var(--text); font: inherit;
}
.banner-signin { margin: 0; font-size: 13px; color: var(--muted); }
.banner-signin a { color: var(--accent-2); }
@media (max-width: 600px) { .banner-amounts { grid-template-columns: repeat(2, 1fr); } .best-player { margin-left: 0; flex-basis: 100%; } }
