/* === BOOT ANIMATIONS (SESSIONING) === */
html.is-booting .boot-el {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
}

.boot-el {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
    will-change: opacity, transform;
}

html.no-session .session-only {
    display: none !important;
}

html.has-session .nosession-only {
    display: none !important;
}

/* === BACKGROUND IMAGE PRELOADING === */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/images/bg.webp') center / cover no-repeat;
    opacity: 0;
    transition: opacity 600ms ease;
    z-index: -1;
    pointer-events: none;
}

body {
    background-image: none !important;
}

html.bg-ready body::before {
    opacity: 1;
}

/* === GAME SCREEN (CONTENEDOR PRINCIPAL) === */
.game-screen {
    z-index: 1;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* === HOST CONTAINER === */
.tv-layout {
    --tv-panel-bg: rgba(46, 0, 78, 0.75);
    --tv-panel-bg-2: rgba(15, 23, 42, 0.75);
    --tv-border-cyan: rgba(0, 240, 255, 0.55);
    --tv-border-magenta: rgba(255, 0, 85, 0.50);
    --tv-border-amber: rgba(255, 215, 0, 0.45);
    --tv-glow-cyan: 0 0 28px rgba(0, 240, 255, 0.20);
    --tv-glow-magenta: 0 0 28px rgba(255, 0, 85, 0.18);
    --tv-glow-amber: 0 0 28px rgba(255, 215, 0, 0.16);

    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;

    background:
        radial-gradient(circle at 15% 8%, rgba(0, 240, 255, 0.14) 0%, rgba(0, 240, 255, 0) 35%),
        radial-gradient(circle at 88% 12%, rgba(255, 0, 85, 0.12) 0%, rgba(255, 0, 85, 0) 38%),
        linear-gradient(135deg, var(--color-bg-darker) 0%, #1a1f3a 100%);

    color: var(--color-text-light);
}

/* Transiciones selectivas (evita layout shift) */
.tv-layout * {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity, filter;
    transition-duration: var(--transition-normal);
    transition-timing-function: ease;
}

/* === LOGO FLOTANTE (TOP LEFT) === */
.logo-floating {
    position: fixed;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: 120;
    pointer-events: none;
}

.logo-floating img {
    height: 60px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

/* === CÓDIGO SALA FLOTANTE (TOP RIGHT) === */
.code-sticker-floating {
    position: fixed;
    top: 24px;
    right: 30px;
    z-index: 120;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    background: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    padding: 10px 18px;
    border: 3px solid #FF9800;
    border-radius: var(--radius-md);
    box-shadow: var(--sombra-dura), 0 6px 18px rgba(0, 0, 0, 0.35);

    transform: rotate(-2deg);
    cursor: pointer;
    user-select: none;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.code-sticker-floating:hover {
    transform: rotate(-1deg) scale(1.04);
    box-shadow: var(--sombra-mega), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.code-sticker-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #000;
    opacity: 0.8;
    font-weight: 800;
    letter-spacing: 1px;
}

.code-sticker-value {
    font-size: 26px;
    font-weight: 900;
    color: #000;
    letter-spacing: 3px;
    font-family: var(--font-display);
}

/* Estado "Copiado" - Feedback visual */
.code-sticker-floating.copied {
    border-color: #4CAF50;
    animation: copiedPulse 0.6s ease-out;
}

/* === HEADER CENTRAL (TIMER + RONDA) === */
.tv-header {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 110;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);

    padding: 14px 32px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(var(--blur-enhanced));
    border-radius: var(--radius-card);
    border: 3px solid rgba(139, 92, 246, 0.30);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.40), 0 0 40px rgba(139, 92, 246, 0.18);
}

.round-info {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* === ÁREA CENTRAL (MENSAJES / CONSIGNA / COUNTDOWN / BOTÓN) === */
.center-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;

    width: clamp(400px, 60vw, 900px);
    min-height: 200px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 2.5vw, 40px);

    padding: clamp(24px, 3vw, 50px);

    background:
        radial-gradient(circle at 30% 20%, rgba(255, 215, 0, 0.12) 0%, rgba(255, 215, 0, 0) 50%),
        var(--tv-panel-bg-2);

    border-radius: var(--radius-lg);
    border: 4px solid var(--tv-border-amber);
    box-shadow: var(--tv-glow-amber), 0 12px 32px rgba(0, 0, 0, 0.50);
}

.status-message {
    font-size: clamp(17px, 1.8vw, 22px);
    font-weight: 900;
    color: var(--color-text-light);
    text-align: center;
    line-height: 1.3;
    max-width: 50ch;

    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.12);
}

/* === BOTÓN START/END (EN CENTRO) === */
.btn-start {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 900;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.95);

    background:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 50%),
        rgba(0, 240, 255, 0.15);

    border: 3px solid rgba(0, 240, 255, 0.45);
    border-radius: var(--radius-btn);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.16), 0 8px 20px rgba(0, 0, 0, 0.35);

    cursor: pointer;
    transition: transform var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.btn-start:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.25);
    border-color: rgba(0, 240, 255, 0.70);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.28), 0 10px 24px rgba(0, 0, 0, 0.45);
    transform: translateY(-3px);
}

.btn-start:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === BOTÓN HURRY UP (REMATE) === */
.btn-hurry-up {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 900;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.95);

    background:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 50%),
        rgba(255, 215, 0, 0.18);

    border: 3px solid rgba(255, 215, 0, 0.55);
    border-radius: var(--radius-btn);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.18), 0 8px 20px rgba(0, 0, 0, 0.35);

    cursor: pointer;
    transition: transform var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
    animation: hurry-pulse 1.2s ease-in-out infinite;
}

.btn-hurry-up:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.32);
    border-color: rgba(255, 215, 0, 0.85);
    box-shadow: 0 0 70px rgba(255, 215, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.45);
    transform: translateY(-3px);
    animation: none;
}

.btn-hurry-up:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-hurry-up:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

/* === TARJETAS JUGADORES (MEJORADO) === */
.players-container {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;

    max-width: calc(100vw - 40px);
    padding: 16px 20px;
    
    background: rgba(15, 23, 42, 0.70);
    backdrop-filter: blur(var(--blur-standard));
    border-radius: var(--radius-lg);
    border: 3px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.40);

    animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(70px, 8vw, 100px), 1fr));
    gap: clamp(8px, 1.5vw, 16px);
    justify-items: center;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(0, 0, 0, 0.2);
    padding: 4px;
}

.players-grid::-webkit-scrollbar {
    width: 6px;
}

.players-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.players-grid::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

.players-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* === PLAYER SQUARCLE (UNIFIED CONSOLIDATED STYLES) === */
.player-squarcle {
    position: relative;
    width: clamp(70px, 8vw, 100px);
    aspect-ratio: 1;
    border-radius: var(--radius-card);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    
    background: var(--aura-gradient, linear-gradient(135deg, #FF0055 0%, #00F0FF 100%));
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.16);
    
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    overflow: hidden;
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.player-squarcle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
    border-radius: var(--radius-card);
    z-index: 1;
}

.player-squarcle::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-card);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.player-squarcle:hover {
    transform: translateY(-6px) scale(1.08);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.player-squarcle:hover::after {
    opacity: 0.15;
}

/* === SQUARCLE STATUS COLORS (USING AURA FALLBACK) === */
.player-squarcle.status-connected {
    --aura-gradient: linear-gradient(135deg, #808080 0%, #404040 100%);
    box-shadow: 0 0 16px #808080, 0 0 32px #808080;
}

.player-squarcle.status-connected::after {
    background: linear-gradient(135deg, rgba(128, 128, 128, 0.4) 0%, rgba(128, 128, 128, 0) 100%);
}

.player-squarcle.status-ready {
    --aura-gradient: linear-gradient(135deg, #00FF88 0%, #00DD66 100%);
    box-shadow: 0 0 24px #00FF88, 0 0 48px #00FF88, inset 0 0 24px rgba(0, 255, 136, 0.2);
    animation: selectPulse 0.8s ease-in-out infinite;
}

.player-squarcle.status-ready::after {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.5) 0%, rgba(0, 255, 136, 0) 100%);
    box-shadow: 0 0 24px #00FF88;
}

.player-squarcle.status-answered {
    --aura-gradient: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    box-shadow: 0 0 20px #FFD700, 0 0 40px #FFD700;
}

.player-squarcle.status-answered::after {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0) 100%);
}

.player-squarcle.status-waiting {
    --aura-gradient: linear-gradient(135deg, #00F0FF 0%, #00DDDD 100%);
    box-shadow: 0 0 16px #00F0FF, 0 0 32px #00F0FF;
}

.player-squarcle.status-waiting::after {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.4) 0%, rgba(0, 240, 255, 0) 100%);
    box-shadow: 0 0 16px #00F0FF;
}

.player-squarcle.status-disconnected {
    opacity: 0.45;
    filter: grayscale(100%);
    box-shadow: 0 0 0 0;
}

/* === PLAYER SQUARCLE CONTENT === */
.player-initial {
    position: relative;
    z-index: 2;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 4px 8px rgba(0, 0, 0, 0.4);
    background: transparent;
}

.player-name-label {
    position: relative;
    z-index: 2;
    font-size: clamp(10px, 1.8vw, 12px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 90%;
}

.player-score-label {
    position: relative;
    z-index: 2;
    font-size: clamp(9px, 1.5vw, 10px);
    font-weight: 700;
    color: var(--color-accent-amber);
    text-align: center;
    letter-spacing: 0.5px;
}

.btn-remove-player {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    font-weight: bold;
}

.player-squarcle:hover .btn-remove-player {
    opacity: 1;
}

.btn-remove-player:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.15);
}

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

/* === ADAPTIVE GRID SIZING FOR DIFFERENT PLAYER COUNTS === */

/* 2-4 players: larger cards */
.players-grid:has(.player-squarcle:nth-child(1)):not(:has(.player-squarcle:nth-child(5))) {
    grid-template-columns: repeat(auto-fit, minmax(clamp(85px, 12vw, 120px), 1fr));
    gap: clamp(12px, 2.5vw, 20px);
}

/* 5-8 players: medium cards */
.players-grid:has(.player-squarcle:nth-child(5)):not(:has(.player-squarcle:nth-child(9))) {
    grid-template-columns: repeat(auto-fit, minmax(clamp(75px, 9vw, 105px), 1fr));
    gap: clamp(10px, 2vw, 16px);
}

/* 9-12 players: small cards */
.players-grid:has(.player-squarcle:nth-child(9)):not(:has(.player-squarcle:nth-child(13))) {
    grid-template-columns: repeat(auto-fit, minmax(clamp(65px, 7vw, 90px), 1fr));
    gap: clamp(8px, 1.5vw, 12px);
}

/* 13-16 players: extra small cards */
.players-grid:has(.player-squarcle:nth-child(13)):not(:has(.player-squarcle:nth-child(17))) {
    grid-template-columns: repeat(auto-fit, minmax(clamp(60px, 6vw, 80px), 1fr));
    gap: clamp(6px, 1.2vw, 10px);
}

/* 17-20 players: minimal cards */
.players-grid:has(.player-squarcle:nth-child(17)) {
    grid-template-columns: repeat(auto-fit, minmax(clamp(55px, 5.5vw, 75px), 1fr));
    gap: clamp(5px, 1vw, 8px);
}

/* === PANEL LATERAL FLOTANTE (RANKING ↔ TOP PALABRAS) === */
.floating-side-panel {
    position: fixed;
    top: 140px;
    right: 30px;
    z-index: 105;
    width: 280px;
    max-height: calc(100vh - 300px);
    background: var(--tv-panel-bg);
    backdrop-filter: blur(var(--blur-enhanced));
    border-radius: var(--radius-card);
    border: 3px solid var(--tv-border-cyan);
    box-shadow: var(--tv-glow-cyan), 0 10px 30px rgba(0, 0, 0, 0.50);
    display: flex;
    flex-direction: column;
    resize: both;
    cursor: move;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.sidepanel-toggle {
    position: fixed !important;
    bottom: var(--space-lg) !important;
    right: var(--space-lg) !important;
    width: 280px !important;
    padding: 12px !important;
    background: transparent;
    color: #ffffff96 !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    z-index: 501 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all var(--transition-normal) !important;
}

.floating-side-panel:hover {
    border-color: rgba(0, 240, 255, 0.70);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.24), 0 12px 36px rgba(0, 0, 0, 0.55);
}

/* Categoría sticker (encima del panel) */
.category-sticker {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    z-index: 106;
    background: linear-gradient(135deg, #FF0055 0%, #D9004A 100%);
    color: white;
    font-size: 13px;
    font-weight: 900;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    border: 3px solid #AA0037;
    box-shadow: var(--sombra-dura), 0 6px 16px rgba(0, 0, 0, 0.40);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.panel-tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-md);
}

.panel-tab {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-btn);
    transition: color var(--transition-normal), background-color var(--transition-normal);
    user-select: none;
}

.panel-tab.active {
    color: var(--color-accent-amber);
    background: rgba(255, 215, 0, 0.12);
}

.panel-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

.panel-content {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.panel-view {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: var(--space-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.4) rgba(0, 0, 0, 0.2);
}

.panel-view.active {
    opacity: 1;
    pointer-events: all;
}

/* Listas dentro del panel */
.panel-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.panel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.28);
    border-radius: var(--radius-btn);
    border: 2px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.panel-item .name {
    flex: 1;
    font-weight: 800;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-item .value {
    font-weight: 900;
    color: var(--color-accent-amber);
    min-width: 36px;
    text-align: right;
}

.panel-item .position {
    font-size: 16px;
    min-width: 28px;
    color: rgba(255, 255, 255, 0.70);
}

/* === RESULTS PANEL (cuando termina ronda) === */
.results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 200;

    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(var(--blur-standard));

    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-2xl);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.results-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.results-panel {
    width: clamp(400px, 70vw, 800px);
    max-height: 80vh;
    padding: var(--space-3xl);

    background: var(--tv-panel-bg);
    border-radius: var(--radius-lg);
    border: 4px solid var(--tv-border-magenta);
    box-shadow: var(--tv-glow-magenta), 0 16px 48px rgba(0, 0, 0, 0.70);

    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 0, 85, 0.5) rgba(0, 0, 0, 0.2);
}

.results-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--color-accent-amber);
    text-align: center;
    margin-bottom: var(--space-2xl);
    font-family: var(--font-display);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.50);
}

/* === RESPONSIVE === */
@media (max-width: 1280px) {
    .center-stage {
        width: clamp(340px, 70vw, 700px);
    }

    .players-grid {
        max-height: 220px;
    }
}

@media (max-width: 1024px) {
    .logo-floating {
        top: 15px;
        left: 15px;
    }

    .logo-floating img {
        height: 48px;
    }

    .code-sticker-floating {
        top: 15px;
        right: 20px;
        padding: 8px 14px;
    }

    .code-sticker-value {
        font-size: 20px;
    }

    .tv-header {
        top: 15px;
        padding: 12px 24px;
    }

    .round-info {
        font-size: 13px;
    }

    .category-sticker {
        font-size: 11px;
        padding: 6px 14px;
    }

    .players-container {
        padding: 12px 16px;
    }

    .players-grid {
        max-height: 200px;
    }

    .floating-side-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .center-stage {
        width: calc(100vw - 40px);
        padding: 20px;
    }

    .btn-start,
    .btn-hurry-up {
        padding: 14px 36px;
        font-size: 17px;
    }

    .players-container {
        bottom: 15px;
        padding: 10px 14px;
    }

    .players-grid {
        max-height: 180px;
        grid-template-columns: repeat(auto-fit, minmax(clamp(60px, 7vw, 85px), 1fr));
    }

    .floating-side-panel {
        display: none;
    }
}

@media (max-width: 480px) {
    .tv-header {
        padding: 10px 18px;
    }

    .round-info {
        font-size: 12px;
    }

    .code-sticker-label {
        font-size: 9px;
    }

    .code-sticker-value {
        font-size: 16px;
    }

    .logo-floating img {
        height: 36px;
    }

    .btn-start,
    .btn-hurry-up {
        padding: 12px 28px;
        font-size: 15px;
    }

    .players-container {
        bottom: 12px;
        padding: 8px 12px;
        border: 2px solid rgba(139, 92, 246, 0.25);
    }

    .players-grid {
        max-height: 160px;
        gap: clamp(4px, 0.8vw, 6px);
    }

    .player-squarcle {
        width: clamp(55px, 6.5vw, 70px);
        gap: 3px;
        padding: 6px;
    }

    .player-initial {
        font-size: clamp(18px, 4vw, 28px);
    }

    .player-name-label {
        font-size: clamp(8px, 1.5vw, 10px);
    }

    .player-score-label {
        font-size: clamp(7px, 1.2vw, 9px);
    }

    .btn-remove-player {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}