/* =====================================================
   SHADOW SYNDICATE - HOLO-CHROME GAME STYLES
   "Luxury Future-Tech"
   ===================================================== */

/* ========== LAYOUT & BACKGROUND ========== */
.game-body {
    background: radial-gradient(circle at center, #1e2028 0%, #050505 100%);
    min-height: 100vh;
    overflow: hidden;
    font-family: var(--font-body);
    color: var(--chrome-highlight);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.05), transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.holographic-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    perspective: 1000px;
    transform: perspective(500px) rotateX(20deg) scale(2);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ========== MAIN TABLE LAYOUT ========== */
.holo-table {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6) var(--space-12);
    /* Bottom padding for controls */
    z-index: 1;
}

/* ========== DEALER PORTRAIT SIDEBAR ========== */
.dealer-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: opacity 0.3s ease;
}

.dealer-sidebar__header {
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dealer-sidebar__title {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.15rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
}

.dealer-sidebar__portraits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dealer-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dealer-portrait:hover {
    transform: scale(1.05);
}

.dealer-portrait__frame {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.dealer-portrait:hover .dealer-portrait__frame {
    border-color: var(--dealer-color, #fff);
    box-shadow: 0 0 15px color-mix(in srgb, var(--dealer-color, #fff) 40%, transparent);
}

.dealer-portrait.active .dealer-portrait__frame {
    border-color: var(--dealer-color, #fff);
    box-shadow: 0 0 20px color-mix(in srgb, var(--dealer-color, #fff) 50%, transparent);
}

.dealer-portrait__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.dealer-portrait__name {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.05rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.dealer-portrait:hover .dealer-portrait__name,
.dealer-portrait.active .dealer-portrait__name {
    color: var(--dealer-color, #fff);
}

/* ========== DEALER SHOWCASE (Large Image) ========== */
.dealer-showcase {
    position: fixed;
    left: 110px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dealer-showcase__img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    object-position: top center;
    border-radius: 16px;
    border: 2px solid var(--dealer-color, rgba(255, 255, 255, 0.2));
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.5),
        0 0 60px var(--dealer-glow, transparent);
    transition: all 0.3s ease;
}

.dealer-showcase__name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    color: var(--dealer-color, var(--chrome-highlight));
    text-transform: uppercase;
    text-shadow: 0 0 20px var(--dealer-glow, transparent);
}

/* ========== DEALER SPEECH PANEL (Right Side) ========== */
.dealer-speech-panel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 280px;
}

.dealer-speech-bubble {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--dealer-color, rgba(255, 255, 255, 0.15));
    border-radius: 20px;
    padding: 20px 24px;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--chrome-highlight);
    font-style: italic;
    text-align: center;
    min-height: 60px;
    box-shadow: 0 0 25px var(--dealer-glow, transparent);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(20px);
}

.dealer-speech-bubble.visible {
    opacity: 1;
    transform: translateX(0);
}

.dealer-speech-bubble::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 2rem;
    color: var(--dealer-color, var(--chrome-dark));
    opacity: 0.3;
}

.dealer-speech-name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    color: var(--dealer-color, var(--chrome-dark));
    text-transform: uppercase;
}

/* ========== HEADER ========== */
:root {
    --header-height: 90px;
    --header-collapsed-height: 40px;
}

.table-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    /* Center the content to match game max-width (1400px) */
    padding: 0 max(var(--space-6), calc(50vw - 700px));
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: height 0.3s ease, padding 0.3s ease;
}

/* Collapsed Header State */
.table-header.collapsed {
    height: var(--header-collapsed-height);
    padding: 0 var(--space-4);
}

.table-header.collapsed .system-status {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.table-header.collapsed .brand-text {
    display: none;
}

.table-header.collapsed .brand-logo {
    height: 28px;
}

.table-header.collapsed .brand-name {
    font-size: 0.9rem;
}

/* Header Toggle Button */
.header-toggle {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 20px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 10px 10px;
    color: var(--chrome-dark);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1001;
}

.header-toggle:hover {
    background: rgba(20, 20, 25, 0.95);
    color: var(--chrome-highlight);
}

.header-toggle::after {
    content: '▲';
    transition: transform 0.3s ease;
}

.table-header.collapsed .header-toggle::after {
    transform: rotate(180deg);
}

/* Logo Link Styling */
.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

/* System Status Transition */
.system-status {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.brand-display {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    height: 100%;
}

.brand-logo {
    height: 52px;
    /* Slightly larger */
    width: auto;
    filter: drop-shadow(0 0 15px rgba(192, 132, 252, 0.4));
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: rotate(180deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.15rem;
    background: var(--gradient-holo-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--chrome-dark);
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.system-status {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    height: 100%;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.status-item .label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--chrome-dark);
    letter-spacing: 0.15rem;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.status-item .value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--chrome-highlight);
    letter-spacing: 0.05rem;
}

.value--online {
    color: var(--holo-teal);
    text-shadow: 0 0 15px rgba(45, 212, 191, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}

.value--online::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: var(--holo-teal);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--holo-teal);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* ========== GAME ZONES ========== */
.dealer-zone,
.player-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.dealer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-4);
}

.dealer-avatar-holo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    padding: 2px;
    background: conic-gradient(from 0deg, transparent, var(--holo-purple), transparent);
    animation: spin 4s linear infinite;
    margin-bottom: var(--space-2);
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.dealer-avatar-holo:hover {
    box-shadow: 0 0 25px rgba(192, 132, 252, 0.6), 0 0 50px rgba(192, 132, 252, 0.3);
    transform: scale(1.05);
}

.dealer-avatar-holo::before {
    content: 'Change Dealer';
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(0, 0, 0, 0.9);
    color: var(--chrome-highlight);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.dealer-avatar-holo:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.dealer-avatar-holo .avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    border: 2px solid rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.dealer-score-pill {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--chrome-dark);
    padding: 2px 10px;
    border-radius: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.dealer-score-pill .score {
    color: var(--holo-blue);
    font-weight: bold;
}

/* Dealer Identity & Speech */
.dealer-identity {
    text-align: center;
    margin-bottom: var(--space-3);
}

.dealer-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    display: block;
    margin-bottom: var(--space-1);
}

.dealer-speech {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--chrome-highlight);
    max-width: 300px;
    min-height: 1.5em;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dealer-speech.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cards Row */
.card-row {
    display: flex;
    gap: -40px;
    /* Overlap */
    min-height: 160px;
    justify-content: center;
    perspective: 1000px;
}

/* ========== CARDS ========== */
.holo-card {
    width: 100px;
    height: 140px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #444;
    transition: transform 0.3s ease;
    margin-left: -30px;
    /* Stack overlap */
}

.holo-card:first-child {
    margin-left: 0;
}

.holo-card:hover {
    transform: translateY(-10px) rotateY(10deg);
    z-index: 10;
}

.holo-card.suit-hearts,
.holo-card.suit-diamonds {
    color: var(--holo-pink);
}

.holo-card.suit-spades,
.holo-card.suit-clubs {
    color: #1a1a1a;
}

/* Card Back */
.holo-card.hidden {
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1), transparent 60%),
        repeating-linear-gradient(45deg, #111 0px, #1a1a1a 10px);
    border: 1px solid var(--holo-purple);
}

.holo-card.hidden::after {
    content: '§';
    font-size: 2rem;
    color: var(--holo-purple);
    opacity: 0.5;
}

/* ========== CENTER STAGE & OVERLAYS ========== */
.center-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* Let clicks pass unless modal */
    z-index: 20;
    text-align: center;
}

.message-feed {
    font-family: var(--font-mono);
    letter-spacing: 0.2rem;
    color: var(--chrome-dark);
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

/* Result Modal */
.result-modal {
    pointer-events: auto;
    animation: modal-zoom 0.3s ease-out;
}

.modal-glass {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--holo-teal);
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.2);
    padding: var(--space-8);
    border-radius: 20px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
}

.result-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-holo-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.result-amount {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: var(--chrome-highlight);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ========== PLAYER ZONE ========== */
.player-hud {
    display: flex;
    gap: var(--space-12);
    margin-top: var(--space-6);
}

.score-display,
.bet-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-display .label,
.bet-display .label {
    font-size: 0.7rem;
    color: var(--chrome-dark);
    letter-spacing: 0.1rem;
    margin-bottom: 4px;
}

.score-display .score {
    font-size: 2rem;
    font-family: var(--font-display);
    color: var(--chrome-highlight);
}

.bet-display .amount {
    font-size: 1.5rem;
    font-family: var(--font-mono);
    color: var(--holo-gold);
}


/* ========== CONTROL DECK ========== */
.control-deck {
    background: rgba(20, 20, 25, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    padding: var(--space-4) var(--space-8);
    display: flex;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    position: relative;
    gap: var(--space-6);
}

.control-group {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

/* Chips */
.chip-selector {
    display: flex;
    gap: var(--space-2);
    margin-right: var(--space-6);
    padding-right: var(--space-6);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.chip {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333 0%, #111 100%);
    border: 2px solid var(--chrome-dark);
    color: var(--chrome-silver);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.chip:hover {
    transform: translateY(-5px);
    border-color: var(--holo-blue);
    color: #fff;
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
}

.chip--max {
    background: linear-gradient(135deg, var(--holo-gold), #b45309);
    border: none;
    color: #000;
}

/* Holo Buttons */
.holo-btn {
    padding: 12px 32px;
    border-radius: 30px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.primary-btn {
    background: var(--holo-teal);
    color: #000;
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.4);
}

.primary-btn:hover {
    background: #fff;
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.6);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--chrome-dark);
    color: var(--chrome-silver);
}

.secondary-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.action-btn:hover {
    background: var(--holo-purple);
    border-color: var(--holo-purple);
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.5);
    transform: translateY(-2px);
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ========== DEALER SELECTION MODAL ========== */
.dealer-select-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dealer-select-modal.visible {
    opacity: 1;
    visibility: visible;
}

.dealer-select-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.dealer-select-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--chrome-highlight);
    margin-bottom: var(--space-6);
    letter-spacing: 0.1rem;
}

.dealer-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.dealer-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4) var(--space-6);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-left: 4px solid var(--dealer-color, #fff);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dealer-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--dealer-color, #fff);
    transform: translateX(5px);
}

.dealer-option-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dealer-color, #fff);
    margin-bottom: 4px;
}

.dealer-option-desc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--chrome-dark);
}

.close-modal-btn {
    padding: 10px 30px;
    background: transparent;
    border: 1px solid var(--chrome-dark);
    border-radius: 30px;
    color: var(--chrome-dark);
    font-family: var(--font-display);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    border-color: var(--chrome-highlight);
    color: var(--chrome-highlight);
}

/* ========== DEALER SELECTOR BAR (Inline) ========== */
.dealer-selector-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: var(--space-4);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: opacity 0.3s ease;
}

.dealer-mini-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.dealer-mini-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--dealer-color, #fff);
    transform: translateY(-2px);
}

.dealer-mini-btn.active {
    background: rgba(var(--dealer-color-rgb, 255, 255, 255), 0.15);
    border-color: var(--dealer-color, #fff);
    box-shadow: 0 0 15px color-mix(in srgb, var(--dealer-color, #fff) 40%, transparent);
}

.dealer-mini-btn .mini-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.dealer-mini-btn .mini-name {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--chrome-dark);
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.dealer-mini-btn:hover .mini-name,
.dealer-mini-btn.active .mini-name {
    color: var(--dealer-color, #fff);
}

/* ========== SPLIT GAME LAYOUT (Sidebar + Stage) ========== */
.game-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    padding: var(--space-8);
    gap: var(--space-8);
}

/* Sidebar Controls */
.game-sidebar {
    width: 350px;
    min-width: 350px;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    height: fit-content;
    max-height: 100%;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--chrome-highlight);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-2);
}

/* Stage Area */
.game-stage {
    flex: 1;
    background: rgba(10, 10, 14, 0.4);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Sidebar Specific Inputs */
.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.sidebar-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all 0.2s;
}

.sidebar-input:focus {
    outline: none;
    border-color: var(--holo-purple);
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.1);
}

.sidebar-select {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    /* Force dark mode for native dropdown */
    color-scheme: dark;
    /* Custom dropdown arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.sidebar-select:focus {
    outline: none;
    border-color: var(--holo-teal);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.3);
}

.sidebar-select option {
    background: #0d1117;
    color: #fff;
    padding: 10px;
}

/* Full Width Buttons for Sidebar */
.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========== DICE GAME STYLES ========== */
.dice-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    /* height: 100%; Removed fixed height for better mobile reflow if needed */
}

/* Dice Result Display */
.dice-display-zone {
    text-align: center;
}

.dice-result-container {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--space-8) var(--space-12);
    min-width: 250px;
}

.dice-result-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    margin-bottom: var(--space-2);
}

.dice-result-number {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    background: var(--gradient-holo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.dice-result-number.win {
    color: var(--holo-teal);
    -webkit-text-fill-color: var(--holo-teal);
    text-shadow: 0 0 30px rgba(45, 212, 191, 0.5);
}

.dice-result-number.lose {
    color: var(--holo-pink);
    -webkit-text-fill-color: var(--holo-pink);
    text-shadow: 0 0 30px rgba(244, 114, 182, 0.5);
}

.dice-result-status {
    font-family: var(--font-display);
    font-size: 0.9rem;
    margin-top: var(--space-3);
    min-height: 1.5em;
}

/* Slider Zone */
.dice-slider-zone {
    width: 100%;
    max-width: 500px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--chrome-dark);
}

.slider-title {
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.slider-track {
    position: relative;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: visible;
}

.slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-holo);
    border-radius: 6px;
    transition: width 0.1s ease;
}

.slider-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: var(--chrome-highlight);
    border: 3px solid var(--holo-purple);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: box-shadow 0.2s ease;
}

.slider-value {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: #000;
}

/* Dice Stats */
.dice-stats-zone {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

.stat-pill {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 10px 24px;
    text-align: center;
}

.stat-pill--highlight {
    border-color: var(--holo-gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    display: block;
    margin-bottom: 2px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--chrome-highlight);
}

.stat-value--gold {
    color: var(--holo-gold);
}

.stat-value--teal {
    color: var(--holo-teal);
}

/* Bet Display for Dice */
.bet-display {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.bet-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
}

.bet-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--chrome-highlight);
}

.bet-currency {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--chrome-dark);
}

/* Quick Bet Chips for Dice */
.quick-bets {
    display: flex;
    gap: var(--space-2);
}

.quick-bets .chip {
    min-width: 40px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--chrome-dark);
    font-size: 0.8rem;
}

.quick-bets .chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--chrome-highlight);
}

.chip--max {
    background: rgba(251, 191, 36, 0.2) !important;
    color: var(--holo-gold) !important;
    border-color: var(--holo-gold) !important;
}

/* Game Rules Panel (Accessibility) */
.game-rules-panel {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 100;
}

.rules-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 25, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--chrome-dark);
    font-family: var(--font-display);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rules-toggle:hover {
    border-color: var(--holo-purple);
    color: var(--chrome-highlight);
}

.rules-content {
    position: absolute;
    top: 50px;
    right: 0;
    width: 280px;
    background: rgba(20, 25, 35, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--space-6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.game-rules-panel:hover .rules-content,
.game-rules-panel:focus-within .rules-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rules-content h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--holo-purple);
    margin-bottom: var(--space-4);
}

.rules-content ul {
    list-style: none;
    padding: 0;
}

.rules-content li {
    font-size: 0.85rem;
    color: var(--chrome-dark);
    padding: var(--space-2) 0;
    padding-left: 1rem;
    position: relative;
}

.rules-content li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--holo-teal);
}

/* ========== MINES GAME STYLES ========== */
.mines-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: 100px 20px 160px;
}

/* Multiplier Zone */
.mines-multiplier-zone {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.multiplier-display {
    text-align: center;
}

.multiplier-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    display: block;
    margin-bottom: var(--space-2);
}

.multiplier-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-holo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.potential-win {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--holo-teal);
    border-radius: 12px;
    padding: 12px 24px;
    text-align: center;
}

.potential-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    display: block;
}

.potential-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--holo-teal);
}

.potential-currency {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--chrome-dark);
}

/* Mines Grid */
.mines-grid-zone {
    display: flex;
    justify-content: center;
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 350px;
}

.mine-cell {
    width: 60px;
    height: 60px;
    background: rgba(20, 25, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
}

.mine-cell:hover:not(.revealed) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--holo-purple);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

.mine-cell.revealed {
    cursor: default;
}

.mine-cell.gem {
    background: rgba(45, 212, 191, 0.2);
    border-color: var(--holo-teal);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
    animation: gem-reveal 0.3s ease;
}

.mine-cell.mine {
    background: rgba(248, 113, 113, 0.3);
    border-color: var(--holo-pink);
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.5);
    animation: mine-explode 0.4s ease;
}

.cell-icon {
    width: 85%;
    height: 85%;
    object-fit: contain;
    animation: icon-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 8px currentColor);
}

@keyframes icon-pop {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.3) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes gem-reveal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes mine-explode {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Mines Controls */
.mines-selector {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.selector-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
}

.mines-select {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--chrome-highlight);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    /* Force dark mode for native dropdown */
    color-scheme: dark;
}

.mines-select:focus {
    outline: none;
    border-color: var(--holo-purple);
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.3);
}

/* Style the dropdown options */
.mines-select option {
    background: #0d1117;
    color: var(--chrome-highlight);
    padding: 10px;
    border: none;
}

.mines-select option:hover,
.mines-select option:focus,
.mines-select option:checked {
    background: linear-gradient(90deg, rgba(192, 132, 252, 0.3), transparent);
    color: #fff;
}

.bet-input-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.bet-input {
    width: 100px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--chrome-highlight);
    font-family: var(--font-mono);
    font-size: 1rem;
    text-align: right;
}

.bet-input:focus {
    outline: none;
    border-color: var(--holo-purple);
}

/* Inline Stats */
.game-stats-inline {
    display: flex;
    gap: var(--space-6);
}

.inline-stat {
    text-align: center;
}

.inline-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--chrome-dark);
    text-transform: uppercase;
    display: block;
}

.inline-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--chrome-highlight);
}

/* Cashout Button */
.cashout-btn {
    background: linear-gradient(135deg, var(--holo-teal), var(--holo-blue));
    color: #000;
    font-weight: 700;
    min-width: 160px;
}

.cashout-btn:hover {
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.5);
    transform: translateY(-2px);
}