/* Amogus Bet - casino theme, no frameworks.
   Palette: casino felt green, gold trim, roulette red, near-black background. */

:root {
    --bg: #0b0e0c;
    --felt: #123528;
    --felt-dark: #0d2a1f;
    --line: #2a4a3b;
    --gold: #e3b558;
    --gold-light: #f5d78a;
    --red: #c8433c;
    --red-dark: #9c2f2a;
    --green: #2e8b57;
    --text: #f2ede2;
    --muted: #9fb0a6;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Trebuchet MS", Verdana, Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(6, 10, 8, 0.88), rgba(6, 10, 8, 0.93)),
        url("/assets/img/bg.webp") center / cover fixed no-repeat,
        var(--bg);
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.03em;
}

a {
    color: var(--gold-light);
}

code {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 8px;
    color: var(--gold-light);
    font-size: 1.05em;
    user-select: all;
}

.gold { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.warning { color: #e9c46a; }
.error { color: #ef6b64; }
.text-win { color: #57d98a; }
.text-lose { color: #ef6b64; }
.text-warn { color: #e9c46a; }
.w-100 { width: 100%; }

/* ------------------------------------------------------------ buttons */

.btn {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 12px 26px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-gold {
    background: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, #b8892f);
    color: #241a05;
    box-shadow: 0 4px 14px rgba(227, 181, 88, 0.35);
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(227, 181, 88, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--gold);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(227, 181, 88, 0.12);
}

.btn-danger {
    background: linear-gradient(160deg, #e05a52, var(--red) 60%, var(--red-dark));
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(200, 67, 60, 0.45);
}

.btn-big {
    font-size: 1.15rem;
    padding: 16px 34px;
}

.btn-small {
    font-size: 0.85rem;
    padding: 8px 16px;
}

.btn-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ------------------------------------------------------------ panels */

.panel {
    background:
        radial-gradient(120% 140% at 50% 0%, rgba(46, 139, 87, 0.16), transparent 60%),
        linear-gradient(170deg, var(--felt), var(--felt-dark));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(227, 181, 88, 0.12);
    padding: 26px 22px;
    margin: 0 auto 26px;
    max-width: 880px;
    text-align: center;
}

.panel h2 {
    margin-top: 0;
    color: var(--gold-light);
}

.payout {
    display: inline-block;
    background: rgba(200, 67, 60, 0.18);
    border: 1px solid rgba(200, 67, 60, 0.5);
    color: #f4a49f;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.9rem;
}

.muted-panel h2 {
    color: var(--muted);
}

.game-result {
    min-height: 1.6em;
    margin: 14px 0;
    font-size: 1.15rem;
    color: var(--gold-light);
}

/* Every game panel follows the same rhythm: title, muted description,
   payout chip, then the interactive area in a shared recessed stage. */
.game-panel > p:not(.payout) {
    color: var(--muted);
}

.game-stage {
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.4)),
        rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(227, 181, 88, 0.16);
    border-radius: 12px;
    padding: 18px 14px;
    margin: 16px 0 4px;
}

.games-grid {
    max-width: 880px;
    margin: 0 auto;
}

.form-message {
    min-height: 1.2em;
    margin: 10px 0;
}

/* ------------------------------------------------------------ landing */

.landing {
    padding: 48px 16px 12px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-wheel {
    position: relative;
    width: 230px;
    height: 230px;
    margin: 0 auto 18px;
}

/* Decorative roulette wheel: alternating red and black pockets with a
   single green zero pocket, spinning slowly. */
.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #1c1610 0 24%, rgba(0, 0, 0, 0) 24.5%),
        conic-gradient(var(--green) 0deg 10deg, rgba(0, 0, 0, 0) 10deg),
        repeating-conic-gradient(from 10deg, #96261f 0deg 10deg, #14100c 10deg 20deg);
    border: 9px solid var(--gold);
    box-shadow:
        0 0 40px rgba(227, 181, 88, 0.25),
        inset 0 0 0 6px #1c1610,
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    animation: wheel-spin 48s linear infinite;
}

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

.hero-logo {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    margin: 10px 0 4px;
    text-shadow: 0 4px 18px rgba(227, 181, 88, 0.35);
}

.hero-tagline {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 0 0 26px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.about {
    text-align: left;
}

.about h2 {
    text-align: center;
}

.game-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.game-list li {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
}

/* Poker chip bullet */
.chip-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px dashed rgba(255, 255, 255, 0.85);
}

.chip-dot.red { background: var(--red); }
.chip-dot.gold { background: var(--gold); }
.chip-dot.green { background: var(--green); }

/* ------------------------------------------------------------ topbar */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    background: rgba(8, 12, 10, 0.9);
    border-bottom: 1px solid var(--line);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.topbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.balance-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    text-align: center;
    padding: 10px;
    font-size: 1.05rem;
    color: #241a05;
    background: linear-gradient(160deg, var(--gold-light), var(--gold));
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------ casino floor */

.casino-floor {
    padding: 28px 16px 6px;
}

.bet-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 18px 0 10px;
}

.bet-control input[type="number"] {
    width: 120px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 10px;
}

/* Casino chip styled steppers */
.chip-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px dashed rgba(255, 255, 255, 0.85);
    outline: 4px solid var(--red);
    outline-offset: -1px;
    background: var(--red);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chip-btn:last-of-type {
    background: var(--green);
    outline-color: var(--green);
}

.chip-btn:hover {
    transform: scale(1.08) rotate(8deg);
}

input[type="range"] {
    width: min(420px, 90%);
    accent-color: var(--gold);
    margin: 6px 0 12px;
}

input[type="number"],
input[type="text"],
input[type="password"] {
    font: inherit;
    color: var(--text);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

input:focus-visible,
.btn:focus-visible,
.chip-btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

/* ------------------------------------------------------------ roulette game */

.roulette-stage {
    max-width: 360px;
    margin: 16px auto 4px;
}

.barrel-wrap {
    position: relative;
    width: 170px;
    margin: 6px auto;
}

.you-marker {
    position: absolute;
    top: 50%;
    right: -76px;
    transform: translateY(-50%);
    color: var(--gold-light);
    border: 1px solid var(--gold);
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.barrel {
    width: 170px;
    height: 170px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    border: 5px solid #3a3a3a;
    background: radial-gradient(circle, #575757, #1d1d1d);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9), 0 6px 18px rgba(0, 0, 0, 0.6);
}

.barrel::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    background: #111;
    border: 2px solid #555;
    border-radius: 50%;
}

.chamber {
    width: 42px;
    height: 42px;
    border: 2px solid #2c2c2c;
    border-radius: 50%;
    background: #6c6c6c;
    position: absolute;
    top: calc(50% - 21px);
    left: calc(50% - 21px);
    box-shadow: inset 0 0 6px #000;
    transition: background-color 0.3s;
}

.chamber:nth-child(1) { transform: rotate(0deg) translate(60px) rotate(0deg); }
.chamber:nth-child(2) { transform: rotate(60deg) translate(60px) rotate(-60deg); }
.chamber:nth-child(3) { transform: rotate(120deg) translate(60px) rotate(-120deg); }
.chamber:nth-child(4) { transform: rotate(180deg) translate(60px) rotate(-180deg); }
.chamber:nth-child(5) { transform: rotate(240deg) translate(60px) rotate(-240deg); }
.chamber:nth-child(6) { transform: rotate(300deg) translate(60px) rotate(-300deg); }

.chamber.loaded {
    background: var(--red);
}

.barrel.animate-spin {
    animation: barrel-spin 3.3s linear;
}

@keyframes barrel-spin {
    to { transform: rotate(1080deg); }
}

/* ------------------------------------------------------------ spin game */

.case {
    max-width: 520px;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid var(--gold);
    border-radius: 10px;
    position: relative;
    background: rgba(0, 0, 0, 0.35);
}

.case-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 12px solid var(--gold);
    z-index: 2;
}

.reel {
    display: flex;
    transition: transform 3.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reel .item {
    flex: 0 0 33.33%;
    padding: 22px 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
}

/* Reel item color follows the multiplier tier. */
.reel .item-low { color: #8fa79b; }
.reel .item-mid { color: var(--text); }
.reel .item-high { color: var(--gold-light); }
.reel .item-top { color: #ef6b64; }

/* ------------------------------------------------------------ dice game */

.dice-countdown {
    min-height: 1.6em;
    font-size: 1.2rem;
    color: var(--gold-light);
}

.dice {
    width: 100px;
    height: 100px;
    margin: 16px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #111;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #d1d1d1);
    box-shadow:
        5px 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(0, 0, 0, 0.08);
    perspective: 1000px;
}

.dice-roll {
    animation: dice-roll 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

@keyframes dice-roll {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(90deg) scale(0.9); }
    50% { transform: rotate(180deg) scale(1.05); }
    75% { transform: rotate(270deg) scale(0.9); }
}

.dice-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dice-controls input {
    width: min(240px, 100%);
    text-align: center;
}

/* ------------------------------------------------------------ lotto game */

.lotto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
}

.lotto-grid input {
    text-align: center;
}

.lotto-results {
    margin-top: 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 16px;
    text-align: left;
    max-width: 560px;
    margin-inline: auto;
}

/* ------------------------------------------------------------ cards game */

.cards-table {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 0 0 4px;
}

/* Face down by default (dark back with a gold weave), the .revealed
   class flips a card to its cream face. */
.playing-card {
    width: 110px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-weight: 700;
    font-size: 1.9rem;
    color: var(--gold);
    background:
        repeating-linear-gradient(45deg, rgba(227, 181, 88, 0.12) 0 6px, rgba(0, 0, 0, 0) 6px 12px),
        linear-gradient(160deg, #1b3529, #10241b);
    border: 2px solid var(--gold);
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.playing-card.revealed {
    font-size: 1rem;
    color: #241a05;
    background: linear-gradient(135deg, #fdf6e3, #eadcb8);
}

.playing-card:hover {
    transform: translateY(-4px);
}

.playing-card.flipping {
    animation: card-flip 1s forwards;
}

@keyframes card-flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0); }
}

.vs {
    font-family: Georgia, serif;
    font-size: 1.3rem;
    color: var(--red);
    font-weight: 700;
}

.cards-labels {
    display: flex;
    justify-content: center;
    gap: 130px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ------------------------------------------------------------ emergency meeting */

.meeting-stage {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 26px;
}

.suspect {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.suspect:hover:not(:disabled) {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.suspect:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.suspect-name {
    color: var(--muted);
    font-size: 0.85rem;
}

/* A crewmate bean: body plus visor plus backpack, pure CSS. */
.crewmate {
    display: block;
    position: relative;
    width: 54px;
    height: 66px;
    border-radius: 26px 26px 12px 12px;
    box-shadow: inset -6px -8px 0 rgba(0, 0, 0, 0.25);
}

.crewmate::before {
    content: "";
    position: absolute;
    top: 12px;
    right: -5px;
    width: 32px;
    height: 18px;
    background: linear-gradient(135deg, #d9eef5, #8fb6c9);
    border-radius: 10px;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15);
}

.crewmate::after {
    content: "";
    position: absolute;
    top: 16px;
    left: -9px;
    width: 12px;
    height: 32px;
    border-radius: 6px 0 0 6px;
    background: inherit;
    filter: brightness(0.75);
}

.crew-red { background: #c8433c; }
.crew-cyan { background: #3fc1c9; }
.crew-lime { background: #7ac74f; }

.suspect.voted {
    border-color: var(--gold-light);
    box-shadow: 0 0 14px rgba(227, 181, 88, 0.35);
}

.suspect.shake .crewmate {
    animation: sus-shake 0.4s ease-in-out infinite;
}

@keyframes sus-shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-7deg); }
    75% { transform: rotate(7deg); }
}

.suspect.impostor {
    border-color: var(--red);
}

.suspect.impostor .crewmate {
    box-shadow: 0 0 20px rgba(200, 67, 60, 0.8), inset -6px -8px 0 rgba(0, 0, 0, 0.25);
}

.suspect.impostor .suspect-name {
    color: #ef6b64;
    font-weight: 700;
}

/* ------------------------------------------------------------ crew wheel */

.wheel-stage {
    position: relative;
    width: 220px;
    margin: 0 auto;
}

.wheel-pointer {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid var(--gold-light);
    z-index: 2;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

/* 15 pockets of 24deg: red and blue interleaved, gold pocket last
   (336deg to 360deg). Segment layout must match game_wheel() in api.php. */
.crew-wheel {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #1c1610 0 22%, rgba(0, 0, 0, 0) 22.5%),
        conic-gradient(rgba(0, 0, 0, 0) 0 336deg, var(--gold) 336deg 360deg),
        repeating-conic-gradient(#96261f 0deg 24deg, #2b5f8f 24deg 48deg);
    border: 8px solid var(--gold);
    box-shadow:
        0 0 30px rgba(227, 181, 88, 0.2),
        inset 0 0 0 5px #1c1610,
        inset 0 0 25px rgba(0, 0, 0, 0.8);
    transition: transform 4s cubic-bezier(0.15, 0.85, 0.25, 1);
}

.crew-wheel.no-transition {
    transition: none;
}

.btn-wheel-red {
    background: linear-gradient(160deg, #d55950, #96261f);
    color: #fff;
}

.btn-wheel-blue {
    background: linear-gradient(160deg, #4d86b8, #2b5f8f);
    color: #fff;
}

.btn-wheel-red:hover:not(:disabled),
.btn-wheel-blue:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------------ vent sweeper */

.vents-status {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.vents-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-width: 320px;
    margin: 0 auto;
}

.vent {
    aspect-ratio: 1;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    cursor: pointer;
    background:
        repeating-linear-gradient(0deg, #3d3d3d 0 3px, #262626 3px 9px);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    font-size: 1.3rem;
    line-height: 1;
    color: #fff;
}

.vent:hover:not(:disabled):not(.safe):not(.mine) {
    transform: scale(1.06);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(227, 181, 88, 0.4);
}

.vent:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.vent.safe {
    background: linear-gradient(160deg, #2e8b57, #1d5c39);
    border-color: #2e8b57;
    opacity: 1;
}

.vent.safe::after {
    content: "\2713";
}

.vent.mine {
    background: linear-gradient(160deg, #d55950, #7c1d17);
    border-color: var(--red);
    opacity: 1;
}

.vent.mine::after {
    content: "\2620";
}

/* ------------------------------------------------------------ modals */

.modal {
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    background: linear-gradient(170deg, #17281f, #0e1a14);
    color: var(--text);
    padding: 0;
    width: min(480px, calc(100vw - 32px));
    box-shadow: var(--shadow);
}

.modal-wide {
    width: min(680px, calc(100vw - 32px));
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gold-light);
}

.modal-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 18px 20px;
    text-align: left;
}

.modal-body label {
    display: block;
    margin: 12px 0 4px;
}

.modal-body input {
    width: 100%;
}

.modal-body ol {
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 6px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
}

.progress {
    height: 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--line);
    overflow: hidden;
    margin: 14px 0;
}

.progress-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: repeating-linear-gradient(
        45deg,
        var(--gold),
        var(--gold) 12px,
        var(--gold-light) 12px,
        var(--gold-light) 24px
    );
    transition: width 0.4s ease;
}

/* ------------------------------------------------------------ statistics */

.stats-page {
    padding: 48px 16px 12px;
    text-align: center;
}

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

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stats-table th,
.stats-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.stats-table th {
    color: var(--gold-light);
    font-family: Georgia, serif;
    letter-spacing: 0.04em;
}

.stats-table tr:hover td {
    background: rgba(227, 181, 88, 0.06);
}

.stats-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stats-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    max-width: 880px;
    margin: 0 auto;
}

.stats-columns .panel {
    margin: 0;
    max-width: none;
}

/* KPI tiles */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.stat-tile {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    color: var(--muted);
    font-size: 0.82rem;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
}

/* Activity chart: single series columns on a 0 to niceMax scale.
   Heights come from bh-* classes in 5% steps, see views/statistics.php. */

.chart-plot {
    position: relative;
    padding: 26px 0 0;
    margin-top: 10px;
}

.chart-gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.chart-gridline span {
    position: absolute;
    top: -0.7em;
    left: 0;
    font-size: 0.72rem;
    color: var(--muted);
    background: transparent;
    padding-right: 6px;
    font-variant-numeric: tabular-nums;
}

/* Offsets measured from the top of the 180px tall column track. */
.chart-gridline.at-100 { top: 26px; }
.chart-gridline.at-50 { top: 116px; }

.chart-cols {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 180px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0 4px;
}

.chart-col {
    position: relative;
    flex: 1 1 0;
    max-width: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 24px;
    background: var(--gold);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    flex-shrink: 0;
}

.chart-col:hover .chart-bar {
    background: var(--gold-light);
}

.chart-value {
    font-size: 0.72rem;
    color: var(--text);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.chart-day {
    position: absolute;
    top: 100%;
    margin-top: 6px;
    font-size: 0.68rem;
    color: var(--muted);
    white-space: nowrap;
}

.chart {
    padding-bottom: 26px;
}

.bh-0 { height: 0; }
.bh-5 { height: 5%; }
.bh-10 { height: 10%; }
.bh-15 { height: 15%; }
.bh-20 { height: 20%; }
.bh-25 { height: 25%; }
.bh-30 { height: 30%; }
.bh-35 { height: 35%; }
.bh-40 { height: 40%; }
.bh-45 { height: 45%; }
.bh-50 { height: 50%; }
.bh-55 { height: 55%; }
.bh-60 { height: 60%; }
.bh-65 { height: 65%; }
.bh-70 { height: 70%; }
.bh-75 { height: 75%; }
.bh-80 { height: 80%; }
.bh-85 { height: 85%; }
.bh-90 { height: 90%; }
.bh-95 { height: 95%; }
.bh-100 { height: 100%; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------ footer */

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    padding: 26px 16px 34px;
    border-top: 1px solid var(--line);
    margin-top: 30px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 560px) {
    .topbar {
        justify-content: center;
    }

    .cards-labels {
        gap: 90px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .chart-cols {
        gap: 4px;
    }

    .chart-col:nth-child(odd) .chart-day {
        display: none;
    }
}

@media (max-width: 760px) {
    .stats-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .you-marker {
        display: none;
    }
}

/* Two column game floor on wide screens, panels flow like a masonry. */
@media (min-width: 1100px) {
    .games-grid {
        max-width: 1240px;
        columns: 2;
        column-gap: 26px;
    }

    .games-grid .panel {
        max-width: none;
        margin: 0 0 26px;
        break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wheel {
        animation: none;
    }
}
