/* static/css/games/hub.css
   Games hub — the arena board.

   House recipe, same family as task / album / tube: gold site page,
   charcoal band with a gold hairline, 2px ink borders on every element,
   one dominant teal action.

   Signature: the live cup's numbers, set larger than any other type on
   the site. Activity is the only thing a games hub can honestly
   promise, so it is the one place the design spends its boldness.

   Charcoal tile = you play against people. White tile = you play alone.
   That difference is carried by the surface, not by a caption. */

:root {
    --gh-ink:   #1d262c;
    --gh-panel: #36454F;
    --gh-gold:  #D4AF37;
    --gh-teal:  #0a6e6e;
    --gh-chip:  #f1ecda;
}

.gh-stage {
    max-width: 604px;
    margin: 1.5rem auto 3rem;
    padding: 0 2px;
    color: var(--gh-ink);
}

/* ---- header band: charcoal + gold hairline ---- */
.gh-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    background: var(--gh-panel);
    border: 2px solid var(--gh-ink);
    padding: 0.7rem 1rem 0.85rem;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.gh-head::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--gh-gold);
    transform: scaleX(0);
    transform-origin: left;
    animation: gh-rule 0.6s 0.1s ease forwards;
}

@keyframes gh-rule {
    to { transform: scaleX(1); }
}

.gh-eyebrow {
    margin: 0;
    font: 700 1rem/1 'Roboto', sans-serif;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gh-gold);
}

.gh-results {
    font: 700 0.72rem/1 'Roboto', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gh-panel);
    background: var(--gh-gold);
    border: 2px solid var(--gh-ink);
    padding: 4px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.gh-results:hover {
    background: #e6c552;
}

/* ---- the hero: one live cup, its numbers oversized ---- */
.gh-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: var(--gh-panel);
    border: 2px solid var(--gh-ink);
    padding: 0.9rem 1rem 1rem;
    margin-bottom: 1.1rem;
    text-decoration: none;
}

.gh-hero:hover {
    background: #3f5260;
}

.gh-hero-eyebrow {
    font: 700 0.68rem/1 'Roboto', sans-serif;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gh-gold);
}

.gh-hero-name {
    font: 700 1.1rem/1.25 'Roboto', sans-serif;
    color: #fff;
}

.gh-hero-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.15rem;
}

.gh-scores {
    display: flex;
    align-items: flex-end;
    gap: 1.6rem;
}

.gh-score {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gh-score-num {
    font: 700 2.6rem/0.85 'Roboto', sans-serif;
    font-variant-numeric: tabular-nums;
    color: var(--gh-gold);
}

.gh-score-label {
    font: 700 0.62rem/1 'Roboto', sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gh-chip);
}

/* the one dominant action */
.gh-enter {
    font: 700 0.85rem/1 'Roboto', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--gh-teal);
    border: 2px solid var(--gh-ink);
    padding: 0.55rem 1.1rem;
    white-space: nowrap;
}

.gh-hero:hover .gh-enter {
    background: #0c8181;
}

/* no cup running — quiet, honest, not an apology */
.gh-hero--empty {
    display: block;
    background: var(--gh-panel);
    border: 2px solid var(--gh-ink);
    padding: 1.1rem 1rem;
    margin-bottom: 1.1rem;
}

.gh-hero--empty p {
    margin: 0.35rem 0 0;
    font: 400 1rem/1.3 'Roboto', sans-serif;
    color: var(--gh-chip);
}

/* ---- section eyebrow ---- */
.gh-label {
    margin: 0 0 0.4rem;
    font: 700 0.68rem/1 'Roboto', sans-serif;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gh-panel);
}

.gh-label + .gh-grid {
    margin-bottom: 1.1rem;
}

/* ---- tiles: two columns, all the way down to the phone ---- */
.gh-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.gh-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 4.6rem;
    background: #fff;
    border: 2px solid var(--gh-ink);
    padding: 0.65rem 0.7rem;
    text-decoration: none;
}

.gh-tile:hover {
    background: var(--gh-chip);
}

.gh-tile-name {
    font: 700 0.78rem/1.3 'Roboto', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gh-ink);
}

/* only a tile that carries a cost chip has to make room for one */
.gh-tile--paid .gh-tile-name {
    padding-right: 2.6rem;
}

.gh-tile-stat {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
}

/* today rides along only on a day that actually happened — a zero
   says nothing, so it gets no chip at all */
.gh-tile-today {
    font: 700 0.62rem/1.5 'Roboto', sans-serif;
    letter-spacing: 0.04em;
    color: var(--gh-ink);
    background: var(--gh-chip);
    border: 1px solid var(--gh-ink);
    padding: 0 5px;
    white-space: nowrap;
}

.gh-tile-num {
    font: 700 1.6rem/0.9 'Roboto', sans-serif;
    font-variant-numeric: tabular-nums;
    color: var(--gh-ink);
}

.gh-tile-label {
    font: 700 0.62rem/1 'Roboto', sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gh-panel);
}

/* a cup tile carries the hero's pair of scores, at tile scale */
.gh-tile-scores {
    display: flex;
    align-items: flex-end;
    gap: 1.1rem;
}

.gh-tile-scores .gh-score-num {
    font-size: 1.6rem;
    line-height: 0.9;
}

.gh-tile-scores .gh-score-label {
    font-size: 0.6rem;
}

/* a cup tile wears the hero's charcoal: this one is against people */
.gh-tile--cup {
    background: var(--gh-panel);
}

.gh-tile--cup:hover {
    background: #3f5260;
}

.gh-tile--cup .gh-tile-name {
    color: #fff;
}

.gh-tile--cup .gh-tile-num {
    color: var(--gh-gold);
}

.gh-tile--cup .gh-tile-label {
    color: var(--gh-chip);
}

/* cost is marked only when there is one — free needs no badge */
.gh-cost {
    position: absolute;
    top: -2px;
    right: -2px;
    font: 700 0.6rem/1.5 'Roboto', sans-serif;
    letter-spacing: 0.06em;
    color: var(--gh-ink);
    background: var(--gh-gold);
    border: 2px solid var(--gh-ink);
    padding: 1px 6px;
}

/* ---- keyboard focus ---- */
.gh-results:focus-visible,
.gh-hero:focus-visible,
.gh-tile:focus-visible {
    outline: 3px solid var(--gh-teal);
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .gh-head::after {
        animation: none;
        transform: scaleX(1);
    }
}

/* ---- narrow screens: 2px sides, two columns kept ---- */
@media (max-width: 480px) {
    .gh-stage {
        margin: 0.5rem auto 1.5rem;
    }
    .gh-head {
        padding: 0.5rem 0.5rem 0.6rem;
        margin-bottom: 0.5rem;
    }
    .gh-eyebrow {
        font-size: 0.9rem;
    }
    .gh-hero {
        padding: 0.6rem 0.5rem 0.7rem;
        margin-bottom: 0.7rem;
    }
    .gh-hero--empty {
        padding: 0.8rem 0.5rem;
        margin-bottom: 0.7rem;
    }
    .gh-hero-name {
        font-size: 1rem;
    }
    .gh-scores {
        gap: 1.1rem;
    }
    .gh-score-num {
        font-size: 2.1rem;
    }
    .gh-enter {
        padding: 0.5rem 0.8rem;
        font-size: 0.78rem;
    }
    .gh-grid {
        gap: 4px;
    }
    .gh-label + .gh-grid {
        margin-bottom: 0.7rem;
    }
    .gh-tile {
        padding: 0.5rem 0.45rem;
        min-height: 4.2rem;
    }
    .gh-tile-name {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
    }
    .gh-tile--paid .gh-tile-name {
        padding-right: 2.3rem;
    }
    .gh-tile-num {
        font-size: 1.4rem;
    }
    .gh-tile-scores {
        gap: 0.8rem;
    }
    .gh-tile-scores .gh-score-num {
        font-size: 1.35rem;
    }
}
