/*
    Tavern Dice
    Dark Tavern Clean theme
*/

/* =========================================================
   1. Theme variables
   ========================================================= */

:root {
    --background-dark: #17120f;
    --background-medium: #241b16;
    --parchment: #d8c7a3;
    --parchment-light: #eee0bf;
    --text-light: #f3e7cf;
    --text-dark: #2a1f16;
    --text-muted: #a9987d;
    --gold: #b88a3b;
    --gold-light: #d3aa61;
    --gold-dark: #765322;
    --wine: #6e2f2f;
    --green: #41523a;
    --border-dark: #493526;
    --font-title: "Cinzel", serif;
    --font-body: "Inter", sans-serif;
    --font-menu: Consolas, "Geist Mono", "Geist Mono Fallback", monospace;
}


/* =========================================================
   2. Base / reset
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-menu);
    background: var(--background-dark);
    color: var(--text-light);
}

button,
input,
select {
    font: inherit;
}

    /* Remove native spinner from number inputs */

    input[type="number"] {
        -moz-appearance: textfield;
        appearance: textfield;
    }

        input[type="number"]::-webkit-outer-spin-button,
        input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }


/* =========================================================
   3. Page layout
   ========================================================= */

.landing-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 32px;
    background: radial-gradient( circle at center, rgba(117, 73, 35, 0.23) 0%, rgba(23, 18, 15, 0.65) 45%, rgba(13, 10, 8, 0.95) 100% ), linear-gradient( 135deg, #241a14 0%, #17120f 60%, #100c0a 100% );
}

/* Very subtle light source behind the card */

.landing-overlay {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: rgba(184, 138, 59, 0.07);
    filter: blur(100px);
    pointer-events: none;
}


/* =========================================================
   4. Main card
   ========================================================= */

.hero-card {
    width: min(520px, 100%);
    position: relative;
    z-index: 1;
    padding: 50px 48px 42px;
    text-align: center;
    background: linear-gradient( rgba(35, 27, 21, 0.97), rgba(26, 20, 16, 0.99) );
    border: 1px solid var(--gold-dark);
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(10, 7, 5, 0.35), inset 0 0 35px rgba(184, 138, 59, 0.04);
}

    /* Small decorative corner details */

    .hero-card::before,
    .hero-card::after {
        content: "";
        position: absolute;
        width: 55px;
        height: 55px;
        border-color: var(--gold);
        opacity: 0.5;
    }

    .hero-card::before {
        top: 12px;
        left: 12px;
        border-top: 1px solid;
        border-left: 1px solid;
    }

    .hero-card::after {
        right: 12px;
        bottom: 12px;
        border-right: 1px solid;
        border-bottom: 1px solid;
    }


/* =========================================================
   5. Dice logo
   ========================================================= */

.dice-logo {
    position: relative;
    width: 112px;
    height: 78px;
    margin: 2px auto 28px;
}

.logo-die {
    position: absolute;
    width: 58px;
    height: 58px;
    border: 2px solid var(--gold);
    border-radius: 11px;
    background: linear-gradient( 145deg, #f5e8c7, #dbc28d );
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35), inset 2px 2px 4px rgba(255, 255, 255, 0.4), inset -3px -3px 7px rgba(87, 51, 20, 0.16);
}

.logo-die-left {
    top: 12px;
    left: 11px;
    transform: rotate(-13deg);
}

.logo-die-right {
    top: 4px;
    right: 9px;
    z-index: 2;
    transform: rotate(10deg);
}

.pip {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-dark);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
}

.pip-tl {
    top: 12px;
    left: 12px;
}

.pip-tr {
    top: 12px;
    right: 12px;
}

.pip-c {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pip-bl {
    bottom: 12px;
    left: 12px;
}

.pip-br {
    right: 12px;
    bottom: 12px;
}


/* =========================================================
   6. Menu / system status
   ========================================================= */

.menu-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    font-family: var(--font-menu);
}

.menu-status-text {
    color: var(--gold-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    white-space: nowrap;
}

.menu-status-line {
    width: 26px;
    height: 1px;
    background: var(--gold-dark);
    opacity: 0.55;
}

.system-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    color: #665846;
    font-family: var(--font-menu);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.system-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 7px rgba(65, 82, 58, 0.8);
}


/* =========================================================
   7. Typography
   ========================================================= */

.eyebrow {
    margin: 0 0 9px;
    color: var(--gold);
    font-family: var(--font-menu);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-card h1 {
    margin: 0;
    color: var(--parchment-light);
    font-family: var(--font-title);
    font-size: clamp(40px, 7vw, 58px);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.subtitle {
    margin: 18px 0 29px;
    color: var(--text-muted);
    font-family: var(--font-menu);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.015em;
}


/* =========================================================
   8. Divider
   ========================================================= */

.divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 23px 0 31px;
    color: var(--gold-dark);
}

    .divider span {
        flex: 1;
        height: 1px;
        background: linear-gradient( to right, transparent, var(--gold-dark) );
    }

        .divider span:last-child {
            background: linear-gradient( to left, transparent, var(--gold-dark) );
        }

    .divider div {
        font-size: 9px;
    }


/* =========================================================
   9. Buttons
   ========================================================= */

.main-actions {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.button {
    display: block;
    width: 100%;
    position: relative;
    padding: 16px 52px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-menu);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

    .button::before {
        content: ">";
        position: absolute;
        top: 50%;
        left: 20px;
        transform: translateY(-50%) translateX(-5px);
        font-family: var(--font-menu);
        font-size: 16px;
        font-weight: 700;
        opacity: 0;
        transition: opacity 120ms ease, transform 120ms ease;
    }

    .button:hover {
        transform: translateY(-2px);
    }

        .button:hover::before {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }

    .button:active {
        transform: translateY(0);
    }

/* Primary button */

.button-primary {
    color: #21170e;
    background: linear-gradient( 180deg, #d8ae5c 0%, #b98937 100% );
    border: 1px solid #e1ba70;
    box-shadow: 0 5px 0 #745020, 0 10px 20px rgba(0, 0, 0, 0.28);
}

    .button-primary:hover {
        color: #160f09;
        background: linear-gradient( 180deg, #e3bd70 0%, #c79845 100% );
        box-shadow: 0 5px 0 #745020, 0 10px 25px rgba(184, 138, 59, 0.22);
        transform: translateY(-2px);
    }

    .button-primary:active {
        transform: translateY(3px);
        box-shadow: 0 2px 0 #745020, 0 5px 12px rgba(0, 0, 0, 0.25);
    }

/* Secondary button */

.button-secondary {
    color: var(--parchment-light);
    background: linear-gradient( 180deg, #292019 0%, #211914 100% );
    border: 1px solid #6d5134;
    box-shadow: 0 4px 0 #120e0b, inset 0 0 0 1px rgba(211, 170, 97, 0.04);
}

    .button-secondary:hover {
        color: var(--gold-light);
        background: linear-gradient( 180deg, #31251d 0%, #261c16 100% );
        border-color: var(--gold);
        box-shadow: 0 4px 0 #120e0b, 0 0 18px rgba(184, 138, 59, 0.08);
    }

    .button-secondary:active {
        transform: translateY(3px);
        box-shadow: 0 1px 0 #120e0b;
    }

/* Rules button */

.rules-button {
    display: inline-block;
    margin-top: 25px;
    padding: 7px 12px;
    color: #8e7d65;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-menu);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color 140ms ease, letter-spacing 140ms ease;
}

    .rules-button::before {
        content: "[ ";
    }

    .rules-button::after {
        content: " ]";
    }

    .rules-button:hover {
        color: var(--gold-light);
        letter-spacing: 0.09em;
    }

/* =========================================================
   Rules
   ========================================================= */

.rules-page {
    min-height: 100vh;
    padding: 48px 20px;
}

.rules-shell {
    position: relative;
    z-index: 1;
    width: min(820px, 100%);
    margin: 0 auto;
    padding: 36px;
    background: var(--background-medium);
    border: 1px solid var(--border-dark);
}

.rules-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-dark);
}

    .rules-header h1 {
        margin: 8px 0 12px;
        color: var(--parchment-light);
        font-family: var(--font-title);
        font-size: clamp(32px, 5vw, 52px);
    }

    .rules-header p {
        margin: 0;
        color: var(--text-muted);
        line-height: 1.7;
    }

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.rules-section {
    position: relative;
}

.rules-number {
    display: block;
    margin-bottom: 5px;
    color: var(--gold);
    font-family: var(--font-menu);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.rules-section h2 {
    margin: 0 0 12px;
    color: var(--parchment-light);
    font-family: var(--font-menu);
    font-size: 16px;
    letter-spacing: 0.08em;
}

.rules-section p {
    margin: 7px 0;
    color: var(--text-muted);
    line-height: 1.7;
}

    .rules-section p strong {
        color: var(--parchment-light);
    }

.rules-score-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

    .rules-score-grid > div,
    .rules-table > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 54px;
        padding: 10px 16px;
        background: var(--background-dark);
        border: 1px solid var(--border-dark);
    }

    .rules-score-grid strong,
    .rules-table strong {
        color: var(--gold-light);
        font-family: var(--font-menu);
    }

.rules-dice {
    color: var(--parchment-light);
    font-size: 34px;
}

.rules-table {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 14px;
}

    .rules-table span {
        color: var(--parchment-light);
        font-size: 24px;
        letter-spacing: 3px;
    }

.rules-note {
    margin-top: 14px !important;
    font-size: 13px;
}

.rules-example {
    margin-top: 12px;
    padding: 12px;
    color: var(--parchment-light);
    background: var(--background-dark);
    border-left: 2px solid var(--gold);
    font-family: var(--font-menu);
    font-size: 12px;
    line-height: 1.8;
}

    .rules-example span {
        margin: 0 5px;
        color: var(--gold);
    }

.rules-warning {
    margin-top: 14px;
    padding: 12px 14px;
    color: var(--gold-light);
    background: var(--background-dark);
    border-left: 2px solid var(--wine);
    font-family: var(--font-menu);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.rules-footer {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border-dark);
}

    .rules-footer .button {
        width: 100%;
    }

@media (max-width: 600px) {
    .rules-shell {
        padding: 24px 18px;
    }

    .rules-score-grid {
        grid-template-columns: 1fr;
    }

    .rules-table span {
        font-size: 19px;
    }
}


/* =========================================================
   10. Menu forms
   ========================================================= */

.menu-form-card {
    width: min(560px, 100%);
}

.menu-title {
    font-size: clamp(32px, 5vw, 44px) !important;
}

.form-description {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-family: var(--font-menu);
    font-size: 13px;
    line-height: 1.7;
}

.game-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        color: var(--gold);
        font-family: var(--font-menu);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.14em;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 14px 15px;
        color: var(--parchment-light);
        background: linear-gradient( 180deg, #19120e, #211813 );
        border: 1px solid #594127;
        border-radius: 4px;
        outline: none;
        font-family: var(--font-menu);
        font-size: 14px;
        box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
        transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
    }

        .form-group input:hover,
        .form-group select:hover {
            border-color: #806037;
        }

        .form-group input:focus,
        .form-group select:focus {
            border-color: var(--gold);
            background: #211914;
            box-shadow: 0 0 0 2px rgba(184, 138, 59, 0.08), inset 0 2px 5px rgba(0, 0, 0, 0.3);
        }

        .form-group input::placeholder {
            color: #665847;
        }

.form-submit {
    margin-top: 7px;
}

.back-link {
    display: inline-block;
    margin-top: 24px;
    color: #8e7d65;
    font-family: var(--font-menu);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color 140ms ease, transform 140ms ease;
}

    .back-link:hover {
        color: var(--gold-light);
        transform: translateX(-2px);
    }

.form-error {
    padding: 10px 12px;
    color: #d69b8f;
    background: rgba(110, 47, 47, 0.15);
    border-left: 2px solid var(--wine);
    font-family: var(--font-menu);
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* =========================================================
   11. Custom select
   ========================================================= */

.select-wrapper {
    position: relative;
}

    .select-wrapper select {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        padding-right: 46px;
    }

    .select-wrapper::after {
        content: "▾";
        position: absolute;
        top: 50%;
        right: 16px;
        transform: translateY(-50%);
        color: var(--gold-light);
        font-family: var(--font-menu);
        font-size: 16px;
        line-height: 1;
        pointer-events: none;
    }


/* =========================================================
   12. Score stepper
   ========================================================= */

.score-stepper {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    min-height: 52px;
    overflow: hidden;
    background: linear-gradient( 180deg, #19120e, #211813 );
    border: 1px solid #594127;
    border-radius: 4px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

    .score-stepper:focus-within {
        border-color: var(--gold);
        box-shadow: 0 0 0 2px rgba(184, 138, 59, 0.08), inset 0 2px 5px rgba(0, 0, 0, 0.3);
    }

.score-stepper-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--gold-light);
    background: linear-gradient( 180deg, #2b2119, #211812 );
    border: none;
    cursor: pointer;
    font-family: var(--font-menu);
    font-size: 22px;
    font-weight: 700;
    transition: background 120ms ease, color 120ms ease;
}

    .score-stepper-button:first-child {
        border-right: 1px solid #594127;
    }

    .score-stepper-button:last-child {
        border-left: 1px solid #594127;
    }

    .score-stepper-button:hover {
        color: #f2d18e;
        background: linear-gradient( 180deg, #37291e, #291e17 );
    }

    .score-stepper-button:active {
        background: #17100c;
    }

    .score-stepper-button:disabled {
        color: #5c4b39;
        background: #19130f;
        cursor: not-allowed;
    }

.score-stepper-value {
    width: 100%;
    padding: 0 12px;
    color: var(--parchment-light);
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none;
    font-family: var(--font-menu);
    font-size: 17px !important;
    font-weight: 700;
    text-align: center;
    box-shadow: none !important;
    cursor: default;
}


/* =========================================================
   13. Room code input
   ========================================================= */

.room-code-input {
    text-transform: uppercase;
    text-align: center;
    font-size: 18px !important;
    font-weight: 700;
    letter-spacing: 0.18em;
}

/* =========================================================
   14. Lobby
   ========================================================= */

.lobby-card {
    width: min(620px, 100%);
}

.lobby-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-bottom: 10px;
    color: var(--gold);
    border-bottom: 1px solid #4c3826;
    font-family: var(--font-menu);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.lobby-player-list {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.lobby-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 46px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(118, 83, 34, 0.35);
    font-family: var(--font-menu);
    font-size: 13px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-marker {
    width: 10px;
    color: var(--gold-light);
    font-weight: 700;
}

.player-name {
    color: var(--parchment-light);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.player-state {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

    .player-state.host {
        color: var(--gold);
    }

    .player-state.ready {
        color: #6f8d64;
    }

.active-player {
    background: linear-gradient( 90deg, rgba(184, 138, 59, 0.08), transparent );
}

.empty-player {
    opacity: 0.35;
}

.room-code-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.room-code-label {
    color: var(--text-muted);
    font-family: var(--font-menu);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.room-code {
    color: var(--parchment-light);
    font-family: var(--font-menu);
    font-size: 24px;
    letter-spacing: 0.22em;
}

.copy-code-button {
    padding: 6px 10px;
    color: #8e7d65;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-menu);
    font-size: 10px;
    letter-spacing: 0.08em;
    transition: color 140ms ease, letter-spacing 140ms ease;
}

    .copy-code-button:hover {
        color: var(--gold-light);
        letter-spacing: 0.11em;
    }

.lobby-actions {
    margin-top: 26px;
}

.waiting-message {
    padding: 16px;
    color: var(--text-muted);
    border: 1px solid #4c3826;
    font-family: var(--font-menu);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
}

.copy-code-button.copied {
    color: #7f9d71;
}

/* =========================================================
   15. Connection statuses
   ========================================================= */
.system-status.reconnecting {
    color: var(--gold-dark);
}

    .system-status.reconnecting .system-dot {
        background: var(--gold);
        box-shadow: 0 0 7px rgba(184, 138, 59, 0.8);
    }

.system-status.offline {
    color: #8f5a52;
}

    .system-status.offline .system-dot {
        background: var(--wine);
        box-shadow: 0 0 7px rgba(110, 47, 47, 0.8);
    }

.leave-room-form {
    margin: 0;
}

.leave-room-button {
    background: none;
    border: none;
    cursor: pointer;
}

.is-hidden {
    display: none !important;
}

/* =========================================================
   Game screen
   ========================================================= */

.game-page {
    align-items: stretch;
}

.game-shell {
    width: min(1180px, 100%);
    margin: auto;
    padding: 28px;
    position: relative;
    z-index: 1;
    background: linear-gradient( rgba(35, 27, 21, 0.97), rgba(20, 15, 12, 0.99) );
    border: 1px solid var(--gold-dark);
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 35px rgba(184, 138, 59, 0.04);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid #4c3826;
}

    .game-header h1 {
        margin: 5px 0 0;
        color: var(--parchment-light);
        font-family: var(--font-title);
        font-size: 28px;
    }

.game-ui-label {
    color: var(--gold-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.game-target {
    text-align: right;
}

    .game-target span {
        display: block;
        color: var(--gold);
        font-size: 9px;
        letter-spacing: 0.14em;
    }

    .game-target strong {
        color: var(--parchment-light);
        font-size: 22px;
    }

.game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    margin-top: 24px;
}

.game-board,
.game-scoreboard {
    border: 1px solid #4c3826;
    background: rgba(16, 11, 8, 0.25);
}

.game-board {
    padding: 30px;
}

.turn-status {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.dice-area {
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.game-die {
    width: 72px;
    height: 72px;
    color: var(--text-dark);
    background: linear-gradient( 145deg, #f5e8c7, #dbc28d );
    border: 2px solid var(--gold);
    border-radius: 12px;
    cursor: pointer;
    font-size: 42px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.35);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

    .game-die:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
    }

.score-readout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 24px;
    border-top: 1px solid #4c3826;
    border-bottom: 1px solid #4c3826;
}

    .score-readout div {
        padding: 15px;
        text-align: center;
    }

        .score-readout div + div {
            border-left: 1px solid #4c3826;
        }

    .score-readout span {
        display: block;
        margin-bottom: 5px;
        color: var(--text-muted);
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    .score-readout strong {
        color: var(--parchment-light);
        font-size: 22px;
    }

.game-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.scoreboard-header {
    padding: 14px;
    color: var(--gold);
    border-bottom: 1px solid #4c3826;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.scoreboard-player {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(118, 83, 34, 0.25);
    font-size: 12px;
}

    .scoreboard-player.current {
        color: var(--parchment-light);
        background: linear-gradient( 90deg, rgba(184, 138, 59, 0.1), transparent );
    }

.game-log {
    margin-top: 20px;
    padding-top: 14px;
    color: #665846;
    border-top: 1px solid #4c3826;
    font-size: 9px;
    letter-spacing: 0.12em;
}

.selection-info {
    min-height: 24px;
    margin-bottom: 12px;
    color: #75644e;
    font-family: var(--font-menu);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
}

.dice-placeholder {
    color: #5f503f;
    font-family: var(--font-menu);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.game-die.selected {
    border-color: var(--gold-light);
    transform: translateY(-10px);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(184, 138, 59, 0.22);
}

.game-die:disabled {
    cursor: default;
}

    .game-die:disabled:hover {
        transform: none;
    }

.scoreboard-player.playing {
    color: var(--parchment-light);
    background: linear-gradient( 90deg, rgba(184, 138, 59, 0.12), transparent );
}

.scoreboard-player.finished {
    opacity: 0.65;
}

.game-actions .button:disabled {
    color: #574b3d;
    background: #1b1511;
    border-color: #3d3025;
    box-shadow: 0 2px 0 #100c09;
    cursor: not-allowed;
    transform: none;
}

.game-log.error {
    color: #9d5b51;
}

.game-over-message {
    color: var(--gold-light);
    font-family: var(--font-menu);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.18em;
}


.match-leave-actions {
    margin-top: 18px;
    text-align: center;
}

.game-text-button {
    padding: 7px 12px;
    color: #786653;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-menu);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    transition: color 140ms ease;
}

    .game-text-button:hover {
        color: #a6675e;
    }

.results-actions {
    margin-top: 24px;
}

    .results-actions .waiting-message {
        width: 100%;
    }

.is-hidden {
    display: none !important;
}

.game-over-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--gold-light);
    font-family: var(--font-menu);
    letter-spacing: 0.14em;
}

    .game-over-message strong {
        color: var(--parchment-light);
        font-family: var(--font-title);
        font-size: 38px;
        letter-spacing: 0.03em;
    }

.game-over-label,
.game-over-subtitle {
    font-size: 10px;
    font-weight: 700;
}

/* =========================================================
   16. Responsive
   ========================================================= */

@media (max-width: 600px) {
    .landing-page {
        padding: 18px;
    }

    .hero-card {
        padding: 42px 25px 35px;
    }

    .dice-logo {
        width: 96px;
        height: 68px;
        margin-bottom: 22px;
        transform: scale(0.9);
    }

}

@media (max-width: 800px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .game-actions {
        grid-template-columns: 1fr;
    }

    .game-die {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
}
