/* Design System & Base Reset */
:root {
    --felt-green: #073a24;
    --felt-green-light: #0d5c3a;
    --felt-border: #16432f;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa7c11;
    --gold-glow: 0 0 12px rgba(212, 175, 55, 0.4);
    --gold-glow-strong: 0 0 20px rgba(212, 175, 55, 0.8);
    
    --dark-bg: #090c10;
    --dark-card: rgba(17, 22, 28, 0.85);
    --light-border: rgba(212, 175, 55, 0.2);
    --light-border-hover: rgba(212, 175, 55, 0.4);
    
    --text-light: #f5f6f8;
    --text-gray: #8b949e;
    --text-gold: #e5c158;
    
    --card-red: #e53e3e;
    --card-black: #1a202c;
    
    --transition-fast: 0.2s ease;
    --transition-slow: 0.4s ease;
    
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --blur-glass: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

h1, h2, h3, .logo h1 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); }
    100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
}

@keyframes dealCard {
    0% {
        transform: translate(200px, -200px) rotate(45deg) scale(0.3);
        opacity: 0;
    }
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes bounceAlert {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-pop {
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.text-gold {
    color: var(--text-gold);
    font-weight: 600;
}

.gold-glow {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    font-weight: 700;
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: var(--gold-glow-strong);
    transform: translateY(-2px);
}
.btn-gold:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border: none;
}
.btn-primary:hover {
    box-shadow: 0 0 12px rgba(42, 82, 152, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}
.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: var(--gold-glow);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

/* Glassmorphism Panels */
.glassmorphism {
    background: var(--dark-card);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    border: 1px solid var(--light-border);
    box-shadow: var(--shadow-premium);
    border-radius: 12px;
}

/* View Control */
.view {
    display: none;
    height: 100vh;
    width: 100vw;
}
.view.active {
    display: flex;
    flex-direction: column;
}

/* ===========================================
   1. AUTH VIEW
   =========================================== */
#auth-view {
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #0e271a 0%, #07120c 60%, #000000 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
    animation: fadeIn var(--transition-slow);
}

.auth-card .logo {
    margin-bottom: 30px;
}

.auth-card .logo i {
    font-size: 40px;
    color: var(--gold);
    margin-bottom: 12px;
}

.auth-card .logo h1 {
    font-size: 32px;
    letter-spacing: 4px;
    color: #fff;
}

.auth-card .logo .subtitle {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-gray);
    display: block;
    margin-top: 5px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--light-border);
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 16px;
    font-weight: 500;
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
}
.auth-tab:hover {
    color: #fff;
}
.auth-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: all var(--transition-fast);
}
.input-group input:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--gold-glow);
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 13px;
}
.alert-danger {
    background: rgba(229, 62, 98, 0.15);
    border: 1px solid rgba(229, 62, 98, 0.4);
    color: #ff8b8b;
}

/* ===========================================
   2. LOBBY VIEW
   =========================================== */
#lobby-view {
    background: radial-gradient(circle, #0e271a 0%, #07120c 70%, #030705 100%);
    padding: 20px;
    overflow-y: auto;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin-bottom: 30px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 18px;
}

.user-info .username-label {
    font-weight: 600;
    font-size: 16px;
    display: block;
}

.balance-container {
    font-size: 13px;
    display: flex;
    gap: 5px;
}

.balance-lbl {
    color: var(--text-gray);
}

.lobby-logo h1 {
    font-size: 26px;
    letter-spacing: 4px;
    color: #fff;
    filter: drop-shadow(0 0 5px rgba(212,175,55,0.3));
}

.lobby-main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.tables-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.table-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    transition: all var(--transition-fast);
}
.table-card:hover {
    border-color: var(--light-border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), var(--gold-glow);
    transform: translateY(-2px);
}

.table-meta h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 5px;
}

.table-meta .limits {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-meta .limits strong {
    color: var(--text-gold);
}

.table-players-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.player-count-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--light-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
}

.player-count-badge i {
    margin-right: 5px;
}

.table-state {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.state-betting { color: #48bb78; }
.state-playing { color: #f6ad55; }
.state-waiting { color: var(--text-gray); }

.rules-section {
    padding: 25px;
}

.rules-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.rules-section ul {
    list-style: none;
}

.rules-section li {
    font-size: 13.5px;
    margin-bottom: 12px;
    line-height: 1.5;
    position: relative;
    padding-left: 18px;
}
.rules-section li::before {
    content: "♦";
    position: absolute;
    left: 0;
    color: var(--gold);
}

.rules-section li ul {
    margin-top: 5px;
    padding-left: 10px;
}
.rules-section li ul li::before {
    content: "•";
    color: var(--text-gray);
}

/* Spinner Loader */
.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================================
   3. TABLE VIEW
   =========================================== */
#table-view {
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    background: #06090e;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.table-info {
    text-align: center;
}

.table-info h2 {
    font-size: 20px;
    letter-spacing: 2px;
}

.table-limits {
    font-size: 11px;
    color: var(--text-gray);
    letter-spacing: 1px;
}

.table-user-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.table-user-stats .user-label {
    font-size: 12px;
    color: var(--text-gray);
}

.table-user-stats .user-balance {
    font-size: 18px;
    font-weight: 700;
}

/* Main Area Layout */
.table-layout-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    perspective: 1200px;
    perspective-origin: 50% 30%;
}

/* Green felt table styling */
.table-felt {
    background: radial-gradient(circle, var(--felt-green-light) 0%, var(--felt-green) 70%, #03140c 100%);
    border: 16px solid #2d160c; /* Mahogany wood border */
    border-top-width: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 20px 10px 20px;
    transform: rotateX(12deg);
    transform-origin: bottom center;
    transform-style: preserve-3d;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8), 0 20px 40px rgba(0,0,0,0.6);
    border-radius: 0 0 24px 24px;
}

.felt-inner {
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Dealer position */
.dealer-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    position: relative;
    z-index: 10;
}

.dealer-label {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 15px;
    border-radius: 20px;
    border: 1px solid var(--light-border);
    margin-bottom: 15px;
}

.dealer-score-badge {
    position: absolute;
    top: 35px;
    background: var(--gold);
    color: #000;
    font-weight: 700;
    font-size: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 20;
}

.card-hand {
    display: flex;
    justify-content: center;
    gap: -15px; /* Negative margin overlap for cards */
    height: 110px;
    min-width: 100px;
}

/* Table Text Inscription */
.table-inscription {
    text-align: center;
    color: rgba(212, 175, 55, 0.15);
    pointer-events: none;
    user-select: none;
    margin: 30px 0;
}

.table-inscription h3 {
    font-size: 40px;
    letter-spacing: 12px;
    font-weight: 900;
}

.table-inscription p {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 500;
}

.table-inscription .bj-payout {
    font-size: 13px;
    font-family: 'Cinzel', serif;
    color: rgba(212, 175, 55, 0.25);
    margin-top: 4px;
}

/* 5 Seats curved configuration */
.seats-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 160px;
    position: relative;
    padding-bottom: 20px;
}

/* Positions each seat in a curved arc */
.seat {
    position: absolute;
    width: 18%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all var(--transition-fast);
}

.seat[data-index="0"] { left: 3%; bottom: 40px; }
.seat[data-index="1"] { left: 24%; bottom: 10px; }
.seat[data-index="2"] { left: 50%; bottom: 0; transform: translateX(-50%); }
.seat[data-index="3"] { right: 24%; bottom: 10px; }
.seat[data-index="4"] { right: 3%; bottom: 40px; }

/* Empty seat style */
.seat.empty {
    justify-content: center;
}

.btn-sit-here {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(212, 175, 55, 0.4);
    border: 1px dashed rgba(212, 175, 55, 0.4);
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-sit-here:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border-style: solid;
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
}

/* Seated details */
.seat-holder {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

.player-identity {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    padding: 4px 8px;
    width: 90px;
    text-align: center;
    z-index: 10;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.player-identity.active-turn {
    border-color: var(--gold);
    box-shadow: var(--gold-glow-strong);
    animation: pulseGold 2s infinite;
}

.player-identity .player-name {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.player-identity .player-bank {
    font-size: 10px;
    color: var(--text-gold);
    display: block;
    margin-top: 1px;
}

/* Hand positioning inside seat */
.seat .card-hand {
    margin-bottom: -15px;
    margin-top: -30px;
}

.player-bet-badge {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
    z-index: 12;
    margin-top: 4px;
}

.seat-score-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1.5px solid var(--gold);
    z-index: 30;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.seat-score-badge.blackjack {
    background: var(--gold);
    color: #000;
    font-weight: 800;
    border-color: #fff;
}

.seat-score-badge.busted {
    background: #e53e3e;
    color: #fff;
    font-weight: 800;
    border-color: #ff8b8b;
}

.seat-status-label {
    position: absolute;
    top: 0;
    font-size: 9px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--light-border);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 15;
    animation: bounceAlert 1s infinite;
}
.status-bust { color: #fc8181; border-color: #e53e3e; }
.status-win { color: #68d391; border-color: #48bb78; }
.status-push { color: #f6e05e; border-color: #d69e2e; }

/* Turn countdown ring around active player */
.turn-timer-ring {
    position: absolute;
    width: 102px;
    height: 48px;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid var(--gold);
    border-radius: 8px;
    pointer-events: none;
    box-shadow: var(--gold-glow);
    z-index: 9;
}

/* ===========================================
   4. CARD GRAPHICS (CSS-based luxury cards)
   =========================================== */
.card-wrapper {
    position: relative;
    width: 70px;
    height: 100px;
    perspective: 1000px;
}

.card-wrapper.animate-deal {
    animation: dealCard 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Multi-card overlapping effect */
.card-hand .card-wrapper:not(:first-child) {
    margin-left: -32px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    border-radius: 6px;
    transition: transform var(--transition-slow);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 6px;
}

/* Face of the card */
.card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fa 100%);
    border: 1.5px solid #dcdcdc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
    color: var(--card-black);
}

.card-front.hearts, .card-front.diamonds {
    color: var(--card-red);
}

.card-corner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.card-corner .rank {
    font-size: 14px;
    font-weight: 700;
}

.card-corner .suit-small {
    font-size: 9px;
    margin-top: 1px;
}

.card-corner.bottom {
    transform: rotate(180deg);
}

.card-center-suit {
    font-size: 22px;
    text-align: center;
    align-self: center;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.1));
}

.card-center-graphic {
    font-size: 24px;
    align-self: center;
    text-align: center;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15));
    opacity: 0.9;
}
.hearts .card-center-graphic, .diamonds .card-center-graphic {
    color: var(--card-red);
}
.clubs .card-center-graphic, .spades .card-center-graphic {
    color: var(--card-black);
}
.card-center-graphic.face-a {
    font-size: 30px;
}

/* Card back pattern */
.card-back {
    background: radial-gradient(circle, #aa1a1a 0%, #680e0e 70%, #300606 100%);
    border: 2px solid #fff;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.card-back::after {
    content: "♠♥♦♣";
    font-size: 10px;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 1px;
    font-family: 'Cinzel', serif;
}

/* Reveal face down card */
.card-wrapper.face-down .card-inner {
    transform: rotateY(180deg);
}

/* ===========================================
   5. HUD OVERLAY & GAME ACTIONS
   =========================================== */
.hud-overlay {
    width: 100%;
    max-width: 800px;
    margin: 10px auto 0 auto;
    padding: 15px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.game-status-announcer {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

.countdown-bar-container {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.countdown-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
    width: 100%;
    transition: width 1s linear;
}

.countdown-text {
    position: absolute;
    right: 5px;
    top: -10px;
    font-size: 9px;
    color: var(--text-gray);
}

.action-controls-container {
    width: 100%;
    display: flex;
    justify-content: center;
    min-height: 48px;
}

.controls-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Chips selectors styled */
.chips-selector {
    display: flex;
    gap: 10px;
}

.chip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px dashed #fff;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all var(--transition-fast);
}
.chip:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}
.chip:active {
    transform: scale(0.95);
}

.chip-10 { background: radial-gradient(circle, #3182ce 0%, #2b6cb0 100%); }
.chip-50 { background: radial-gradient(circle, #38a169 0%, #2f855a 100%); }
.chip-100 { background: radial-gradient(circle, #2d3748 0%, #1a202c 100%); border-color: var(--gold); color: var(--gold); }
.chip-500 { background: radial-gradient(circle, #805ad5 0%, #6b46c1 100%); }

.bet-input-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bet-current-display {
    font-size: 14px;
    font-weight: 600;
}

.btn-choice {
    min-width: 130px;
}

.spectator-msg {
    font-size: 12px;
    color: var(--text-gray);
    font-style: italic;
}

/* ===========================================
   6. SIDEBAR (CHAT & LOGS)
   =========================================== */
.table-sidebar {
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    overflow: hidden;
}

.sidebar-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--light-border);
}

.sidebar-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 12px;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
}
.sidebar-tab:hover {
    color: #fff;
}
.sidebar-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-content {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.sidebar-content.active {
    display: flex;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Chat bubble designs */
.chat-msg {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 85%;
    align-self: flex-start;
    animation: fadeIn 0.2s ease-out;
}

.chat-msg.self {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.15);
    align-self: flex-end;
}

.chat-msg .msg-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
    font-size: 10.5px;
}

.chat-msg .sender {
    font-weight: 700;
    color: var(--text-gold);
}
.chat-msg.self .sender {
    color: #fff;
}

.chat-msg .time {
    color: var(--text-gray);
}

.chat-msg .msg-body {
    font-size: 12.5px;
    line-height: 1.4;
    word-break: break-word;
}

/* Log messaging design */
.log-msg {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-gray);
    padding: 4px 8px;
    border-left: 2px solid var(--light-border);
    animation: fadeIn 0.2s ease-out;
}

.log-msg .log-time {
    font-weight: 500;
    margin-right: 5px;
    font-size: 10px;
}

.log-msg.system {
    color: var(--text-gold);
    border-left-color: var(--gold);
    background: rgba(212, 175, 55, 0.03);
}

/* Chat text input */
.message-input-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--light-border);
    gap: 8px;
}

.message-input-form input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.message-input-form input:focus {
    border-color: var(--gold);
}

.message-input-form button {
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.message-input-form button:hover {
    box-shadow: var(--gold-glow);
    transform: scale(1.05);
}

.sound-toggle-container {
    padding: 10px;
    border-top: 1px solid var(--light-border);
    display: flex;
    justify-content: center;
}

.btn-sound {
    background: transparent;
    border: 1px solid var(--light-border);
    color: var(--text-gray);
    padding: 6px 15px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    text-transform: uppercase;
    transition: all var(--transition-fast);
}
.btn-sound:hover {
    border-color: var(--gold);
    color: #fff;
}

/* ===========================================
   7. MODAL STYLING
   =========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.modal-card {
    max-width: 380px;
    width: 90%;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-card h3 {
    font-size: 20px;
    color: var(--gold);
}

.modal-card p {
    font-size: 13.5px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* ===========================================
   8. RESPONSIVE MEDIA QUERIES
   =========================================== */
/* Tablet views */
@media (max-width: 992px) {
    #lobby-view {
        overflow-y: auto;
    }
    
    .lobby-main {
        grid-template-columns: 1fr;
    }
    
    .table-layout-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 200px;
    }
    
    .table-sidebar {
        border-top: 1px solid var(--light-border);
        border-left: none;
        grid-template-rows: auto 1fr;
    }

    .sound-toggle-container {
        display: none; /* Hide sound toggle or merge on small screens to save space */
    }
}

/* Mobile landscape / small tablets */
@media (max-width: 768px) {
    .table-inscription h3 {
        font-size: 28px;
        letter-spacing: 6px;
    }
    
    .seat[data-index="0"] { left: 2%; bottom: 35px; }
    .seat[data-index="1"] { left: 22%; bottom: 8px; }
    .seat[data-index="2"] { left: 50%; bottom: 0; }
    .seat[data-index="3"] { right: 22%; bottom: 8px; }
    .seat[data-index="4"] { right: 2%; bottom: 35px; }
    
    .seat {
        width: 19%;
    }
    
    .btn-sit-here {
        padding: 6px 10px;
        font-size: 9px;
    }
    
    .player-identity {
        width: 75px;
        padding: 2px 4px;
    }
    
    .player-identity .player-name {
        font-size: 9px;
    }
    
    .card-wrapper {
        width: 50px;
        height: 72px;
    }
    
    .card-hand .card-wrapper:not(:first-child) {
        margin-left: -22px;
    }
    
    .card-corner .rank {
        font-size: 11px;
    }

    .card-corner .suit-small {
        font-size: 8px;
        margin-top: 1px;
    }
    
    .card-center-suit {
        font-size: 14px;
    }

    .card-center-graphic {
        font-size: 15px;
    }

    .card-center-graphic.face-a {
        font-size: 18px;
    }

    .card-front {
        padding: 2px;
    }
    
    .dealer-score-badge {
        top: 25px;
        font-size: 10px;
        width: 18px;
        height: 18px;
    }
    
    .seat-score-badge {
        font-size: 9px;
        padding: 1px 5px;
    }

    .turn-timer-ring {
        width: 82px;
        height: 38px;
    }

    .table-inscription {
        margin: 15px 0;
    }

    .felt-inner {
        justify-content: flex-start;
        gap: 10px;
    }

    .table-felt {
        border-width: 10px;
    }

    .seats-container {
        margin-top: 40px;
        height: 130px;
    }
}

/* Micro devices (Mobile portrait) */
@media (max-width: 480px) {
    #lobby-view {
        padding: 10px;
    }

    .lobby-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .lobby-logo {
        order: -1;
    }
    
    .table-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .table-players-status {
        align-items: center;
    }
    
    .table-header {
        padding: 10px;
    }
    
    .table-info h2 {
        font-size: 16px;
    }
    
    .table-user-stats .user-balance {
        font-size: 14px;
    }
    
    .chips-selector {
        gap: 5px;
    }
    
    .chip {
        width: 32px;
        height: 32px;
        font-size: 9px;
        border-width: 2px;
    }
    
    .btn-choice {
        min-width: 75px;
        padding: 6px 8px;
        font-size: 10px;
        gap: 4px;
    }

    .seat[data-index="0"] { left: 1%; bottom: 30px; }
    .seat[data-index="1"] { left: 21%; bottom: 5px; }
    .seat[data-index="2"] { left: 50%; bottom: 0; transform: translateX(-50%); }
    .seat[data-index="3"] { right: 21%; bottom: 5px; }
    .seat[data-index="4"] { right: 1%; bottom: 30px; }

    .seat {
        width: 19%;
    }

    .table-layout-container {
        grid-template-rows: 1fr 180px;
    }

    .hud-overlay {
        padding: 8px 10px;
        margin: 5px auto 0 auto;
        gap: 6px;
    }

    .action-controls-container {
        min-height: 38px;
    }
}

/* ===========================================
   9. LOBBY EXPANSION & CASINO GAMES CSS
   =========================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    perspective: 1200px;
}

.game-selector-card {
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(145deg, rgba(23, 29, 37, 0.9) 0%, rgba(13, 17, 23, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 290px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.game-selector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.game-selector-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), var(--gold-glow-strong);
    transform: translateY(-10px) rotateX(8deg) rotateY(-4deg) scale(1.03);
}

.game-selector-card .game-icon {
    font-size: 45px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(212,175,55,0.3));
}

.game-icon-unicode {
    font-size: 55px;
    line-height: 45px;
    font-family: sans-serif;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.game-selector-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.game-selector-card p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 20px;
}

.lobby-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* MINES GRID STYLE */
.mines-felt {
    justify-content: center;
    align-items: center;
}

.mines-grid-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
}

.mine-tile {
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid var(--light-border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-gray);
    transition: all var(--transition-fast);
}

.mine-tile:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
    transform: scale(1.05);
}

.mine-tile:disabled {
    cursor: not-allowed;
}

.mine-tile.gem {
    background: radial-gradient(circle, #38a169 0%, #22543d 100%);
    border-color: #48bb78;
    color: #fff;
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.4);
}

.mine-tile.exploded {
    background: radial-gradient(circle, #e53e3e 0%, #742a2a 100%);
    border-color: #fc8181;
    color: #fff;
    animation: shake 0.3s ease;
}

.mine-tile.revealed-mine {
    background: rgba(229, 62, 62, 0.15);
    border-color: rgba(229, 62, 62, 0.4);
    color: #fc8181;
    opacity: 0.7;
}

.mine-tile.revealed-gem {
    background: rgba(56, 161, 105, 0.15);
    border-color: rgba(56, 161, 105, 0.4);
    color: #48bb78;
    opacity: 0.7;
}

.mines-sidebar-inputs {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    justify-content: flex-start;
}

.mines-stats-panel {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    padding: 15px;
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.next-mult-preview {
    font-size: 11px;
    color: var(--text-gray);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 5px;
}

/* SLOTS STYLING */
.slots-felt {
    justify-content: center;
    align-items: center;
}

.slot-machine-casing {
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    border: 8px solid var(--gold);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), var(--gold-glow);
    max-width: 480px;
    width: 100%;
}

.slot-lines-canvas-container {
    position: relative;
    width: 100%;
    background: #0d1117;
    border-radius: 8px;
    overflow: hidden;
}

.slot-lines-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.slot-reels-container {
    display: flex;
    gap: 15px;
    padding: 15px;
    justify-content: space-around;
}

.slot-reel {
    flex: 1;
    background: #090c10;
    border: 2px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    height: 240px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.9);
}

.slot-symbol-box {
    height: 70px;
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    text-shadow: 0 4px 6px rgba(0,0,0,0.4);
}

.slots-sidebar-inputs {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.slots-announcer {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--light-border);
}

.slots-multiplier-table {
    border-top: 1px solid var(--light-border);
    padding-top: 15px;
}

.slots-multiplier-table h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.slots-multiplier-table ul {
    list-style: none;
}

.slots-multiplier-table li {
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-gray);
}

.slots-multiplier-table li strong {
    color: var(--text-gold);
}

/* PLINKO STYLING */
.plinko-felt {
    justify-content: center;
    align-items: center;
}

.plinko-board-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 600 / 460;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid var(--light-border);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.plinko-canvas {
    width: 100%;
    height: 380px;
    pointer-events: none;
    z-index: 10;
}

.plinko-buckets-rack {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 35px;
    padding: 0 4px;
}

.plinko-bucket {
    flex: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #000;
    transition: all var(--transition-fast);
}

.plinko-bucket.center { background: #48bb78; }
.plinko-bucket.medium { background: #ed8936; }
.plinko-bucket.extreme { background: #e53e3e; color: #fff; }

.plinko-bucket.hit-highlight {
    transform: scaleY(1.2);
    box-shadow: 0 0 10px #fff;
    filter: brightness(1.3);
}

.plinko-sidebar-inputs {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plinko-bucket-history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    min-height: 48px;
}

.hist-chip {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    color: #000;
}
.hist-chip.center { background: #48bb78; }
.hist-chip.medium { background: #ed8936; }
.hist-chip.extreme { background: #e53e3e; color: #fff; }

/* ROCKET CRASH STYLING */
.crash-felt {
    justify-content: flex-start;
    padding: 15px;
}

.crash-canvas-area {
    flex: 1;
    position: relative;
    background: radial-gradient(circle, #0e1e2c 0%, #050b11 100%);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.crash-multiplier-banner {
    font-size: 55px;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    color: #fff;
    z-index: 20;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.crash-status-text {
    font-size: 13px;
    color: var(--text-gray);
    z-index: 20;
    margin-top: 10px;
}

.crash-rocket {
    position: absolute;
    font-size: 32px;
    color: var(--gold);
    z-index: 15;
    pointer-events: none;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 10px var(--gold));
}

.thrust-flame {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 10px;
    background: linear-gradient(270deg, #ed8936 0%, transparent 100%);
    animation: flicker 0.1s infinite;
}

.explosion-fire {
    position: absolute;
    font-size: 60px;
    z-index: 16;
    transform: translate(-50%, -50%);
    animation: scaleUp 0.2s ease forwards;
}

.crash-input-console {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}

.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.input-field-group label {
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
}

.input-field-group input, .input-field-group select {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--light-border);
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    outline: none;
}
.input-field-group input:focus, .input-field-group select:focus {
    border-color: var(--gold);
}

.crash-players-list {
    flex: 1;
    overflow-y: auto;
}

.crash-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 12.5px;
}

.player-bet-badge-crash {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}
.player-bet-badge-crash.bg-waiting { background: rgba(255,255,255,0.1); color: #fff; }
.player-bet-badge-crash.bg-win { background: #48bb78; color: #000; }

.crash-history-bar {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--light-border);
    overflow-x: auto;
}

.crash-hist-badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #000;
}
.crash-hist-badge.center { background: rgba(255,255,255,0.2); color: #fff; }
.crash-hist-badge.medium { background: #48bb78; }
.crash-hist-badge.extreme { background: var(--gold); }

/* POKER STYLING */
.felt-poker {
    background: radial-gradient(circle, #0f345c 0%, #06182c 70%, #01060c 100%);
    border-color: #2d160c; /* Mahogany wood border for Poker felt */
}

#poker-seats-container {
    margin-top: auto;
}

.poker-board-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.pot-display-board {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--light-border);
    border-radius: 30px;
    padding: 4px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.pot-display-board .pot-lbl {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-gray);
}

.pot-display-board .pot-val {
    font-size: 14px;
    font-weight: 700;
}

.community-cards-rack {
    display: flex;
    gap: 8px;
    height: 80px;
    justify-content: center;
}

.poker-community-slot-empty {
    width: 56px;
    height: 80px;
    border: 1px dashed rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    background: rgba(0,0,0,0.15);
}

.poker-community-cards .card-wrapper {
    width: 56px;
    height: 80px;
}

.poker-community-cards .card-corner .rank {
    font-size: 12px;
}
.poker-community-cards .card-center-suit {
    font-size: 18px;
}

.poker-dealer-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    background: #e2e8f0;
    color: #000;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.poker-chips-bet {
    background: linear-gradient(135deg, #2b6cb0 0%, #1a365d 100%);
    margin-top: 8px;
}

.poker-raise-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--light-border);
}

.raise-slider-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.raise-slider-box input[type="range"] {
    width: 90px;
    accent-color: var(--gold);
    cursor: pointer;
}

.raise-slider-value {
    font-size: 12px;
    color: var(--text-gold);
    font-weight: 700;
    min-width: 45px;
    text-align: right;
}

@keyframes flicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* RESPONSIVE ADDITIONS FOR NEW GAMES */
@media (max-width: 768px) {
    .mines-grid-board {
        max-width: 300px;
    }
    
    .slot-machine-casing {
        padding: 12px;
    }
    .slot-reel {
        height: 180px;
    }
    .slot-symbol-box {
        font-size: 26px;
        height: 50px;
        width: 50px;
    }
    .slot-lines-canvas-container {
        height: 200px;
    }

    .plinko-canvas {
        height: 260px;
    }
    .plinko-buckets-rack {
        height: 25px;
    }
    .plinko-bucket {
        font-size: 7px;
    }

    .community-cards-rack {
        height: 60px;
        gap: 4px;
    }
    .poker-community-slot-empty {
        width: 42px;
        height: 60px;
    }
    .poker-community-cards .card-wrapper {
        width: 42px;
        height: 60px;
    }
    .poker-board-center {
        top: 45%;
    }
    .pot-display-board {
        padding: 2px 10px;
    }
    .pot-display-board .pot-val {
        font-size: 11px;
    }

    .poker-raise-panel {
        flex-direction: column;
        gap: 5px;
        padding: 6px;
    }
    .raise-slider-box input[type="range"] {
        width: 70px;
    }
}

/* ===========================================
   10. NEW CUSTOM UI COMPONENTS & MODALS
   =========================================== */

/* Header Search Bar & Actions */
.header-search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--light-border);
    border-radius: 20px;
    padding: 2px 6px 2px 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 220px;
}
.header-search-bar:focus-within {
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
    width: 260px;
}
.header-search-bar input {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 13px;
    outline: none;
    width: 100%;
    height: 32px;
}
.header-search-bar input::placeholder {
    color: var(--text-gray);
}
.btn-search-icon {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 14px;
    padding: 8px;
    transition: color 0.2s ease;
}
.btn-search-icon:hover {
    color: var(--gold);
}

.language-dropdown select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--light-border);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    font-size: 13px;
    transition: border-color 0.2s ease;
}
.language-dropdown select:hover {
    border-color: var(--light-border-hover);
}

.avatar-img-round {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 3D Card Hover Transformations */
.card-wrapper:not(.face-down):hover .card-inner {
    transform: rotateY(10deg) rotateX(5deg) translateZ(15px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.55);
}
.card-wrapper.face-down:hover .card-inner {
    transform: rotateY(190deg) rotateX(5deg) translateZ(15px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.55);
}

/* Settings Modal */
.settings-modal-card {
    max-width: 480px !important;
    padding: 25px !important;
    text-align: left !important;
}
.settings-modal-card h3 {
    text-align: center;
    margin-bottom: 10px;
}
.settings-avatar-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-avatar-selector span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.avatar-options-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 5px;
}
.avatar-option {
    aspect-ratio: 1;
    border: 2px solid var(--light-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-gray);
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.02);
}
.avatar-option:hover {
    border-color: var(--light-border-hover);
    color: var(--text-light);
    background: rgba(255,255,255,0.05);
}
.avatar-option.selected {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: var(--gold-glow);
    background: rgba(212, 175, 55, 0.1);
}
.settings-divider {
    border: 0;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 15px 0;
}
.settings-password-form, .settings-timeout-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.settings-password-form span, .settings-timeout-form span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.settings-desc {
    font-size: 12px !important;
    color: var(--text-gray) !important;
    line-height: 1.4 !important;
    margin-bottom: 5px;
    text-align: left !important;
}
.settings-modal-card .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-modal-card .input-group label {
    font-size: 12px;
    color: var(--text-gray);
}
.settings-modal-card input, .settings-modal-card select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--light-border);
    color: var(--text-light);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
    width: 100%;
}
.settings-modal-card input:focus, .settings-modal-card select:focus {
    border-color: var(--gold);
}
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 15px;
}

/* Profile Modal */
.profile-modal-card {
    max-width: 520px !important;
    padding: 25px !important;
    text-align: left !important;
}
.profile-modal-card h3 {
    text-align: center;
    margin-bottom: 15px;
}
.profile-header-display {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 28px;
    border: 2px solid var(--gold);
    box-shadow: var(--gold-glow);
    overflow: hidden;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-identity-display h4 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.profile-identity-display p {
    font-size: 12px !important;
    color: var(--text-gray) !important;
    margin: 2px 0 !important;
    text-align: left !important;
}
.profile-statistics-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-statistics-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.stat-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.stat-item span {
    color: var(--text-gray);
}
.stat-item strong {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.btn-profile-close {
    margin-top: 15px;
}

/* Legal Notice Modal */
.legal-modal-card {
    max-width: 600px !important;
    padding: 25px !important;
    text-align: left !important;
}
.legal-modal-card h3 {
    text-align: center;
    margin-bottom: 15px;
}
.legal-scroll-container {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.legal-scroll-container h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-gold);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 4px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legal-scroll-container p {
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: var(--text-gray) !important;
    text-align: justify !important;
}
.btn-legal-close {
    margin-top: 15px;
}

/* ===========================================
   9. GLOBAL HEADER ACTIONS & CONTROLS
   =========================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    padding: 0;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-icon:active {
    transform: translateY(0);
}

/* Settings cog spin animation on hover */
.btn-icon#lobby-settings-btn:hover i {
    transform: rotate(45deg);
}
.btn-icon#lobby-settings-btn i {
    transition: transform 0.3s ease;
}

/* Muted sound toggle state */
.btn-icon.muted {
    color: var(--text-gray);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.btn-icon.muted:hover {
    color: #ff5555;
    border-color: rgba(255, 85, 85, 0.4);
}

/* Premium language selector styling */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    padding: 8px 32px 8px 12px;
    border-radius: 20px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.language-dropdown::after {
    content: '\f078'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
    font-size: 10px;
    transition: color 0.25s ease;
}

.language-dropdown:hover select {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.6);
}

.language-dropdown:hover::after {
    color: var(--gold);
}


