/* ==========================================================================
   Ludo Clásico Online - Diseño Nostálgico Tradicional 15x15
   Estilos CSS Premium para Web y Android APK
   ========================================================================== */

:root {
    --bg-dark: #0F172A;
    --bg-card: rgba(30, 41, 59, 0.85);
    --border-card: rgba(255, 255, 255, 0.12);
    
    /* Colores oficiales tradicionales */
    --color-red: #EF4444;
    --color-red-dark: #B91C1C;
    --color-red-light: #FEE2E2;

    --color-green: #10B981;
    --color-green-dark: #047857;
    --color-green-light: #D1FAE5;

    --color-yellow: #F59E0B;
    --color-yellow-dark: #B45309;
    --color-yellow-light: #FEF3C7;

    --color-blue: #3B82F6;
    --color-blue-dark: #1D4ED8;
    --color-blue-light: #DBEAFE;

    --board-bg: #FFFFFF;
    --tile-border: #CBD5E1;
    --board-border: #475569;
    --star-gold: #F59E0B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 50% 20%, #1E293B 0%, #0F172A 100%);
    color: #F8FAFC;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow-x: hidden;
    padding: 8px 12px;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.game-layout {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

/* BARRA SUPERIOR */
.top-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 20px;
}

.brand-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.room-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.header-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #F8FAFC;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   ÁREA DE JUGADORES SUPERIORES Y LATERALES
   ========================================================================== */
.players-bar-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.player-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 2px solid transparent;
    padding: 4px 10px 4px 6px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.player-chip.active {
    border-color: #F59E0B;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
    transform: scale(1.05);
}

.avatar-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid #FFFFFF;
}

.avatar-red { background: var(--color-red); }
.avatar-green { background: var(--color-green); }
.avatar-yellow { background: var(--color-yellow); }
.avatar-blue { background: var(--color-blue); }

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-size: 11px;
    font-weight: 700;
}

.player-status {
    font-size: 9px;
    color: #94A3B8;
}

/* ==========================================================================
   TABLERO TRADICIONAL 15x15
   ========================================================================== */
.board-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
    background: #475569;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.2);
    border: 4px solid #334155;
}

.ludo-board {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--board-bg);
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 1fr));
    grid-template-rows: repeat(15, minmax(0, 1fr));
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
}

/* CASAS DE LAS ESQUINAS (6x6) */
.base-house {
    position: relative;
    padding: 8%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.base-red {
    grid-area: 1 / 1 / 7 / 7;
    background-color: var(--color-red);
}

.base-green {
    grid-area: 1 / 10 / 7 / 16;
    background-color: var(--color-green);
}

.base-yellow {
    grid-area: 10 / 10 / 16 / 16;
    background-color: var(--color-yellow);
}

.base-blue {
    grid-area: 10 / 1 / 16 / 7;
    background-color: var(--color-blue);
}

.base-inner-box {
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    padding: 8%;
    gap: 12%;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
}

.base-pocket {
    border-radius: 50%;
    background: #E2E8F0;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.base-red .base-pocket { border: 2px solid var(--color-red); }
.base-green .base-pocket { border: 2px solid var(--color-green); }
.base-yellow .base-pocket { border: 2px solid var(--color-yellow); }
.base-blue .base-pocket { border: 2px solid var(--color-blue); }

/* CASILLAS INDIVIDUALES DEL CIRCUITO */
.board-cell {
    border: 0.5px solid var(--tile-border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Casillas coloreadas de pasillo de meta */
.cell-runway-red { background-color: var(--color-red) !important; border-color: var(--color-red-dark); }
.cell-runway-green { background-color: var(--color-green) !important; border-color: var(--color-green-dark); }
.cell-runway-yellow { background-color: var(--color-yellow) !important; border-color: var(--color-yellow-dark); }
.cell-runway-blue { background-color: var(--color-blue) !important; border-color: var(--color-blue-dark); }

/* Casillas de salida con color */
.cell-start-red { background-color: var(--color-red-light); }
.cell-start-green { background-color: var(--color-green-light); }
.cell-start-yellow { background-color: var(--color-yellow-light); }
.cell-start-blue { background-color: var(--color-blue-light); }

/* Icono de Estrella ⭐ en Casillas Seguras */
.star-icon {
    font-size: 14px;
    color: #D97706;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    pointer-events: none;
}

.arrow-icon {
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}
.arrow-red { color: var(--color-red); }
.arrow-green { color: var(--color-green); }
.arrow-yellow { color: var(--color-yellow); }
.arrow-blue { color: var(--color-blue); }

/* ==========================================================================
   META CENTRAL DESPEJADA (3x3 Casillas)
   4 Triángulos que se unen en el centro sin tapar
   ========================================================================== */
.center-goal {
    grid-area: 7 / 7 / 10 / 10;
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    overflow: hidden;
}

.goal-triangle {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Triángulo Verde (Norte) */
.triangle-green {
    background-color: var(--color-green);
    clip-path: polygon(0 0, 100% 0, 50% 50%);
}

/* Triángulo Amarillo (Este) */
.triangle-yellow {
    background-color: var(--color-yellow);
    clip-path: polygon(100% 0, 100% 100%, 50% 50%);
}

/* Triángulo Azul (Sur) */
.triangle-blue {
    background-color: var(--color-blue);
    clip-path: polygon(100% 100%, 0 100%, 50% 50%);
}

/* Triángulo Rojo (Oeste) */
.triangle-red {
    background-color: var(--color-red);
    clip-path: polygon(0 100%, 0 0, 50% 50%);
}

/* ==========================================================================
   PEONES / FICHAS 3D (PAWNS)
   ========================================================================== */
.pawn-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pawn-token {
    position: absolute;
    width: 5.6%;
    height: 5.6%;
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.4), inset 0 2px 3px rgba(255,255,255,0.6);
    border: 2px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.pawn-token::after {
    content: "";
    width: 40%;
    height: 40%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.pawn-red { background: radial-gradient(circle at 35% 35%, #F87171, #DC2626); }
.pawn-green { background: radial-gradient(circle at 35% 35%, #34D399, #059669); }
.pawn-yellow { background: radial-gradient(circle at 35% 35%, #FBBF24, #D97706); }
.pawn-blue { background: radial-gradient(circle at 35% 35%, #60A5FA, #2563EB); }

/* Resaltado cuando una ficha es legal y puede moverse */
.pawn-token.legal-move {
    animation: pawn-bounce-glow 0.8s infinite alternate ease-in-out;
    cursor: pointer;
    z-index: 30;
}

@keyframes pawn-bounce-glow {
    0% {
        transform: translate(-50%, -50%) scale(1.05);
        filter: drop-shadow(0 0 6px #F59E0B);
    }
    100% {
        transform: translate(-50%, -70%) scale(1.22);
        filter: drop-shadow(0 0 12px #F59E0B);
    }
}

/* ==========================================================================
   PANEL INFERIOR DE JUEGO Y DADO 3D
   ========================================================================== */
.bottom-hud {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 10px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

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

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.profile-details {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 13px;
    font-weight: 800;
}

.profile-wallet {
    font-size: 11px;
    color: #FBBF24;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* CONTENEDOR DEL DADO CON CRONÓMETRO */
.dice-zone {
    display: flex;
    align-items: center;
    gap: 12px;
}

.turn-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-ring {
    font-size: 13px;
    font-weight: 800;
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid #F59E0B;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BOTÓN DEL DADO */
.dice-btn {
    width: 58px;
    height: 58px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.8), inset 0 -3px 4px rgba(0,0,0,0.15);
    border: 2px solid #E2E8F0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    position: relative;
}

.dice-btn:active {
    transform: scale(0.92);
}

.dice-btn.can-roll {
    animation: dice-glow 1s infinite alternate;
}

@keyframes dice-glow {
    0% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
    100% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.95); }
}

/* CARAS DEL DADO (PUNTOS / PIPS) */
.dice-face {
    width: 44px;
    height: 44px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 3px;
}

.dice-pip {
    width: 8px;
    height: 8px;
    background-color: #1E293B;
    border-radius: 50%;
    margin: auto;
}

.pip-red {
    background-color: #DC2626;
    width: 12px;
    height: 12px;
}

.dice-rolling {
    animation: dice-spin 0.5s ease-out;
}

@keyframes dice-spin {
    0% { transform: rotate(0deg) scale(0.85); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

/* ==========================================================================
   BARRA SOCIAL DE EMOJIS Y REACCIONES
   ========================================================================== */
.reactions-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0;
}

.emoji-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    font-size: 18px;
    padding: 6px 10px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.emoji-btn:active {
    transform: scale(0.9);
}

/* EMOJI FLOTANTE ANIMADO */
.floating-emoji {
    position: fixed;
    font-size: 36px;
    pointer-events: none;
    z-index: 100;
    animation: float-up-fade 2s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes float-up-fade {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.6);
    }
    30% {
        transform: translateY(-40px) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translateY(-160px) scale(1.6);
    }
}

/* BANNER DE ESTADO Y MENSAJES */
.status-banner {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    color: #CBD5E1;
}

.status-highlight {
    color: #F59E0B;
    font-weight: 700;
}

/* ==========================================================================
   OVERLAY DE VICTORIA, FUEGOS ARTIFICIALES Y MODAL
   ========================================================================== */
.victory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 14, 28, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.victory-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

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

.victory-modal {
    position: relative;
    z-index: 10001;
    background: linear-gradient(150deg, #1E293B 0%, #0F172A 100%);
    border: 2px solid rgba(245, 158, 11, 0.65);
    border-radius: 26px;
    padding: 30px 24px;
    width: 90%;
    max-width: 390px;
    text-align: center;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.35), 0 20px 50px rgba(0, 0, 0, 0.85);
    animation: modalPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    0% {
        transform: scale(0.65) translateY(30px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.trophy-glow-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.trophy-icon {
    font-size: 60px;
    filter: drop-shadow(0 0 22px rgba(245, 158, 11, 0.8));
    animation: trophyBounce 2s infinite ease-in-out;
}

.crown-icon {
    position: absolute;
    top: -18px;
    font-size: 32px;
    animation: crownFloat 2s infinite ease-in-out;
}

@keyframes trophyBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-7px) scale(1.06); }
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-6px) rotate(6deg); }
}

.victory-heading {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 2.5px;
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #EF4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 14px 0;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

.winner-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 10px 18px;
    margin-bottom: 14px;
}

.winner-avatar {
    font-size: 36px;
}

.winner-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.winner-title {
    font-size: 10px;
    font-weight: 800;
    color: #94A3B8;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.winner-name {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
}

.victory-subtitle {
    font-size: 13px;
    color: #CBD5E1;
    margin: 0 0 18px 0;
    line-height: 1.45;
}

.victory-rewards {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.reward-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #FDE68A;
}

.btn-play-again {
    width: 100%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: 2px solid #34D399;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4), inset 0 2px 3px rgba(255, 255, 255, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-play-again:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #34D399 0%, #059669 100%);
}

.btn-play-again:active {
    transform: scale(0.97);
}

.victory-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn-victory-leave {
    width: 100%;
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-victory-leave:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #EF4444;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-victory-leave:active {
    transform: scale(0.97);
}

/* Banner Flotante de Reconexión Automática */
.reconnect-banner {
    width: 90%;
    max-width: 480px;
    margin: 8px auto;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.92) 0%, rgba(185, 28, 28, 0.95) 100%);
    border: 1.5px solid #FCA5A5;
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
    animation: pulseReconnect 2s infinite ease-in-out;
    z-index: 100;
    transition: all 0.3s ease;
}

@keyframes pulseReconnect {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45); }
    50% { transform: scale(1.02); box-shadow: 0 12px 30px rgba(239, 68, 68, 0.7); }
}

.reconnect-spinner {
    display: inline-block;
    animation: spinReconnect 1.2s linear infinite;
    font-size: 16px;
}

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

.player-chip.chip-reconnecting {
    border-color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.2) !important;
    animation: flashDiscon 1.5s infinite ease-in-out;
}

@keyframes flashDiscon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ==========================================================================
   MODAL DE CONFIGURACIÓN DE PARTIDA (LOBBY / SETUP)
   ========================================================================== */
.setup-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 11, 22, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9980;
    opacity: 1;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.setup-modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.setup-modal-card {
    background: linear-gradient(155deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    border-radius: 20px;
    padding: 16px 14px;
    width: 100%;
    max-width: 420px;
    max-height: 94vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.2);
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: auto;
}

.setup-modal-card > * {
    flex-shrink: 0;
}

.setup-header {
    text-align: center;
}

.setup-badge-icon {
    font-size: 38px;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.7));
    margin-bottom: 4px;
}

.setup-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 4px 0;
}

.setup-desc {
    font-size: 12px;
    color: #94A3B8;
    margin: 0;
}

.setup-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #CBD5E1;
}

.setup-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.setup-option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 10px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.2s ease;
}

.setup-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.setup-option-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #F59E0B;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.opt-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.opt-info {
    display: flex;
    flex-direction: column;
}

.opt-title {
    font-size: 13px;
    font-weight: 800;
    color: #FFFFFF;
}

.opt-desc {
    font-size: 10px;
    color: #94A3B8;
    line-height: 1.2;
}

.players-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.count-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.count-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.count-card.active {
    background: rgba(16, 185, 129, 0.18);
    border-color: #10B981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.count-num {
    font-size: 22px;
    font-weight: 900;
    color: #FFFFFF;
}

.count-tag {
    font-size: 11px;
    font-weight: 800;
    color: #10B981;
}

.count-detail {
    font-size: 9px;
    color: #94A3B8;
    line-height: 1.1;
    margin-top: 2px;
}

.btn-start-game {
    width: 100%;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #EF4444 100%);
    color: #FFFFFF;
    border: 2px solid #FCD34D;
    border-radius: 15px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45), inset 0 2px 3px rgba(255, 255, 255, 0.35);
    transition: all 0.2s ease;
    margin-top: 6px;
}

.btn-start-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.65);
    filter: brightness(1.08);
}

.btn-start-game:active {
    transform: scale(0.97);
}

/* ==========================================================================
   MODALES DE PAUSA Y CANCELACIÓN DE PARTIDA
   ========================================================================== */
.pause-modal-overlay,
.cancel-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 10, 24, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9995;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.pause-modal-overlay.hidden,
.cancel-modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.pause-modal-card {
    background: linear-gradient(155deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.55);
    border-radius: 24px;
    padding: 26px 22px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(59, 130, 246, 0.25);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.pause-badge-icon {
    font-size: 44px;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.7));
    margin-bottom: 4px;
}

.pause-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #93C5FD 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 4px 0;
}

.pause-desc {
    font-size: 12px;
    color: #94A3B8;
    margin: 0;
}

.pause-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.btn-resume-game {
    width: 100%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: 2px solid #34D399;
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.btn-resume-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.6);
}

.btn-cancel-match {
    width: 100%;
    background: rgba(239, 68, 68, 0.12);
    color: #FCA5A5;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-cancel-match:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: #EF4444;
    color: #FFFFFF;
}

/* MODAL DE CANCELACIÓN */
.cancel-modal-card {
    background: linear-gradient(155deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(239, 68, 68, 0.6);
    border-radius: 24px;
    padding: 26px 22px;
    width: 90%;
    max-width: 390px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(239, 68, 68, 0.25);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.cancel-badge-icon {
    font-size: 42px;
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.7));
    margin-bottom: 4px;
}

.cancel-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #EF4444;
    margin: 0 0 6px 0;
}

.cancel-desc {
    font-size: 12.5px;
    color: #CBD5E1;
    margin: 0;
    line-height: 1.45;
}

.cancel-players-vote {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 14px;
    text-align: left;
}

.vote-title {
    font-size: 10px;
    font-weight: 800;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.vote-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vote-avatar {
    font-size: 26px;
}

.vote-details {
    display: flex;
    flex-direction: column;
}

.vote-name {
    font-size: 13px;
    font-weight: 800;
    color: #FFFFFF;
}

.vote-status {
    font-size: 11px;
    font-weight: 600;
    color: #F59E0B;
}

.status-ready {
    color: #F87171;
}

.cancel-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-confirm-cancel {
    width: 100%;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    border: 2px solid #F87171;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transition: all 0.2s ease;
}

.btn-confirm-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.6);
}

.btn-leave-room-direct {
    width: 100%;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #F8FAFC;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-leave-room-direct:hover {
    background: linear-gradient(135deg, #64748B 0%, #475569 100%);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #FFFFFF;
}

.btn-leave-room-direct.hidden {
    display: none !important;
}

.btn-dismiss-cancel {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: #CBD5E1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dismiss-cancel:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

/* ==========================================================================
   MODAL DE REGLAS DEL JUEGO (ENGRANAJE)
   ========================================================================== */
.rules-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 14, 28, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10500;
    transition: opacity 0.25s ease;
}

.rules-modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.rules-modal-card {
    background: linear-gradient(155deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.5);
    border-radius: 24px;
    padding: 22px 20px;
    width: 92%;
    max-width: 440px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.2);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.rules-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

.rules-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rules-badge-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
}

.rules-title {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 1.2px;
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.rules-subtitle {
    font-size: 11px;
    color: #94A3B8;
    margin: 2px 0 0 0;
    font-weight: 600;
}

.rules-close-x {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #CBD5E1;
    font-size: 14px;
    font-weight: 800;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rules-close-x:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #FFFFFF;
    border-color: #EF4444;
}

.rules-content-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    margin-bottom: 14px;
}

.rules-content-list::-webkit-scrollbar {
    width: 5px;
}

.rules-content-list::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 4px;
}

.rule-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.2s ease;
}

.rule-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(245, 158, 11, 0.3);
}

.rule-icon-box {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rule-icon-box.bg-red { background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.5); }
.rule-icon-box.bg-yellow { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.5); }
.rule-icon-box.bg-green { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.5); }
.rule-icon-box.bg-blue { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.5); }
.rule-icon-box.bg-purple { background: rgba(168, 85, 247, 0.2); border: 1px solid rgba(168, 85, 247, 0.5); }
.rule-icon-box.bg-gold { background: rgba(250, 204, 21, 0.25); border: 1px solid rgba(250, 204, 21, 0.6); }

.rule-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rule-title {
    font-size: 13px;
    font-weight: 800;
    color: #F8FAFC;
}

.rule-text {
    font-size: 11.5px;
    color: #94A3B8;
    margin: 0;
    line-height: 1.4;
}

.rule-text strong {
    color: #F59E0B;
}

.rules-footer {
    padding-top: 6px;
}

.btn-close-rules {
    width: 100%;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
    border: 1.5px solid #FCD34D;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}

.btn-close-rules:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.6);
}

/* ENLACES DIRECTOS A REGLAS EN SETUP Y PAUSA */
.setup-rules-link {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    padding: 6px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.setup-rules-link:hover {
    color: #F59E0B;
    text-decoration: underline;
}

.btn-pause-rules {
    width: 100%;
    background: rgba(245, 158, 11, 0.12);
    color: #FDE68A;
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-pause-rules:hover {
    background: rgba(245, 158, 11, 0.24);
    border-color: #F59E0B;
    color: #FFFFFF;
}

/* ==========================================================================
   INPUT DE NOMBRE DE JUGADOR (CONFIGURACIÓN INICIAL)
   ========================================================================== */
.setup-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.char-counter {
    font-size: 11px;
    font-weight: 700;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.name-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 2px 14px;
    transition: all 0.2s ease;
}

.name-input-wrapper:focus-within {
    border-color: #F59E0B;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
    background: rgba(15, 23, 42, 0.95);
}

.name-input-wrapper.input-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
    animation: shakeInput 0.35s ease;
}

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

.name-input-icon {
    font-size: 18px;
    margin-right: 10px;
}

.player-name-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 14.5px;
    font-weight: 700;
    padding: 10px 0;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.player-name-input::placeholder {
    color: #64748B;
    font-weight: 500;
}

.input-validation-msg {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #F87171;
    margin-top: 5px;
    padding-left: 4px;
}

.input-validation-msg.hidden {
    display: none !important;
}

/* ==========================================================================
   SALA PRIVADA EN LÍNEA (LOBBY Y JUGADORES)
   ========================================================================== */
.online-status-badge {
    font-size: 10px;
    font-weight: 700;
    color: #10B981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    padding: 2px 7px;
}

.online-players-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 8px;
    max-height: 140px;
    overflow-y: auto;
}

.online-player-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 6px 10px;
    border-left: 3px solid #64748B;
}

.online-player-card.is-red { border-left-color: #EF4444; }
.online-player-card.is-green { border-left-color: #10B981; }
.online-player-card.is-yellow { border-left-color: #F59E0B; }
.online-player-card.is-blue { border-left-color: #3B82F6; }

.online-player-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-player-avatar {
    font-size: 16px;
}

.online-player-name {
    font-size: 13px;
    font-weight: 800;
    color: #F8FAFC;
}

.online-player-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #CBD5E1;
}

.online-player-badge.host-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.online-share-box {
    display: flex;
    gap: 6px;
}

.share-link-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    color: #94A3B8;
    font-size: 11px;
    font-family: inherit;
    outline: none;
}

.btn-copy-link {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-copy-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-start-game:disabled {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #94A3B8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ==========================================================================
   ESTILOS DE LOBBY Y SALAS MULTIJUGADOR ESTILO GUNBOUND
   ========================================================================== */

/* 1. SELECCIÓN DE 2 MODOS PRINCIPALES (SOLO VS MULTIJUGADOR) */
.main-two-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.btn-main-mode {
    background: rgba(15, 23, 42, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-main-mode:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 41, 59, 0.85);
    transform: translateY(-2px);
}

.btn-main-mode.active {
    border-color: #F59E0B;
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.btn-main-mode.highlight-multi {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.btn-main-mode.highlight-multi:hover {
    border-color: #10B981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}

.mode-btn-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.mode-btn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mode-btn-title {
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #FFFFFF;
}

.mode-btn-sub {
    font-size: 10px;
    color: #94A3B8;
    line-height: 1.2;
}

.solo-config-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 2. VISTA LOBBY GUNBOUND */
.lobby-modal-card {
    max-width: 520px;
    width: 95%;
    max-height: 92vh;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(59, 130, 246, 0.2);
}

.lobby-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    gap: 8px;
}

.btn-lobby-back {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #CBD5E1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-lobby-back:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

.lobby-header-title {
    text-align: center;
    flex: 1;
}

.lobby-header-title h2 {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.lobby-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: #94A3B8;
}

.lobby-status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 10.5px;
    font-weight: 700;
    color: #34D399;
}

.lobby-coins-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #FDE68A;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
}

/* BARRA DE ACCIONES SUPERIOR DEL LOBBY */
.lobby-actions-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.btn-action-create {
    flex: 1.2;
    min-width: 120px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
    border: 1.5px solid #FCD34D;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
}

.btn-action-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55);
}

.btn-action-quick {
    flex: 1;
    min-width: 110px;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: #FFFFFF;
    border: 1.5px solid #A5B4FC;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.btn-action-quick:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.btn-action-refresh {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #CBD5E1;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-action-refresh:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    transform: rotate(90deg);
}

.direct-join-box {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.direct-join-box input {
    width: 52px;
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 8px;
    text-align: center;
    font-family: inherit;
}

.direct-join-box button {
    background: #3B82F6;
    border: none;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    padding: 7px 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.direct-join-box button:hover {
    background: #2563EB;
}

/* CONTENEDOR Y TABLA DE SALAS */
.rooms-container {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 220px;
}

.rooms-table-header {
    display: grid;
    grid-template-columns: 32px 1fr 70px 48px 50px 60px 65px;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
}

.rooms-scroll-list {
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 2px;
}

.rooms-scroll-list::-webkit-scrollbar {
    width: 5px;
}

.rooms-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* FILA DE SALA (ROOM ROW) ESTILO GUNBOUND */
.room-row-item {
    display: grid;
    grid-template-columns: 32px 1fr 70px 48px 50px 60px 65px;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 8px;
    transition: all 0.2s ease;
}

.room-row-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(2px);
}

.room-id-badge {
    font-size: 11px;
    font-weight: 900;
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 2px 4px;
    text-align: center;
}

.room-title-text {
    font-size: 12px;
    font-weight: 700;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-host-text {
    font-size: 11px;
    font-weight: 600;
    color: #CBD5E1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-type-badge {
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    padding: 2px 4px;
    border-radius: 5px;
    white-space: nowrap;
}

.room-type-badge.type-public {
    background: rgba(16, 185, 129, 0.12);
    color: #34D399;
}

.room-type-badge.type-private {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.room-capacity-badge {
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    padding: 2px 4px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.room-capacity-badge.is-full {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.room-status-badge {
    font-size: 9.5px;
    font-weight: 700;
    text-align: center;
    padding: 2px 4px;
    border-radius: 6px;
    white-space: nowrap;
}

.room-status-badge.status-waiting {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}

.room-status-badge.status-playing {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.btn-join-room-action {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-join-room-action.is-private-btn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.btn-join-room-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.btn-join-room-action:disabled {
    background: #334155;
    color: #64748B;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ESTADO VACÍO */
.lobby-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    text-align: center;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
}

.empty-title {
    font-size: 15px;
    font-weight: 800;
    color: #F8FAFC;
    margin-bottom: 6px;
}

.empty-desc {
    font-size: 12px;
    color: #94A3B8;
    max-width: 300px;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* 3. VISTA SALA DE ESPERA (WAITING ROOM DENTRO DE LA SALA) */
.waiting-room-card {
    max-width: 480px;
    width: 95%;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(160deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.2);
}

.waiting-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.waiting-room-tag {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    background: rgba(245, 158, 11, 0.18);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    padding: 3px 10px;
    margin-bottom: 4px;
}

.waiting-title {
    font-size: 19px;
    font-weight: 900;
    color: #FFFFFF;
    margin: 2px 0 4px 0;
}

.waiting-host-badge {
    font-size: 12px;
    color: #94A3B8;
}

.waiting-host-badge strong {
    color: #FCD34D;
}

/* SELECTOR DE CAPACIDAD EN LA SALA DE ESPERA */
.waiting-capacity-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.capacity-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.capacity-box-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #CBD5E1;
}

.capacity-box-notice {
    font-size: 10px;
    font-weight: 600;
    color: #F59E0B;
}

.waiting-capacity-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-cap-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 8px;
    color: #94A3B8;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
}

.btn-cap-pill:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #FFFFFF;
}

.btn-cap-pill.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #F59E0B;
    color: #FCD34D;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.btn-cap-pill.active .cap-num {
    color: #F59E0B;
}

.cap-num {
    font-size: 15px;
    font-weight: 900;
}

.cap-label {
    font-size: 10px;
    font-weight: 700;
}

/* REJILLA DE ASIENTOS DE JUGADORES */
.waiting-slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.waiting-slot-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.waiting-slot-card.slot-red { border-left: 4px solid #EF4444; }
.waiting-slot-card.slot-green { border-left: 4px solid #10B981; }
.waiting-slot-card.slot-yellow { border-left: 4px solid #F59E0B; }
.waiting-slot-card.slot-blue { border-left: 4px solid #3B82F6; }

.waiting-slot-card.slot-locked {
    opacity: 0.35;
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.slot-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.slot-color-tag {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.slot-avatar {
    font-size: 20px;
}

.slot-player-name {
    font-size: 13px;
    font-weight: 800;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.slot-status-label {
    font-size: 10.5px;
    font-weight: 600;
}

.status-label-ready { color: #10B981; }
.status-label-bot { color: #94A3B8; }
.status-label-locked { color: #64748B; }

/* COMPARTIR ENLACE DE SALA */
.waiting-share-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
}

.share-box-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #94A3B8;
    margin-bottom: 4px;
    display: block;
}

.share-input-row {
    display: flex;
    gap: 6px;
}

/* ACCIONES DE SALA DE ESPERA */
.waiting-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.waiting-start-hint {
    font-size: 11px;
    color: #94A3B8;
    text-align: center;
    line-height: 1.35;
    margin: 0;
    padding: 0 4px;
}

.btn-leave-waiting-room {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #CBD5E1;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-leave-waiting-room:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
}

/* 4. MODAL FLOTANTE CREAR NUEVA SALA (GUNBOUND) */
.create-room-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 14, 28, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10200;
    transition: opacity 0.25s ease;
}

.create-room-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.create-room-card {
    background: linear-gradient(155deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.6);
    border-radius: 24px;
    padding: 22px 20px;
    width: 92%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(245, 158, 11, 0.25);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.create-icon {
    font-size: 28px;
    display: inline-block;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.create-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.create-subtitle {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 2px;
}

.room-title-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.room-title-input:focus {
    border-color: #F59E0B;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.create-cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cap-option-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cap-option-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.cap-option-card.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #F59E0B;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.cap-option-num {
    font-size: 18px;
    font-weight: 900;
    color: #F8FAFC;
}

.cap-option-card.active .cap-option-num {
    color: #F59E0B;
}

.cap-option-tag {
    font-size: 10px;
    font-weight: 800;
    color: #E2E8F0;
    margin-top: 2px;
}

.cap-option-desc {
    font-size: 9px;
    color: #94A3B8;
}

.create-turn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.turn-option-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 9px 8px;
    color: #CBD5E1;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.turn-option-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #F59E0B;
    color: #FCD34D;
}

.create-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.btn-confirm-create {
    width: 100%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: 1.5px solid #34D399;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.btn-confirm-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6);
}

.btn-cancel-create {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94A3B8;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-create:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

/* ==========================================================================
   SELECTOR PÚBLICO / PRIVADO EN CREAR SALA
   ========================================================================== */
.room-privacy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.privacy-option-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.privacy-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.privacy-option-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #F59E0B;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.privacy-option-btn .priv-icon {
    font-size: 20px;
}

.privacy-option-btn .priv-info {
    display: flex;
    flex-direction: column;
}

.privacy-option-btn .priv-title {
    font-size: 12px;
    font-weight: 800;
    color: #F8FAFC;
}

.privacy-option-btn.active .priv-title {
    color: #FCD34D;
}

.privacy-option-btn .priv-desc {
    font-size: 9.5px;
    color: #94A3B8;
    line-height: 1.2;
}

.private-pass-box {
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.2s ease;
}

.pass-input-row {
    display: flex;
    gap: 8px;
}

.room-pass-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 8px 12px;
    color: #F8FAFC;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    outline: none;
    font-family: inherit;
    transition: border 0.2s;
}

.room-pass-input:focus {
    border-color: #F59E0B;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.room-pass-input.center-text {
    text-align: center;
}

.btn-gen-pin {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #FCD34D;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-gen-pin:hover {
    background: rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.pass-hint {
    font-size: 10px;
    color: #94A3B8;
}

/* ==========================================================================
   MODAL DE INGRESO DE CLAVE (JOIN PRIVATE ROOM)
   ========================================================================== */
.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10300 !important;
    padding: 16px;
    transition: opacity 0.25s ease;
}

.password-modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.password-modal-card {
    background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    padding: 24px 20px;
    max-width: 360px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pass-modal-header {
    text-align: center;
}

.pass-modal-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 6px;
}

.pass-modal-title {
    font-size: 16px;
    font-weight: 900;
    color: #F8FAFC;
    letter-spacing: 0.5px;
}

.pass-modal-sub {
    font-size: 11.5px;
    color: #94A3B8;
    margin-top: 4px;
}

.pass-modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pass-error-msg {
    color: #F87171;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.pass-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-confirm-pass {
    width: 100%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: 1.5px solid #34D399;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.btn-confirm-pass:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-cancel-pass {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94A3B8;
    border-radius: 12px;
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-pass:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

/* ==========================================================================
   INSIGNIAS Y ALERTAS DE LA SALA DE ESPERA
   ========================================================================== */
.waiting-privacy-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    color: #CBD5E1;
    margin: 4px auto 0;
}

.waiting-privacy-pill.is-private {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #FCD34D;
}

.waiting-alert-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%);
    border: 1.5px solid #10B981;
    border-radius: 12px;
    padding: 8px 12px;
    color: #D1FAE5;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

/* ==========================================================================
   TARJETA Y MODAL DE AUTENTICACIÓN GOOGLE & ESTADÍSTICAS (MODELO HÍBRIDO)
   ========================================================================== */

/* 1. Tarjeta en la pantalla de bienvenida / configuración */
.google-auth-card {
    margin: 8px 0 12px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    min-height: fit-content;
    box-sizing: border-box;
    width: 100%;
    transition: all 0.25s ease;
}

.google-guest-state {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
}

.google-guest-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.google-shield-icon {
    font-size: 24px;
    min-width: 28px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.google-guest-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.guest-title {
    font-size: 12px;
    font-weight: 800;
    color: #F8FAFC;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
}

.guest-desc {
    font-size: 10.5px;
    color: #94A3B8;
    line-height: 1.25;
}

.btn-google-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #FFFFFF;
    color: #1F2937;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-google-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
    background: #F8FAFC;
}

.google-connected-state {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.18) 0%, rgba(52, 168, 83, 0.14) 100%);
    border: 1.5px solid rgba(66, 133, 244, 0.45);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
}

.google-user-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.google-avatar-img {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    border: 2px solid #4285F4;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.4);
}

.google-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.google-user-name-title {
    font-size: 13px;
    font-weight: 800;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.google-badge-pill {
    font-size: 10px;
    font-weight: 800;
    color: #34D399;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 6px;
    padding: 1px 6px;
    display: inline-block;
    width: fit-content;
}

.google-profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.btn-view-stats {
    flex: 1;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7DD3FC;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-view-stats:hover {
    background: rgba(56, 189, 248, 0.3);
    color: #FFFFFF;
}

.btn-google-signout {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-google-signout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #FFFFFF;
}

/* Botón Google en el Lobby */
.btn-lobby-google {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.2) 0%, rgba(52, 168, 83, 0.2) 100%);
    border: 1px solid rgba(66, 133, 244, 0.5);
    color: #93C5FD;
    border-radius: 16px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-lobby-google:hover {
    background: linear-gradient(135deg, #4285F4 0%, #1A73E8 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

/* Botón de estadísticas en el HUD inferior */
.btn-hud-stats {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.btn-hud-stats:hover {
    background: #38BDF8;
    color: #0F172A;
    border-color: #38BDF8;
    transform: scale(1.1);
}

/* 2. Modal de Conexión de Google */
.google-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.google-modal-card {
    background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(66, 133, 244, 0.4);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 22px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 30px rgba(66, 133, 244, 0.2);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.google-modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.google-svg-large {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    margin-bottom: 4px;
}

.google-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: #F8FAFC;
    letter-spacing: 0.5px;
}

.google-modal-header p {
    margin: 0;
    font-size: 12px;
    color: #94A3B8;
    line-height: 1.3;
}

.google-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.google-gis-container {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.google-form-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
}

.google-field-label {
    font-size: 11px;
    font-weight: 700;
    color: #CBD5E1;
}

.google-field-input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    color: #F8FAFC;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border 0.2s ease;
}

.google-field-input:focus {
    border-color: #4285F4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
}

.google-benefit-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(16, 185, 129, 0.35);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.benefit-row {
    font-size: 11px;
    color: #D1FAE5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.google-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.btn-confirm-google {
    background: linear-gradient(135deg, #4285F4 0%, #1A73E8 100%);
    color: #FFFFFF;
    border: 1.5px solid #93C5FD;
    border-radius: 12px;
    padding: 12px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.4);
    transition: all 0.2s ease;
}

.btn-confirm-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.6);
}

.btn-cancel-google {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94A3B8;
    border-radius: 12px;
    padding: 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-google:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

/* 3. Modal de Perfil & Estadísticas de Partidas */
.profile-stats-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.profile-stats-card {
    background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    padding: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-user-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stats-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid #4285F4;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(66, 133, 244, 0.4);
}

.stats-user-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: #F8FAFC;
}

.stats-email {
    font-size: 11px;
    color: #94A3B8;
}

.stats-cloud-tag {
    font-size: 10px;
    font-weight: 800;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    padding: 2px 8px;
    width: fit-content;
}

.btn-close-stats {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94A3B8;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-stats:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border-color: #EF4444;
}

/* Grilla de KPIs */
.profile-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .profile-kpis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpi-icon {
    font-size: 20px;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 15px;
    font-weight: 900;
    color: #F8FAFC;
}

.kpi-label {
    font-size: 10px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
}

/* Historial de Partidas */
.profile-history-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-history-section h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #FCD34D;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    transition: background 0.15s ease;
}

.history-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.history-badge {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.history-badge.win {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10B981;
    color: #34D399;
}

.history-badge.loss {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #EF4444;
    color: #F87171;
}

.history-delta.positive {
    color: #34D399;
    font-weight: 800;
}

.history-delta.negative {
    color: #F87171;
    font-weight: 800;
}

.history-date {
    color: #64748B;
    font-size: 10px;
}

/* ==========================================================================
   ADAPTABILIDAD RESPONSIVE MÓVIL PROFUNDA (PANTALLAS <= 480px Y <= 365px)
   ========================================================================== */
@media (max-width: 480px) {
    body {
        padding: 4px 6px;
    }

    .game-layout {
        width: 100%;
        max-width: 100%;
        gap: 6px;
    }

    .top-header {
        padding: 6px 10px;
    }

    .brand-title {
        font-size: 12.5px;
    }

    .room-badge {
        padding: 4px 8px;
        font-size: 11px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Modal de Inicio y Modos */
    .setup-modal-overlay {
        padding: 8px 6px;
        align-items: center;
    }

    .setup-modal-card {
        padding: 14px 12px;
        gap: 10px;
        border-radius: 18px;
        width: 100%;
        max-height: 96vh;
    }

    .setup-badge-icon {
        font-size: 28px;
        margin-bottom: 2px;
    }

    .setup-title {
        font-size: 18px;
        letter-spacing: 1px;
        margin-bottom: 2px;
    }

    .setup-desc {
        font-size: 11px;
    }

    .setup-section {
        gap: 6px;
    }

    .setup-section-label {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .name-input-wrapper {
        padding: 2px 10px;
    }

    .player-name-input {
        font-size: 13px;
        padding: 8px 0;
    }

    /* Tarjeta Google */
    .google-auth-card {
        margin: 6px 0 10px;
    }

    .google-guest-state {
        padding: 10px 12px;
        gap: 8px;
    }

    .google-shield-icon {
        font-size: 22px;
        min-width: 24px;
    }

    .guest-title {
        font-size: 11.5px;
    }

    .guest-desc {
        font-size: 10px;
    }

    .btn-google-action {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Modos de Juego */
    .main-two-modes {
        gap: 8px;
    }

    .btn-main-mode {
        padding: 10px 6px;
        border-radius: 14px;
    }

    .mode-btn-icon {
        font-size: 26px;
        margin-bottom: 4px;
    }

    .mode-btn-title {
        font-size: 12.5px;
    }

    .mode-btn-sub {
        font-size: 9px;
    }

    /* Selector de Jugadores */
    .players-selector-grid {
        gap: 6px;
    }

    .count-card {
        padding: 8px 4px;
        border-radius: 12px;
    }

    .count-num {
        font-size: 18px;
    }

    .count-tag {
        font-size: 10px;
    }

    .count-detail {
        font-size: 8px;
    }

    /* Selector Quién Tira Primero */
    .setup-toggle-grid {
        gap: 6px;
    }

    .setup-option-btn {
        padding: 8px 8px;
        gap: 6px;
        border-radius: 12px;
    }

    .opt-icon {
        font-size: 20px;
    }

    .opt-title {
        font-size: 11px;
    }

    .opt-desc {
        font-size: 8.5px;
    }

    /* Botón Empezar */
    .btn-start-game {
        padding: 12px 14px;
        font-size: 14.5px;
        border-radius: 13px;
        margin-top: 4px;
    }

    /* Modales de Google y Perfil */
    .google-modal-card {
        padding: 16px 14px;
        max-width: 95vw;
        border-radius: 16px;
    }

    .profile-stats-card {
        padding: 16px 12px;
        max-width: 96vw;
        border-radius: 16px;
    }

    .stats-avatar-large {
        width: 40px;
        height: 40px;
    }

    .profile-kpis-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .kpi-card {
        padding: 8px 6px;
    }

    .kpi-value {
        font-size: 13.5px;
    }

    .kpi-label {
        font-size: 9px;
    }

    /* Lobby Gunbound */
    .lobby-modal-card {
        padding: 12px 8px;
        width: 98vw;
        max-height: 96vh;
    }

    .lobby-header-bar {
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .lobby-actions-toolbar {
        gap: 6px;
        margin-bottom: 8px;
    }

    .btn-action-create, .btn-action-quick {
        font-size: 11px;
        padding: 7px 8px;
        min-width: 95px;
    }

    /* HUD Inferior */
    .bottom-hud {
        padding: 6px 10px;
        border-radius: 14px;
    }

    .profile-name {
        font-size: 12px;
    }

    .profile-wallet {
        font-size: 10.5px;
    }

    .dice-btn {
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 365px) {
    .setup-modal-card {
        padding: 12px 8px;
    }
    .btn-google-action {
        font-size: 11.5px;
        padding: 7px 10px;
    }
    .mode-btn-title {
        font-size: 11.5px;
    }
    .opt-title {
        font-size: 10px;
    }
}




