:root {
  --bg:       #0d0f14;
  --surface:  #161a24;
  --surface2: #1e2435;
  --border:   #2a3149;
  --accent:   #f0a500;
  --accent2:  #4f9eff;
  --text:     #e2e8f0;
  --muted:    #8892a8;
  --green:    #22c55e;
  --red:      #ef4444;
  --radius:   8px;
  --font:     'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

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

/* ─── Layout ──────────────────────────────────────────────────── */

.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 4px; flex: 1; }

.nav-link {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.nav-user img { width: 26px; height: 26px; border-radius: 50%; }
.nav-user a { color: var(--muted); font-size: 12px; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.page-sub { color: var(--muted); margin-bottom: 24px; font-size: 13px; }

/* ─── Stat cards (dashboard) ──────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.card-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.card-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.card-value.accent  { color: var(--accent); }
.card-value.green   { color: var(--green); }
.card-value.blue    { color: var(--accent2); }

/* ─── Tables ──────────────────────────────────────────────────── */

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.section-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ─── Badges ──────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green  { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-red    { background: rgba(239,68,68,.15);   color: var(--red); }
.badge-yellow { background: rgba(240,165,0,.15);   color: var(--accent); }
.badge-blue   { background: rgba(79,158,255,.15);  color: var(--accent2); }
.badge-muted  { background: rgba(136,146,168,.1);  color: var(--muted); }

/* ─── Action bars ──────────────────────────────────────────────── */

.action-bars { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-name {
  width: 60px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.action-bar-track {
  flex: 1;
  background: var(--surface2);
  border-radius: 4px;
  height: 16px;
  overflow: hidden;
}

.action-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.bar-fold   { background: var(--red); }
.bar-call   { background: var(--green); }
.bar-check  { background: var(--accent2); }
.bar-bet    { background: var(--accent); }
.bar-raise  { background: #a855f7; }
.bar-allin  { background: #f43f5e; }

.action-count { font-size: 12px; color: var(--muted); width: 40px; text-align: right; }

/* ─── Player avatar row ───────────────────────────────────────── */

.player-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ─── Charts ──────────────────────────────────────────────────── */

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}

.mini-bar {
  background: var(--accent2);
  border-radius: 2px 2px 0 0;
  min-width: 4px;
  transition: background 0.15s;
}
.mini-bar:hover { background: var(--accent); }

/* ─── Empty state ─────────────────────────────────────────────── */

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ─── Back link ───────────────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* ─── Loading ─────────────────────────────────────────────────── */

.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Combo pills ─────────────────────────────────────────────── */

.combo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px 16px;
}

.combo-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-align: center;
}

.combo-name { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.combo-count { font-size: 20px; font-weight: 700; color: var(--accent); }

/* ─── Progress bar ───────────────────────────────────────────── */

.progress-track {
  background: var(--surface2);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s;
}

/* ─── Login page ─────────────────────────────────────────────── */

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  text-align: center;
}

.login-logo {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.login-sub { color: var(--muted); margin-bottom: 32px; }

.btn-steam {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1b2838;
  border: 1px solid #4c6b8a;
  color: #c6d4df;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-steam:hover { background: #2a475e; color: #fff; text-decoration: none; }

.denied-icon { font-size: 48px; margin-bottom: 16px; }
