/* DIAMOND:CONTEXT — the design system.
 *
 * Dark terminal aesthetic per docs/07-DESIGN.md. A single green accent
 * (#3ddc84) carries every signal — live state, win expectancy, occupied
 * bases, leverage. Everything else is muted gray-green on near-black.
 */

:root {
    --bg: #0c0e0c;
    --fg: #3ddc84;
    --fg-dim: #2aa05f;
    --text: #8a9b8c;          /* muted gray-green for primary text */
    --text-dim: #4a5a4c;      /* dimmer for labels and metadata */
    --border: #1f2520;
    --border-strong: #2a3530;
    --tile: 155px;
}

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

html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                 "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── HEADER ────────────────────────────────────────────────────── */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 0.5px solid var(--border);
    flex-shrink: 0;
}

header h1 {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text);
}

header h1 .colon { color: var(--fg); }

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--text);
}

.live-indicator .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fg);
    box-shadow: 0 0 8px rgba(61, 220, 132, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

/* ── THE BOARD ─────────────────────────────────────────────────── */

main.board {
    flex: 1;
    overflow: auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--tile));
    grid-auto-rows: auto;
    gap: 18px;
    align-content: start;
    justify-content: center;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    padding: 96px 16px;
    line-height: 1.8;
}

.empty .sub {
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--fg-dim);
    margin-top: 12px;
}

/* ── GAME TILE (the recurring card unit) ───────────────────────── */

.tile {
    width: var(--tile);
    border: 0.5px solid var(--border-strong);
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 11px;
}

.tile .matchup {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tile .team {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--text);
}

.tile .team .score {
    color: var(--fg);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tile .state {
    color: var(--text-dim);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.tile .diamond {
    width: 40px;
    height: 40px;
    align-self: center;
    opacity: 0.9;
    color: var(--border-strong);
}

.tile .base {
    fill: var(--text-dim);
    transition: fill 200ms ease;
}

.tile .base.occupied {
    fill: var(--fg);
    filter: drop-shadow(0 0 3px rgba(61, 220, 132, 0.5));
}

.tile .we {
    text-align: center;
    color: var(--fg);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    margin-top: auto;
}

.tile[data-status="Final"] .we { color: var(--text-dim); }
.tile[data-status="Preview"] .we { display: none; }

.tile .we .label {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ── BOTTOM NAV ────────────────────────────────────────────────── */

nav {
    display: flex;
    border-top: 0.5px solid var(--border);
    flex-shrink: 0;
}

nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 0.15em;
    border-right: 0.5px solid var(--border);
    transition: color 120ms ease;
}

nav .nav-item:last-child { border-right: none; }

nav .nav-item .num {
    color: var(--fg);
    margin-right: 8px;
    font-weight: 600;
}

nav .nav-item.active { color: var(--text); }

nav .nav-item.disabled {
    cursor: default;
    color: var(--text-dim);
    opacity: 0.5;
}
