﻿/* ================================================================
                   SECTION 3 ▸ CUSTOM — Casino Vegas Theme
                   New rules not present in core.css or site.css.
                   ================================================================ */
.game-header {
    background: rgba(168, 184, 208, .05);
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}
.game-controls {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.capacity-display {
    font-size: .875rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.capacity-badge.available {
    background: rgba(74, 222, 128, .2);
    color: #4ade80;
}

.capacity-badge {
    padding: .15rem .4rem;
    border-radius: var(--radius-sm);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
}

.status-dot.connected {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, .5);
}

.status-dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--color-text-muted);
}

.invite-panel {
    background: rgba(168, 184, 208, .05);
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.invite-link-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: .85rem;
}

.invite-link-container {
    display: flex;
    gap: .5rem;
}

.no-control-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 15, 0.15);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

.no-control-message {
    background: linear-gradient(135deg, #0e1830, #060910);
    color: var(--gold-light);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold-dim);
    font-weight: 600;
    text-align: center;
}


/* ── Glowing gold card variant ── */
.card-casino {
    background: linear-gradient(160deg, #0f2e14 0%, #070f08 100%);
    border: 1px solid var(--gold-dim);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(201, 162, 39, 0.12);
    position: relative;
}

    /* Thin gold shimmer border overlay */
    .card-casino::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient( 135deg, rgba(201, 162, 39, 0.35) 0%, transparent 40%, rgba(201, 162, 39, 0.12) 100% );
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        padding: 1px;
        pointer-events: none;
    }

/* ── Section heading (gold + serif) ── */
.section-title {
    font-family: var(--font-heading);
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 0 14px rgba(201, 162, 39, 0.35);
}

/* ── Options bar ── */
.options-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
    margin-bottom: 1rem;
}

.dice-count-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .dice-count-selector h2 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--gold);
        white-space: nowrap;
        margin: 0;
        font-family: var(--font-heading);
    }

    .dice-count-selector .form-select {
        width: auto;
        min-width: 120px;
    }

/* ── Dice display area (the "table") ── */
.dice-display-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.75rem 1rem;
    min-height: 160px;
    background: radial-gradient(ellipse at center, #0d3f18 0%, #050d07 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin: 1rem 0;
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ── CSS pip-grid die face ── */
.die-pip {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #fefcf0, #dfc87a);
    border-radius: 14px;
    border: 1.5px solid #b8920a;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.55), inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 10px;
    gap: 3px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .die-pip:hover {
        transform: translateY(-3px) rotate(4deg);
        box-shadow: 6px 9px 20px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

.pip {
    width: 14px;
    height: 14px;
    background: #1a0c00;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

    .pip.hidden {
        visibility: hidden;
    }

/* ── Big result number ── */
.total-result-display {
    font-size: 4.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--gold);
    text-shadow: var(--neon-glow);
    line-height: 1;
    min-height: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-breakdown {
    color: var(--color-text-muted);
    font-size: 1rem;
    letter-spacing: 0.1em;
    min-height: 1.5rem;
}

/* ── Roll button ── */
.btn-roll {
    padding: 0.9rem 2.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, #8c6a00 100%);
    color: #1a0800;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 18px rgba(201, 162, 39, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

    /* Travelling gloss sheen on hover */
    .btn-roll::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -75%;
        width: 50%;
        height: 200%;
        background: linear-gradient( 105deg, transparent 20%, rgba(255, 255, 255, 0.18) 50%, transparent 80% );
        transform: skewX(-15deg);
        transition: left 0.55s ease;
    }

    .btn-roll:hover {
        box-shadow: 0 6px 28px rgba(201, 162, 39, 0.65), var(--neon-glow);
        transform: translateY(-2px);
    }

        .btn-roll:hover::before {
            left: 130%;
        }

    .btn-roll:active {
        transform: translateY(1px);
    }

/* ── Stat cards ── */
.stat-card {
    background: linear-gradient(160deg, #0f2e14, #070e08);
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.5rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .stat-card:hover {
        border-color: var(--gold);
        box-shadow: 0 0 10px rgba(201, 162, 39, 0.2);
    }

    .stat-card h4 {
        font-size: 1.5rem;
        font-weight: 700;
        font-family: var(--font-heading);
        color: var(--gold-light);
        margin-bottom: 0.2rem;
        text-shadow: 0 0 8px rgba(201, 162, 39, 0.4);
    }

    .stat-card small {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--color-text-muted);
    }

/* ── Roll history list ── */
.roll-history {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) transparent;
}

    .roll-history::-webkit-scrollbar {
        width: 5px;
    }

    .roll-history::-webkit-scrollbar-thumb {
        background: var(--gold-dim);
        border-radius: 3px;
    }

.roll-history-item, .history-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.08);
    font-size: 0.875rem;
    transition: background 0.15s;
}

    .roll-history-item:hover, .history-entry:hover {
        background: rgba(201, 162, 39, 0.05);
    }

    .roll-history-item .roll-values, .history-entry .roll-values {
        color: var(--color-text-muted);
    }

    .roll-history-item .roll-total, .history-entry .roll-total {
        color: var(--gold);
        font-weight: 700;
    }

/* ── Distribution chart ── */
#distributionChart {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dist-row, .distribution-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.dist-label {
    width: 2rem;
    text-align: right;
    color: var(--color-text-muted);
}

.dist-track , .progress{
    flex: 1;
    height: 0.6rem;
    background: #162a1a;
    border-radius: 3px;
    overflow: hidden;
}

.dist-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.dist-count {
    width: 2rem;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

/* ── Mode switch row ── */
.mode-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}


/* ── Chip dot decorations (purely presentational) ── */
.chip {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    vertical-align: middle;
    margin: 0 0.2rem;
}

.chip-gold {
    background: var(--gold);
    box-shadow: 0 0 6px rgba(201,162,39,0.7);
}

.chip-red {
    background: var(--red-chip);
    box-shadow: 0 0 6px rgba(192,57,43,0.7);
}

.chip-blue {
    background: var(--blue-chip);
    box-shadow: 0 0 6px rgba(26,79,160,0.7);
}

/* ── Gold ornament divider ── */
.ornament {
    text-align: center;
    position: relative;
    margin: 1.25rem 0;
    color: var(--gold-dim);
    font-size: 1rem;
    letter-spacing: 0.3em;
}

    .ornament::before,
    .ornament::after {
        content: '';
        position: absolute;
        top: 50%;
        width: calc(50% - 3rem);
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--gold-dim));
    }

    .ornament::before {
        left: 0;
    }

    .ornament::after {
        right: 0;
        background: linear-gradient(270deg, transparent, var(--gold-dim));
    }

.player-card {
    background: rgba(168, 184, 208, 0.05);
    border: 1px solid rgba(168, 184, 208, 0.15);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

    .player-card:hover {
        background: rgba(168, 184, 208, 0.08);
        border-color: rgba(168, 184, 208, 0.25);
    }

    .player-card.is-you {
        border-color: var(--gold);
        background: rgba(168, 184, 208, 0.1);
    }

    .player-card.has-control {
        box-shadow: 0 0 12px rgba(168, 184, 208, 0.25);
    }

.player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #030d1a;
}

.player-name {
    font-weight: 600;
    color: var(--color-text);
}

.player-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.35rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-you {
    background: rgba(168, 184, 208, 0.2);
    color: var(--gold-light);
}

.badge-host {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.badge-control {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
}

.pass-control-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.game-over-overlay,
.game-full-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 9, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.game-over-content,
.game-full-content {
    background: linear-gradient(160deg, #0e1830, #060910);
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

    .game-over-content h2,
    .game-full-content h2 {
        color: var(--gold-light);
        margin-bottom: 1rem;
        font-family: var(--font-heading);
    }

    .game-over-content p,
    .game-full-content p {
        color: var(--color-text-muted);
        margin-bottom: 1.5rem;
    }

.maintenance-message {
    background: linear-gradient(135deg, #1a3a4a, #0d1f2a);
    border-bottom: 2px solid var(--gold-dim);
    color: var(--gold-light);
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
}

.maintenance-hidden {
    display: none;
}

.keyboard-hints {
    text-align: left;
}


/* ── Mobile tweaks for custom elements ── */
@media (max-width: 767px) {
    .total-result-display {
        font-size: 3rem;
    }

    .die-pip {
        width: 78px;
        height: 78px;
    }

    .pip {
        width: 11px;
        height: 11px;
    }

    .game-header {
        font-size: .875rem;
    }
}
