:root {
  --bg: #17151e; --panel: #24212e; --line: #463e54; --text: #ece6d6; --dim: #a09a90;
  --gold: #f4c458; --gold-deep: #a06e1e; --violet: #4a3a6e; --violet-hi: #6c56a0; --red: #ff7864; --green: #82dc82;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background-image: radial-gradient(1200px 600px at 75% -10%, rgba(108, 86, 160, .35), transparent 60%),
                    radial-gradient(900px 500px at 0% 30%, rgba(160, 110, 30, .14), transparent 60%);
}
a { color: var(--gold); }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px); background: rgba(23, 21, 30, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; letter-spacing: .32em; text-decoration: none; font-size: 22px; }
nav a { margin-left: clamp(10px, 2.4vw, 28px); color: var(--text); text-decoration: none; opacity: .85; }
nav a:hover { opacity: 1; color: var(--gold); }
main { max-width: 1120px; margin: 0 auto; padding: 0 16px 60px; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: clamp(36px, 7vw, 90px) 0 40px; }
.kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: 13px; font-weight: 700; margin: 0 0 10px; }
h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; margin: 0 0 18px; }
.lead { color: var(--dim); font-size: 19px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.roster img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 2px solid var(--line); background: #0d0c12; }
.roster img:nth-child(2n) { transform: translateY(18px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 10px;
  border: 1px solid #826cb4; background: var(--violet); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--violet-hi); }
.btn.gold { background: var(--gold-deep); border-color: var(--gold); }
.btn.gold:hover { background: #c48c2c; }
.btn:disabled { opacity: .5; cursor: wait; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.modes article, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.modes h2, .panel h2 { color: var(--gold); margin: 0 0 8px; font-size: 22px; }
.modes p { margin: 0; color: var(--dim); }
.panel { margin: 22px 0; }

.account { max-width: 560px; margin-left: auto; margin-right: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 10px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.tabs button.on { color: var(--text); border-color: var(--gold); background: rgba(244, 196, 88, .08); }
form { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-size: 15px; color: var(--dim); }
input {
  font: inherit; color: var(--text); background: #302c3c; border: 1px solid #6e628c; border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.hint { color: var(--dim); font-size: 14px; margin: 0; }
.small-link { font-size: 14px; justify-self: start; }
.msg { min-height: 1.4em; margin: 0; font-size: 15px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stats div { background: #302c3c; border-radius: 10px; padding: 12px 8px; text-align: center; }
.stats span { display: block; font-size: 26px; font-weight: 800; color: var(--gold); }
.stats small { color: var(--dim); }
#signed-in h2 { font-size: 30px; }

.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #36303f; white-space: nowrap; }
th { color: var(--dim); font-weight: 600; font-size: 14px; }
td:nth-child(3) { font-weight: 700; color: var(--gold); }
tr.me td { background: rgba(244, 196, 88, .1); }
tbody tr:nth-child(1) td:first-child { color: var(--gold); font-weight: 800; }

footer { text-align: center; color: var(--dim); padding: 30px 16px; border-top: 1px solid var(--line); font-size: 14px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .roster { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .roster img:nth-child(2n) { transform: none; }
  .modes { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  nav a:first-child { display: none; }
  .roster { grid-template-columns: repeat(3, 1fr); }
}
