/* =============================================
   POKER APP - COMPLETE STYLESHEET
   ============================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0e14;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

/* ---- SCREENS ---- */
.screen {
    display: none;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, #2d8a4e 0%, #0d3318 100%);
}
.screen.active { display: flex; }

/* ---- PAGE SCREENS ---- */
.screen.page-screen {
    background: linear-gradient(180deg, #0f3d1a 0%, #0b0e14 15%) !important;
    align-items: stretch;
    justify-content: flex-start !important;
    padding: 0 !important;
    padding-top: 56px !important;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}
.page-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.page-header h2 {
    font-size: 1.3em;
    color: #ffd700;
    margin: 0;
    flex: 1;
}
.page-header button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.95em;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.15s;
}
.page-header button:hover { background: rgba(255,255,255,0.25); }
.page-back-btn {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-size: 0.9em !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
}
.page-back-btn:hover { background: rgba(255,255,255,0.15) !important; }
.page-content {
    padding: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}
.page-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.page-subtitle {
    font-size: 0.85em;
    opacity: 0.5;
    margin-top: 4px;
}
.section-title {
    color: #ffd700;
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,215,0,0.15);
}
.section-label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.7);
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95em;
}

/* ---- MENU ---- */
#menu-screen h1 { font-size: 2.8em; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); margin-bottom: 6px; }
#menu-screen .subtitle { font-size: 1.1em; opacity: 0.7; margin-bottom: 30px; }
.menu-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.box {
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 440px;
}

label { display: block; margin-bottom: 4px; font-weight: bold; font-size: 0.95em; }

input, select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 1em;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
}
input::placeholder { color: rgba(255,255,255,0.4); }
input:focus, select:focus {
    border-color: #ffd700;
    background: rgba(255,255,255,0.18);
}

/* Dark theme friendly select/input */
select option {
    background: #1a1a2e;
    color: #fff;
    padding: 8px;
}
select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffd700'%3E%3Cpath d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Select/Input - keep dark theme consistent */

/* ---- BUTTONS ---- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: linear-gradient(135deg, #f5af19, #f12711); color: #fff; }
.btn-secondary { background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; }
.btn-action { background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; min-width: 90px; }
.btn-fold { background: linear-gradient(135deg, #c33, #900); color: #fff; min-width: 90px; }
.btn-raise { background: linear-gradient(135deg, #f5af19, #f12711); color: #fff; min-width: 90px; }
.btn-allin { background: linear-gradient(135deg, #8e2de2, #4a00e0); color: #fff; min-width: 90px; }
.btn-small { padding: 8px 16px; font-size: 0.85em; }

.error-msg { color: #ff6b6b; margin-bottom: 10px; text-align: center; font-weight: bold; }

/* ---- LOBBY ---- */
.room-code {
    font-size: 3em; font-weight: bold; letter-spacing: 12px;
    color: #ffd700; text-shadow: 2px 2px 6px rgba(0,0,0,0.4); margin: 10px 0 6px;
}
.room-code-hint { opacity: 0.7; margin-bottom: 20px; }
.player-list { list-style: none; margin: 10px 0 20px; }
.player-list li {
    padding: 8px 16px; background: rgba(255,255,255,0.1);
    border-radius: 8px; margin-bottom: 6px; display: flex; justify-content: space-between;
}
.player-list li .host-badge {
    background: #ffd700; color: #333; padding: 1px 8px;
    border-radius: 12px; font-size: 0.8em; font-weight: bold;
}

/* ============================================
   GAME SCREEN - POKERSTARS STYLE
   ============================================ */
#game-screen {
    background: #0b1a0b;
    padding: 0;
    position: relative;
    overflow: hidden;
}
#game-screen.active { display: block; height: 100vh; }

/* Table */
.table-container {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 680px;
    height: 340px;
}

.table-felt {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse, #267d46 0%, #1a5c2a 60%, #0f3d1a 100%);
    border-radius: 170px;
    border: 10px solid #3a2510;
    box-shadow:
        0 0 0 6px #5a3a1a,
        0 0 40px rgba(0,0,0,0.6),
        inset 0 0 60px rgba(0,0,0,0.25);
}

.table-felt::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 160px;
    border: 2px solid rgba(255,255,255,0.06);
}

/* Center: pot + community */
.table-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.pot-display {
    font-size: 1em;
    font-weight: bold;
    color: #ffd700;
    background: rgba(0,0,0,0.5);
    padding: 3px 14px;
    border-radius: 20px;
    margin-bottom: 8px;
    display: inline-block;
}

.community-cards {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.phase-label {
    font-size: 0.75em;
    opacity: 0.5;
    margin-top: 6px;
}

/* ---- CARDS ---- */
.card {
    width: 42px;
    height: 60px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 1px 2px 6px rgba(0,0,0,0.4);
    user-select: none;
}

.card-front { background: #fff; border: 1.5px solid #bbb; }
.card-front.red { color: #cc2233; }
.card-front.black { color: #222; }
.card-front .card-rank { font-size: 1.1em; line-height: 1.2; }
.card-front .card-suit { font-size: 1.2em; line-height: 1.2; margin-top: 2px; }

.card-back {
    background:
        repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px),
        repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px),
        linear-gradient(160deg, #8b1a1a, #b22222 30%, #8b0000 50%, #b22222 70%, #8b1a1a);
    border: 2px solid #5a0a0a;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.3);
}
.card-back::before { display: none; }
.card-back::after {
    content: "\2666";
    opacity: 0.18;
    font-size: 1.4em;
    color: #ffd700;
}

.card-placeholder {
    background: rgba(255,255,255,0.06);
    border: 1.5px dashed rgba(255,255,255,0.12);
}

/* Mini card (tiny inline display) */
.mini-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 30px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    gap: 1px;
}
.mini-card.red { color: #cc2233; }
.mini-card.black { color: #222; }

/* ---- PLAYER SEATS ---- */
.seat {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s;
}
.seat.folded { opacity: 0.35; }
.seat.folded.is-me { opacity: 0.75; }
.seat.folded.is-me .seat-cards { filter: grayscale(0.8) brightness(0.7); opacity: 0.7; }

/* Folded cards greyed for me */
.seat.is-me.folded .seat-cards { opacity: 0.4; filter: grayscale(0.7); }

.seat-cards {
    display: flex;
    gap: 2px;
    margin-bottom: 3px;
    justify-content: center;
}
.seat-cards .card {
    width: 32px;
    height: 46px;
    border-radius: 4px;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}
.seat-cards .card .card-rank { font-size: 0.75em; line-height: 1.1; }
.seat-cards .card .card-suit { font-size: 0.8em; line-height: 1.1; }

.seat-info {
    background: #1c1c2e;
    border: 2px solid #1c1c2e;
    border-radius: 8px;
    padding: 4px 10px;
    text-align: center;
    min-width: 100px;
    transition: all 0.2s;
}

.seat.active-turn .seat-info {
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255,215,0,0.6);
}

.seat.is-me .seat-info {
    border-color: #4a90ff;
    background: #1a2540;
}

.seat.is-me .seat-cards .card {
    width: 48px;
    height: 68px;
}
.seat.is-me .seat-cards .card .card-rank { font-size: 1.1em; }
.seat.is-me .seat-cards .card .card-suit { font-size: 1.2em; }

.seat.winner-glow .seat-info {
    border-color: #ffd700;
    background: rgba(255,215,0,0.15);
    box-shadow: 0 0 18px rgba(255,215,0,0.6);
}

.seat-name {
    font-weight: bold;
    font-size: 0.85em;
    white-space: nowrap;
}

.seat-chips {
    font-size: 0.8em;
    color: #ffd700;
}

.seat-bounty {
    font-size: 0.7em;
    color: #ff5722;
    font-weight: bold;
    background: rgba(255,87,34,0.15);
    border: 1px solid rgba(255,87,34,0.3);
    border-radius: 8px;
    padding: 1px 6px;
    margin-top: 2px;
    display: inline-block;
}

.seat-status {
    font-size: 0.7em;
    color: #aaa;
    font-style: italic;
}

/* ---- BADGES ---- */
.badge {
    display: inline-block;
    font-size: 0.55em;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 3px;
    font-weight: bold;
    vertical-align: middle;
}
.badge-d { background: #fff; color: #333; }
.badge-sb { background: #2196F3; }
.badge-bb { background: #FF9800; }

/* Bot badge */
.bot-badge {
    background: #6a1b9a;
    color: #fff;
    font-size: 0.6em;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

/* Bet chips near player */
.seat-bet {
    position: absolute;
    font-size: 0.75em;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    z-index: 3;
}

/* Bet amount label (absolute positioned gold label above chips) */
.bet-amount {
    position: absolute;
    font-size: 0.7em;
    color: #ffd700;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* ---- ACTIONS BAR (bottom) ---- */
.actions-bar-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
}
.actions-bar {
    background: linear-gradient(to top, rgba(10,10,20,0.97), rgba(10,10,20,0.85));
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 20;
    min-height: 60px;
}

.actions-bar .btn { padding: 12px 22px; font-size: 1em; }
/* Center the action buttons while keeping chat pinned right */
.actions-bar > .btn:first-child,
.actions-bar > .waiting-msg:first-child,
.actions-bar > .pre-action-row:first-child { margin-left: auto; }

.raise-inline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

/* ---- RAISE PRESETS ---- */
.raise-presets {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 6px 0;
    flex-wrap: wrap;
}
.raise-presets button,
.raise-preset-btn {
    background: rgba(255,215,0,0.12);
    color: #ffd700;
    border: 1px solid rgba(255,215,0,0.35);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
    min-width: 55px;
}
.raise-presets button:hover,
.raise-preset-btn:hover {
    background: rgba(255,215,0,0.3);
    border-color: #ffd700;
    transform: translateY(-1px);
}

/* ---- PRE-ACTIONS ---- */
.pre-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 6px 0;
    opacity: 0.8;
}
.pre-actions label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    cursor: pointer;
    color: #ccc;
    font-weight: normal;
    margin-bottom: 0;
}
.pre-actions input[type="checkbox"] {
    width: auto;
    margin: 0;
    padding: 0;
}
.pre-actions label.active-pre { color: #38ef7d; font-weight: bold; }

.pre-action-btn {
    background: rgba(255,255,255,0.08) !important;
    color: #aaa !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 0.8em !important;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.pre-action-btn:hover { background: rgba(255,255,255,0.15) !important; color: #fff !important; }
.pre-action-btn.active {
    background: rgba(56,239,125,0.2) !important;
    color: #38ef7d !important;
    border-color: #38ef7d !important;
}

/* ---- SIT OUT BUTTON ---- */
.sitout-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.15s;
}
.sitout-btn:hover { color: #fff !important; background: rgba(255,255,255,0.25); }
.sitout-btn.sitting-out { background: #f44336; color: #fff; border-color: #f44336; }

.raise-slider-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.raise-slider-row input[type="range"] {
    flex: 1;
    accent-color: #f5af19;
    margin: 0;
    padding: 0;
}
.raise-inline .raise-val {
    color: #ffd700;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.waiting-msg {
    color: #999;
    font-style: italic;
    font-size: 0.95em;
}

/* ---- TOP HUD ---- */
.top-hud {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 15;
    pointer-events: none;
}
.top-hud span {
    background: rgba(0,0,0,0.5);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.85em;
}

/* ---- OVERLAYS ---- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
}
.overlay.show { display: flex; }

.overlay-box {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 16px;
    padding: 24px 28px;
    text-align: center;
    max-width: 460px;
    width: 90%;
}
.overlay-box h2 { color: #ffd700; font-size: 1.4em; margin-bottom: 10px; }
.overlay-box label { color: rgba(255,255,255,0.7); font-size: 0.85em; margin-bottom: 3px; }
.overlay-box input, .overlay-box select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    margin-bottom: 10px;
}
.overlay-box input:focus, .overlay-box select:focus {
    border-color: #ffd700;
    background: rgba(255,255,255,0.15);
}
.overlay-box select option { background: #1a1a2e; color: #fff; }
.overlay-box .result-line { font-size: 1.05em; margin-bottom: 4px; }
.overlay-box .result-pot { color: #aed581; margin: 10px 0 16px; font-size: 1.1em; }

/* ---- WINNER BANNER ---- */
.winner-banner {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    border: 2px solid gold;
    border-radius: 12px;
    padding: 10px 28px;
    text-align: center;
    z-index: 25;
    animation: bannerIn 0.3s ease-out;
}
@keyframes bannerIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.winner-banner .wb-title {
    color: gold;
    font-size: 1.3em;
    font-weight: bold;
}
.winner-banner .wb-hand {
    color: #aed581;
    font-size: 0.95em;
    margin-top: 2px;
}
.winner-banner .wb-pot {
    color: #ccc;
    font-size: 0.85em;
    margin-top: 2px;
}
.winner-banner .wb-pot-line {
    color: #ccc;
    font-size: 0.8em;
    margin-top: 3px;
    padding: 2px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.winner-banner .wb-pot-line:first-of-type { border-top: none; }

/* ---- TIMER BAR ---- */
.timer-bar {
    height: 5px;
    background: rgba(255,255,255,0.1);
}
.timer-bar-fill {
    height: 100%;
    background: #f5af19;
    transition: width 1s linear;
}
.timer-bar-fill.urgent { background: #f12711; }

/* ---- REBUY BUTTON ---- */
.rebuy-btn {
    position: absolute;
    top: 40px;
    right: 12px;
    z-index: 15;
}

/* ---- LOBBY SETTINGS ---- */
.lobby-settings {
    text-align: left;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0;
    font-size: 0.85em;
    line-height: 1.8;
}
.lobby-settings span { color: #ffd700; font-weight: bold; }

/* ---- ROOM CARDS ---- */
.room-card {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.room-card .rc-info { flex: 1; }
.room-card .rc-name { font-weight: bold; font-size: 1em; }
.room-card .rc-details { font-size: 0.8em; opacity: 0.7; margin-top: 2px; }
.room-card .rc-players { font-size: 0.85em; color: #aed581; }

/* Golden left border for own rooms */
.room-card-mine {
    border-left: 3px solid #ffd700 !important;
    background: linear-gradient(135deg, rgba(245,175,25,0.25), rgba(241,39,17,0.15));
    border: 2px solid rgba(255,215,0,0.5);
    box-shadow: 0 0 15px rgba(255,215,0,0.2);
}

/* ---- ACTIVE ROOM BANNER ---- */
.active-room-banner {
    background: linear-gradient(135deg, #1a5c2a, #2d8a4e);
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 440px;
    margin-bottom: 12px;
    animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.4); }
    50% { box-shadow: 0 0 0 4px rgba(255,215,0,0.2); }
}

/* ---- JOIN REQUEST ---- */
.join-request {
    background: rgba(255,165,0,0.15);
    border: 1px solid rgba(255,165,0,0.4);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.join-request .jr-name { font-weight: bold; }
.join-request .jr-buttons { display: flex; gap: 6px; }

/* Waiting for approval */
.waiting-approval {
    text-align: center;
    padding: 20px;
    font-style: italic;
    opacity: 0.7;
}

/* ---- ADMIN PANEL ---- */
.admin-toggle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 16;
    pointer-events: auto;
}

.admin-panel {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 300px;
    background: #12162b;
    border-left: 1px solid rgba(255,215,0,0.15);
    z-index: 200;
    overflow-y: auto;
    padding: 14px;
    animation: slideIn 0.2s ease-out;
    font-size: 0.85em;
}
.admin-panel.show { display: block; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.admin-panel h3 {
    color: #ffd700;
    font-size: 1em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,215,0,0.2);
}

.admin-section {
    margin-bottom: 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 10px;
}

.admin-section h4 {
    font-size: 0.75em;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.admin-player-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}
.admin-player-row .ap-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-player-row .ap-name { font-weight: bold; font-size: 0.95em; }
.admin-player-row .ap-chips { color: #ffd700; font-size: 0.85em; }
.admin-player-row .ap-actions { display: flex; gap: 4px; flex-wrap: wrap; }

.admin-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 0.7em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s;
}
.admin-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.admin-btn-green { background: #38ef7d; color: #333; }
.admin-btn-red { background: #ff4444; color: #fff; }
.admin-btn-orange { background: #f5af19; color: #333; }
.admin-btn-blue { background: #4a90ff; color: #fff; }

.admin-control-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 6px;
    transition: all 0.15s;
}
.admin-control-btn:hover { opacity: 0.85; }

.admin-blinds-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.admin-blinds-row input {
    width: 60px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85em;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin: 0;
}

.admin-msg-row {
    display: flex;
    gap: 6px;
}
.admin-msg-row input {
    flex: 1;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85em;
    background: rgba(255,255,255,0.1);
    color: #fff;
    background: rgba(255,255,255,0.9);
    color: #333;
    margin: 0;
}

/* Host message toast */
.host-message {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    border: 1px solid #4a90ff;
    border-radius: 10px;
    padding: 10px 20px;
    z-index: 30;
    text-align: center;
    animation: fadeIn 0.3s;
    max-width: 400px;
}
.host-message .hm-from { font-size: 0.8em; color: #4a90ff; }
.host-message .hm-text { margin-top: 4px; }

.admin-panel .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.4em;
    cursor: pointer;
}
.admin-panel .close-btn:hover { color: #fff; }

/* ---- PAUSE OVERLAY ---- */
.pause-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 50;
    align-items: center;
    justify-content: center;
}
.pause-overlay.show { display: flex; }
.pause-overlay .pause-box {
    background: rgba(0,0,0,0.8);
    border: 2px solid #f5af19;
    border-radius: 16px;
    padding: 30px 40px;
    text-align: center;
}
.pause-overlay .pause-box h2 { color: #f5af19; }
.pause-overlay .pause-box p { margin-top: 8px; opacity: 0.7; }

/* ---- AUTH & PROFILE ---- */
.auth-tabs {
    display: flex;
    margin-bottom: 16px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}
.auth-tab:first-child { border-radius: 8px 0 0 8px; }
.auth-tab:last-child { border-radius: 0 8px 8px 0; }
.auth-tab.active { background: rgba(255,255,255,0.25); color: #fff; }

/* ---- MAIN NAV ---- */
.main-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    height: 52px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    z-index: 50;
    border-bottom: 1px solid rgba(255,215,0,0.15);
}
.nav-left { display: flex; align-items: center; }
.nav-brand {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffd700;
    cursor: pointer;
    letter-spacing: 1px;
}
.nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    padding: 6px 14px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { background: rgba(255,215,0,0.15); color: #ffd700; }
.nav-admin { color: #f44336 !important; }
.nav-admin:hover { background: rgba(244,67,54,0.15) !important; }
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-user { font-weight: bold; font-size: 0.9em; color: #fff; }
.nav-stats { font-size: 0.7em; color: #ffd700; background: rgba(255,215,0,0.12); padding: 2px 8px; border-radius: 10px; }
.nav-icon-btn {
    background: none; border: none; color: rgba(255,255,255,0.6);
    font-size: 1.1em; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-logout {
    background: rgba(200,50,50,0.15); border: 1px solid rgba(200,50,50,0.3);
    color: #f77; padding: 5px 14px; border-radius: 8px;
    font-size: 0.8em; cursor: pointer; transition: all 0.15s; font-weight: 500;
}
.nav-logout:hover { background: rgba(200,50,50,0.3); color: #fff; }

/* Push content below navbar */
/* Push ALL screens below the fixed nav (52px height) */
.screen { padding-top: 56px; }
/* Auth screen has no nav, reset */
#auth-screen { padding-top: 20px; }
/* Game screen has its own HUD */
#game-screen { padding-top: 0; }

/* Mobile nav */
@media (max-width: 768px) {
    .main-nav { padding: 0 10px; gap: 6px; height: 48px; }
    .nav-brand { font-size: 0.9em; }
    .nav-link { padding: 4px 8px; font-size: 0.75em; }
    .nav-user { font-size: 0.8em; }
    .nav-stats { font-size: 0.6em; padding: 1px 6px; }
    .nav-logout { padding: 3px 8px; font-size: 0.7em; }
}
@media (max-width: 480px) {
    .nav-brand { display: none; }
    .nav-user { display: none; }
    .nav-stats { display: none; }
    .nav-link { padding: 4px 6px; font-size: 0.7em; }
}

.profile-box {
    max-width: 500px;
    width: 100%;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin: 4px 0;
}
.stat-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}
.stat-card .sc-val {
    font-size: 1.3em;
    font-weight: bold;
    color: #ffd700;
    line-height: 1.2;
}
.stat-card .sc-label {
    font-size: 0.7em;
    color: #aaa;
    margin-top: 2px;
}

.history-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}
.history-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.85em;
}
.history-list .win { color: #aed581; }
.history-list .loss { color: #ff6b6b; }

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.leaderboard-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid rgba(255,215,0,0.2);
    color: #ffd700;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.leaderboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.leaderboard-table tr:hover { background: rgba(255,255,255,0.04); }
.leaderboard-table tr:nth-child(-n+3) td:first-child { color: #ffd700; font-weight: bold; font-size: 1.1em; }

.nav-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

/* ---- SUPER ADMIN TABS ---- */
.sa-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 4px;
    overflow-x: auto;
}
.sa-tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}
.sa-tab.active { background: rgba(255,215,0,0.15); color: #ffd700; font-weight: bold; }
.sa-tab:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sa-panel { display: none; }
.sa-panel.active { display: block; }

/* Admin charts */
.sa-chart-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
}
.sa-chart-card h4 { color: #ffd700; font-size: 0.9em; margin-bottom: 10px; }
.chart-bars { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.chart-row { display: flex; align-items: center; gap: 8px; }
.chart-label { width: 60px; font-size: 0.75em; opacity: 0.6; }
.chart-bar {
    background: linear-gradient(90deg, #1a5c2a, #38ef7d);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    min-width: 30px;
}

/* Super admin table */
.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}
.sa-table th, .sa-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sa-table th { color: #ffd700; font-size: 0.8em; text-transform: uppercase; }
.sa-table tr:hover { background: rgba(255,255,255,0.05); }

#superadmin-screen .sa-tab {
    border-radius: 8px 8px 0 0 !important;
    background: rgba(255,255,255,0.05) !important;
    color: #ccc !important;
    border: 1px solid #444 !important;
    border-bottom: none !important;
}
#superadmin-screen .sa-tab.active {
    background: rgba(245,175,25,0.2) !important;
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.sa-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.sa-stat-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 14px 12px;
    border-radius: 10px;
    text-align: center;
}
.sa-stat-card .sa-val { font-size: 1.8em; font-weight: bold; color: #ffd700; }
.sa-stat-card .sa-lbl { font-size: 0.75em; opacity: 0.6; margin-top: 2px; }

.sa-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    flex-wrap: wrap;
}
.sa-user-row .sa-u-name { flex: 1; min-width: 120px; font-weight: bold; }
.sa-user-row .sa-u-meta { font-size: 0.75em; opacity: 0.7; width: 100%; }
.sa-user-row .sa-u-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.sa-user-row.banned { opacity: 0.6; border-left: 3px solid #c33; }
.sa-user-row.is-admin { border-left: 3px solid #ffd700; }

/* Super admin badges */
.sa-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 4px;
}
.sa-badge-admin { background: #ffd700; color: #333; }
.sa-badge-banned { background: #c33; color: #fff; }

.sa-invite-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    font-size: 0.85em;
    flex-wrap: wrap;
}
.sa-invite-row.used { opacity: 0.6; }
.sa-invite-row .sa-code {
    font-family: monospace;
    font-size: 1.1em;
    color: #ffd700;
    font-weight: bold;
}

/* ---- REACTIONS BAR ---- */
.reactions-bar {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 4px 0;
    flex-wrap: wrap;
}
.reactions-bar button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.reactions-bar button:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }

/* ---- CHAT ---- */
.chat-box { display: none; }

.chat-bubble {
    position: absolute;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    max-width: 150px;
    min-width: 30px;
    width: max-content;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.3;
    z-index: 20;
    transform: translate(-50%, -100%);
    margin-top: -12px;
    animation: bubbleIn 0.2s ease-out;
    pointer-events: none;
}
.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0,0,0,0.8);
}
@keyframes bubbleIn { from { opacity: 0; transform: translate(-50%,-80%); } to { opacity: 1; transform: translate(-50%,-100%); } }

.chat-input-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: auto;
    min-width: 180px;
}
.quick-reactions {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}
.react-btn {
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 0.7em;
    cursor: pointer;
    transition: all 0.15s;
}
.react-btn:hover { background: rgba(255,215,0,0.2); color: #ffd700; border-color: rgba(255,215,0,0.4); }
.react-btn:active { transform: scale(0.95); }
.chat-text-row {
    display: flex;
    gap: 4px;
    align-items: center;
}
.chat-text-row input {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8em;
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
    margin: 0;
}
.chat-text-row input::placeholder { color: #666; }
.chat-text-row input:focus { border-color: rgba(255,215,0,0.4); }
.chat-text-row button {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: #4a90ff;
    color: #fff;
    cursor: pointer;
    font-size: 0.85em;
}

/* ---- TABLE CHIPS ---- */
.chip-stack {
    position: absolute;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    z-index: 6;
    transform: translate(-50%, -50%);
    animation: chipPop 0.25s ease-out;
}
@keyframes chipPop {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.seat.active-turn .seat-info {
    animation: activePulse 1.5s ease-in-out infinite;
}
@keyframes activePulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255,215,0,0.5); }
    50% { box-shadow: 0 0 20px rgba(255,215,0,0.9); }
}
.chip-stack .bet-amount-label {
    position: absolute;
    top: -18px;
    background: rgba(0,0,0,0.75);
    color: #ffd700;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid rgba(255,215,0,0.3);
}
.chip-stack .bet-amount {
    position: relative;
    font-size: 0.7em;
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 1px 6px;
    border-radius: 8px;
    margin-bottom: 2px;
    white-space: nowrap;
    order: 999;
    text-shadow: none;
}

.chip {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.4);
    margin-bottom: -16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    position: relative;
}
.chip::after {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
}

.chip-1 { background: #fff; border-color: rgba(0,0,0,0.3); }
.chip-5 { background: #e53935; }
.chip-25 { background: #43a047; }
.chip-100 { background: #1e88e5; }
.chip-500 { background: #6a1b9a; }
.chip-1000 { background: #ff8f00; }

.chip-amount {
    font-size: 0.7em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    margin-top: 16px;
    white-space: nowrap;
}

.pot-chips {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 4px;
}
.pot-chip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ---- DEAL ANIMATION ---- */
.deal-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
}

.shuffle-deck {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.shuffle-card {
    position: absolute;
    width: 52px;
    height: 74px;
    border-radius: 6px;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px),
        repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px),
        linear-gradient(160deg, #8b1a1a, #b22222 30%, #8b0000 50%, #b22222 70%, #8b1a1a);
    border: 2px solid #5a0a0a;
    box-shadow: inset 0 0 0 3px rgba(255,215,0,0.3), 2px 2px 8px rgba(0,0,0,0.4);
    top: 0; left: 0;
}

@keyframes shuffleLeft {
    0% { transform: translate(0,0) rotate(0deg); }
    25% { transform: translate(-30px, -5px) rotate(-8deg); }
    50% { transform: translate(0,0) rotate(0deg); }
    75% { transform: translate(30px, -5px) rotate(8deg); }
    100% { transform: translate(0,0) rotate(0deg); }
}

@keyframes shuffleRight {
    0% { transform: translate(0,0) rotate(0deg); }
    25% { transform: translate(30px, -5px) rotate(8deg); }
    50% { transform: translate(0,0) rotate(0deg); }
    75% { transform: translate(-30px, -5px) rotate(-8deg); }
    100% { transform: translate(0,0) rotate(0deg); }
}

.shuffle-card.left { animation: shuffleLeft 0.4s ease-in-out infinite; }
.shuffle-card.right { animation: shuffleRight 0.4s ease-in-out infinite; animation-delay: 0.2s; }

.flying-card {
    position: fixed;
    width: 44px;
    height: 64px;
    border-radius: 5px;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px),
        repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px),
        linear-gradient(160deg, #8b1a1a, #b22222 30%, #8b0000 50%, #b22222 70%, #8b1a1a);
    border: 2px solid #5a0a0a;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 2px 3px 10px rgba(0,0,0,0.5);
    z-index: 61;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
    opacity: 1;
}

/* ---- TOURNAMENT PANEL ---- */
.tournament-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.8em;
    max-width: 200px;
    z-index: 5;
}
.tournament-panel h4 { margin: 0 0 8px; color: #ffd700; }

/* ---- NOTIFICATION TOAST ---- */
.notification-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    z-index: 999;
    animation: fadeInOut 3s forwards;
    pointer-events: none;
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---- FRIEND LIST ---- */
.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 6px;
}
.friend-request {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 8px;
    margin-bottom: 6px;
}

/* ---- DEV BANNER ---- */
.dev-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f44336, #e91e63);
    color: #fff;
    text-align: center;
    padding: 4px 10px;
    font-size: 0.75em;
    font-weight: bold;
    z-index: 9999;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
    .table-container { width: 65vw; height: 45vh; top: 43%; }
    .table-felt { border-radius: 45%; }
    .table-felt::after { border-radius: 44%; }
    .table-felt { border-width: 6px; }
    .seat-info { min-width: 70px; padding: 2px 5px; }
    .seat-name { font-size: 0.7em; }
    .seat-chips { font-size: 0.65em; }
    .seat-cards .card { width: 26px; height: 38px; }
    .seat-cards .card .card-rank { font-size: 0.65em; }
    .seat-cards .card .card-suit { font-size: 0.7em; }
    .card { width: 38px; height: 54px; }
    .card-front .card-rank { font-size: 0.85em; }
    .card-front .card-suit { font-size: 0.9em; }
    .pot-display { font-size: 0.8em; }
    .user-bar { padding: 6px 10px; gap: 4px; }
    .ub-btn { padding: 4px 8px !important; font-size: 0.65em !important; }
    .user-bar .ub-stats { font-size: 0.65em; padding: 1px 6px; }
    .box { padding: 16px; }
    .admin-panel { width: 280px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .seat-bet { font-size: 0.65em; }
    .raise-preset-btn { padding: 4px 8px; font-size: 0.7em; }
    .seat.is-me .seat-cards .card { width: 30px; height: 44px; }
    .chat-bubble { max-width: 120px; font-size: 0.7em; padding: 3px 8px; }
}

@media (max-width: 768px) {
    .poker-table {
        width: 65vw;
        height: 45vh;
    }
    .seat {
        transform: scale(0.85);
    }
    .game-controls {
        padding: 4px 8px;
    }
    .btn { padding: 8px 16px; font-size: 0.9em; }
    .page-content { padding: 12px; }
    .sa-table { font-size: 0.75em; }
    .sa-table th, .sa-table td { padding: 4px 6px; }
    .reactions-bar button { font-size: 0.65em; padding: 2px 6px; }
}

@media (max-width: 600px) {
    .table-container { width: 65vw; height: 44vh; top: 42%; }
    /* Actions bar: full width, wrap buttons */
    .actions-bar {
        padding: 6px 8px;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        gap: 4px;
        flex-wrap: wrap;
    }
    .actions-bar .btn {
        padding: 10px 8px;
        font-size: 0.8em;
        min-width: 0;
        flex: 1 1 auto;
    }
    /* Raise presets: full width row above slider */
    .raise-presets {
        width: 100%;
        flex-wrap: nowrap;
        gap: 4px;
        order: -1;
    }
    .raise-presets button,
    .raise-preset-btn {
        padding: 6px 4px;
        font-size: 0.75em;
        flex: 1;
    }
    /* Raise slider: full width */
    .raise-inline {
        width: 100%;
        order: -1;
        padding: 4px 0;
    }
    .raise-slider-row input[type="range"] { height: 28px; width: 100%; }
    /* Chat input full width */
    .chat-input-bar { width: 100%; margin-left: 0; }
    .chat-text-row input { width: auto; }
    /* Pre-actions centered */
    .pre-actions { width: 100%; justify-content: center; gap: 16px; }
    .pre-action-row { width: 100%; order: -2; justify-content: center; }
    /* Reactions compact */
    .reactions-bar { gap: 3px; }
    .reactions-bar button { font-size: 0.65em; padding: 3px 6px; }
    .quick-reactions { justify-content: center; }
    .react-btn { padding: 4px 7px; font-size: 0.65em; }
    /* General mobile tweaks */
    #menu-screen h1 { font-size: 1.8em; }
    .room-code { font-size: 2em; letter-spacing: 6px; }
    .seat-bet { font-size: 0.65em; }
    .seat-cards .card { width: 26px; height: 38px; }
    .top-hud span { font-size: 0.75em; padding: 3px 8px; }
    .chat-box { width: 180px; }
    .chat-messages { max-height: 60px; }
    .chat-msg { font-size: 0.7em; }
    .user-bar .ub-name { font-size: 0.8em; }
    .user-bar .ub-stats { font-size: 0.6em; }
    .ub-btn { padding: 3px 6px !important; font-size: 0.6em !important; }
    .page-header { padding: 12px 16px; }
    .page-header h2 { font-size: 1.2em; }
    .page-content { padding: 12px; }
    .page-section { padding: 14px; }
}

@media (max-width: 380px) {
    .table-container { width: 68vw; height: 46vh; top: 40%; }
    .seat-info { min-width: 55px; padding: 2px 4px; }
    .seat-name { font-size: 0.55em; }
    .seat-chips { font-size: 0.55em; }
    .actions-bar .btn { padding: 8px 5px; font-size: 0.65em; min-width: 0; flex: 1; }
    .seat.is-me .seat-cards .card { width: 32px; height: 46px; }
    .chat-bubble { max-width: 100px; font-size: 0.7em; padding: 3px 6px; }
}
