/* ═════════════════════════════════════════════════════════════════════════════
   ECOCLASIFICA UDEA // DOS JUGADORES (CYBER-ARCADE HUD)
   Específicación estética según .agents/design.md
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
    color-scheme: dark;
    --bg-arcade-obsidian: #0a1710;
    --hud-chassis-bg: linear-gradient(180deg, #0d1e15 0%, #11261a 50%, #0a1710 100%);
    --hud-border-neon: #4DFFBE;
    --hud-border-chassis: #198754;
    --accent-p1-cyan: #38bdf8;
    --accent-p2-mint: #4DFFBE;
    --accent-arcade-gold: #ffeb3b;
    --accent-crimson-error: #ff3b3b;
    --text-primary: #e2f4e3;
    --text-muted: #8dae97;
    --font-arcade: 'Press Start 2P', monospace;
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-arcade-obsidian);
    color: var(--text-primary);
    font-family: var(--font-body);
    background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(77, 255, 190, 0.015) 3px 6px);
}

a {
    color: var(--hud-border-neon);
    text-decoration: none;
    transition: all 0.15s ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(77, 255, 190, 0.6);
}

button {
    font-family: var(--font-arcade);
    cursor: pointer;
    border: none;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--hud-border-neon);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.5;
    cursor: wait;
}

[hidden] {
    display: none !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
   1. ENCABEZADO DE PÁGINA (CHASSIS HUD)
   ═════════════════════════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #0d2016 0%, #11281c 60%, #0a1710 100%);
    border-bottom: 2px solid var(--hud-border-chassis);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(25, 135, 84, 0.25);
    z-index: 10;
}

.btn-arcade-return {
    font-family: var(--font-arcade);
    font-size: 0.62rem;
    padding: 7px 14px;
    background: #14281e;
    color: var(--hud-border-neon) !important;
    border: 1.5px solid var(--hud-border-chassis);
    border-radius: 8px;
    box-shadow: 0 3px 0 #09120d;
    white-space: nowrap;
    text-decoration: none;
}

.btn-arcade-return:hover {
    background: #1a3829;
    border-color: var(--hud-border-neon);
    color: #ffffff !important;
    box-shadow: 0 3px 0 #09120d, 0 0 12px rgba(77, 255, 190, 0.4);
    transform: translateY(-1px);
}

.btn-arcade-return:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #09120d;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-header .hud-leaf {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px rgba(77, 255, 190, 0.6));
}

.page-header .hud-accent {
    background: linear-gradient(135deg, #10b981 0%, #4DFFBE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header .mode-badge {
    font-family: var(--font-arcade);
    font-size: 0.58rem;
    color: var(--accent-p1-cyan);
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════════════════════════
   2. MARCADORES SUPERIORES (SCOREBOARDS DUAL)
   ═════════════════════════════════════════════════════════════════════════════ */
#duo-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.scoreboards {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: #0d1e15;
    border-bottom: 2px solid var(--hud-border-chassis);
    box-shadow: inset 0 -2px 10px rgba(0, 0, 0, 0.6);
}

.scoreboard {
    text-align: center;
    padding: 8px 18px;
    position: relative;
}

.scoreboard:first-child {
    border-right: 2px solid var(--hud-border-chassis);
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 3px;
}

.player-pill {
    font-family: var(--font-arcade);
    font-size: 0.58rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: bold;
}

.pill-p1 {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-p1-cyan);
    border: 1px solid var(--accent-p1-cyan);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.pill-p2 {
    background: rgba(77, 255, 190, 0.2);
    color: var(--accent-p2-mint);
    border: 1px solid var(--accent-p2-mint);
    box-shadow: 0 0 8px rgba(77, 255, 190, 0.4);
}

.scoreboard h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.scoreboard .level {
    font-family: var(--font-arcade);
    font-size: 0.65rem;
    margin: 3px 0 5px;
    color: var(--hud-border-neon);
    text-shadow: 0 0 8px rgba(77, 255, 190, 0.5);
    letter-spacing: 0.04em;
}

.progress-container {
    width: 100%;
    max-width: 420px;
    margin: 4px auto;
}

progress {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #08140c;
    border: 1px solid var(--hud-border-chassis);
    display: block;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.8);
}

progress::-webkit-progress-bar {
    background: #08140c;
    border-radius: 6px;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, #059669 0%, #10b981 70%, #4DFFBE 100%);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(77, 255, 190, 0.6);
    transition: width 0.3s ease;
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, #059669 0%, #10b981 70%, #4DFFBE 100%);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(77, 255, 190, 0.6);
}

.scoreboard .numbers {
    font-family: var(--font-arcade);
    font-size: 0.52rem;
    color: var(--text-muted);
    margin: 4px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.03em;
}

.stat-errors .errors {
    color: var(--accent-crimson-error);
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 59, 59, 0.6);
}

.stat-remaining .remaining {
    color: var(--hud-border-neon);
    font-weight: bold;
    text-shadow: 0 0 6px rgba(77, 255, 190, 0.6);
}

.stat-sep {
    color: #198754;
}

/* ═════════════════════════════════════════════════════════════════════════════
   3. ESCENARIO CENTRAL Y PANTALLA DIVIDIDA
   ═════════════════════════════════════════════════════════════════════════════ */
#duo-stage {
    position: relative;
    flex: 1;
    min-height: 0;
}

#duo-canvas {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#duo-canvas canvas {
    display: block;
}

#player-panels {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    pointer-events: none;
}

.player-panel {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.player-panel:first-child {
    border-right: 2px solid var(--hud-border-chassis);
    box-shadow: 3px 0 15px rgba(25, 135, 84, 0.35);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 23, 16, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
    overflow: auto;
    animation: duoOverlayFade 0.3s ease-out;
}

@keyframes duoOverlayFade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   4. TARJETAS DE JUGADOR (FORMULARIO, RESULTADOS Y DIÁLOGOS)
   ═════════════════════════════════════════════════════════════════════════════ */
.player-card {
    margin: auto;
    width: min(100%, 390px);
    padding: 24px;
    border-radius: 16px;
    background: rgba(10, 24, 16, 0.96) !important;
    border: 2px solid var(--hud-border-neon) !important;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(77, 255, 190, 0.35) !important;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    animation: playerCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes playerCardPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.player-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(77, 255, 190, 0.02) 3px 6px);
    pointer-events: none;
}

.player-card h3 {
    font-family: var(--font-arcade);
    font-size: 0.9rem;
    color: var(--hud-border-neon);
    text-shadow: 0 0 10px rgba(77, 255, 190, 0.5);
    margin: 0 0 10px;
    letter-spacing: 0.04em;
}

.player-card p {
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.5;
    color: #c9e8d2;
    margin: 0 0 12px;
}

/* Formulario de Nombre (Inicio) */
.name-form label {
    display: block;
    font-family: var(--font-arcade);
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 14px 0 8px;
    letter-spacing: 0.04em;
    text-align: left;
}

.name-form input {
    width: 100%;
    border: 2px solid var(--hud-border-chassis);
    border-radius: 8px;
    padding: 11px 14px;
    background: #06110a;
    color: var(--hud-border-neon);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
    transition: all 0.2s ease;
}

.name-form input:focus {
    outline: none;
    border-color: var(--hud-border-neon);
    box-shadow: 0 0 14px rgba(77, 255, 190, 0.5), inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.name-form button,
.player-card button {
    width: 100%;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border: 2px solid var(--hud-border-neon);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 0 #064e3b, 0 0 15px rgba(77, 255, 190, 0.3);
}

.name-form button:hover,
.player-card button:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #064e3b, 0 0 20px rgba(77, 255, 190, 0.5);
}

.name-form button:active,
.player-card button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #064e3b;
}

.name-form small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: #6a8c75;
    margin-top: 14px;
    line-height: 1.4;
}

/* Tutorial HUD en Escenario */
.tutorial {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    background: rgba(13, 30, 21, 0.95);
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--hud-border-neon);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(77, 255, 190, 0.3);
    pointer-events: auto;
    font-size: 0.85rem;
    animation: playerCardPop 0.25s ease-out;
}

.tutorial header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(77, 255, 190, 0.25);
    padding-bottom: 6px;
}

.tutorial h3 {
    margin: 0;
    font-family: var(--font-arcade);
    font-size: 0.72rem;
    color: var(--hud-border-neon);
    text-shadow: 0 0 8px rgba(77, 255, 190, 0.5);
}

.tutorial button {
    font-family: var(--font-arcade);
    font-size: 0.55rem;
    padding: 5px 9px;
    background: #14281e;
    color: var(--accent-arcade-gold);
    border: 1px solid #ffeb3b;
    border-radius: 6px;
    box-shadow: 0 2px 0 #09120d;
}

.tutorial button:hover {
    background: #1c3829;
    box-shadow: 0 2px 0 #09120d, 0 0 10px rgba(255, 235, 59, 0.5);
}

.tutorial p {
    font-family: var(--font-body);
    margin: 8px 0;
    line-height: 1.45;
    color: #e2f4e3;
}

.tutorial .feedback {
    font-family: var(--font-arcade);
    font-size: 0.65rem;
    color: var(--accent-arcade-gold);
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.6);
}

/* Resultados y estadísticas compartidos: result-summary.css */

/* ═════════════════════════════════════════════════════════════════════════════
   5. TABLERO INTERACTIVO DE RESIDUOS (DOS JUGADORES)
   ═════════════════════════════════════════════════════════════════════════════ */
.btn-duo-tablero {
    display: block;
    margin-top: 10px;
    background: linear-gradient(135deg, #10261a 0%, #153826 100%);
    color: var(--hud-border-neon) !important;
    text-decoration: none;
    font-family: var(--font-arcade);
    font-weight: 700;
    font-size: 0.65rem;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--hud-border-chassis);
    box-shadow: 0 3px 0 #09120d;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.btn-duo-tablero:hover {
    background: #1a422d;
    border-color: var(--hud-border-neon);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #09120d, 0 0 15px rgba(77, 255, 190, 0.4);
}

.btn-duo-tablero:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #09120d;
}

.duo-board-card {
    width: min(100%, 540px) !important;
    max-height: 88vh;
    overflow-y: auto;
    text-align: left !important;
    padding: 18px 20px !important;
    background: rgba(10, 24, 16, 0.98) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--hud-border-neon) !important;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(77, 255, 190, 0.35) !important;
}

.duo-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1.5px solid rgba(77, 255, 190, 0.3);
    padding-bottom: 8px;
}

.duo-board-header h4 {
    margin: 0;
    font-family: var(--font-arcade);
    font-size: 0.8rem;
    color: var(--hud-border-neon);
    text-shadow: 0 0 8px rgba(77, 255, 190, 0.5);
    letter-spacing: 0.04em;
}

.btn-duo-board-back {
    font-family: var(--font-arcade);
    font-size: 0.55rem;
    color: var(--hud-border-neon) !important;
    text-decoration: none;
    padding: 5px 10px;
    background: #14281e;
    border: 1px solid var(--hud-border-chassis);
    border-radius: 6px;
    box-shadow: 0 2px 0 #09120d;
    cursor: pointer;
}

.btn-duo-board-back:hover {
    background: #1c3829;
    border-color: var(--hud-border-neon);
    color: #fff !important;
    box-shadow: 0 2px 0 #09120d, 0 0 10px rgba(77, 255, 190, 0.4);
}

.duo-cat-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.duo-cat-btn {
    padding: 8px 6px;
    font-family: var(--font-arcade);
    font-size: 0.58rem;
    font-weight: 700;
    background: #0f2317;
    color: #a7f3d0;
    border: 1.5px solid var(--hud-border-chassis);
    border-radius: 8px;
    box-shadow: 0 3px 0 #09120d;
}

.duo-cat-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #09120d, 0 0 10px rgba(77, 255, 190, 0.25);
}

.duo-cat-btn[data-cat="organicos"].active {
    background: linear-gradient(180deg, #104229 0%, #0d2f1d 100%);
    color: #ffffff;
    border-color: #10B981;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.5), inset 0 0 8px rgba(16, 185, 129, 0.3);
}

.duo-cat-btn[data-cat="reciclables"].active {
    background: linear-gradient(180deg, #1a3328 0%, #11261d 100%);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.2);
}

.duo-cat-btn[data-cat="no_reciclables"].active {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45), inset 0 0 8px rgba(56, 189, 248, 0.2);
}

.duo-board-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.duo-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    max-height: 28vh;
    overflow-y: auto;
    padding-right: 4px;
}

.duo-items-grid::-webkit-scrollbar {
    width: 5px;
}
.duo-items-grid::-webkit-scrollbar-track {
    background: #091710;
}
.duo-items-grid::-webkit-scrollbar-thumb {
    background: var(--hud-border-chassis);
    border-radius: 3px;
}

.duo-item-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #11281c;
    border: 1px solid rgba(77, 255, 190, 0.25);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.72rem;
    transition: all 0.15s ease;
}

.duo-item-pill:hover {
    background: #193e2b;
    border-color: var(--hud-border-neon);
    transform: translateY(-1px);
}

.duo-item-pill.active {
    background: #184c33;
    border-color: var(--hud-border-neon);
    box-shadow: 0 0 12px rgba(77, 255, 190, 0.5);
    transform: scale(1.02);
}

.duo-pill-thumb {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.duo-pill-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-display);
    font-weight: 700;
    color: #e2f4e3;
    font-size: 0.78rem;
}

.duo-detail-box {
    background: linear-gradient(180deg, #091910 0%, #06110a 100%);
    border: 1.5px solid var(--hud-border-chassis);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.duo-detail-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.duo-detail-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--hud-border-chassis);
}

.duo-detail-top h5 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.duo-bin-tag {
    font-family: var(--font-arcade);
    font-size: 0.48rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.duo-detail-desc {
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.5;
    color: #c9e8d2;
    margin: 0 0 10px;
}

.duo-detail-specs {
    font-family: var(--font-body);
    font-size: 0.74rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid rgba(77, 255, 190, 0.15);
    padding-top: 8px;
    color: #d1fae5;
}

.duo-spec-consejo {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid #10b981;
    padding: 5px 8px;
    border-radius: 2px;
    margin-top: 4px;
}

/* ═════════════════════════════════════════════════════════════════════════════
   6. BARRA DE CONTROLES INFERIOR (TECLADO ARCADE)
   ═════════════════════════════════════════════════════════════════════════════ */
.controls {
    background: linear-gradient(180deg, #0d1e15 0%, #08140d 100%);
    border-top: 2px solid var(--hud-border-chassis);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.7);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.controls p {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-primary);
    padding: 10px 16px;
    margin: 0;
    border-right: 1px solid var(--hud-border-chassis);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.controls p:last-child {
    border-right: none;
}

.ctrl-p-tag {
    font-family: var(--font-arcade);
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 4px;
}

.tag-p1 {
    background: rgba(56, 189, 248, 0.25);
    color: var(--accent-p1-cyan);
    border: 1px solid var(--accent-p1-cyan);
}

.tag-p2 {
    background: rgba(77, 255, 190, 0.25);
    color: var(--accent-p2-mint);
    border: 1px solid var(--accent-p2-mint);
}

kbd {
    background: #14281e;
    border: 1.5px solid var(--hud-border-chassis);
    box-shadow: 0 2px 0 #09120d;
    color: var(--hud-border-neon);
    font-family: var(--font-arcade);
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    line-height: 1.2;
}

/* ═════════════════════════════════════════════════════════════════════════════
   7. FOOTER / TELEMETRÍA LOG
   ═════════════════════════════════════════════════════════════════════════════ */
footer {
    flex-shrink: 0;
    max-height: 40px;
    overflow: auto;
    font-family: var(--font-arcade);
    font-size: 0.52rem;
    background: #050c08;
    border-top: 1px solid rgba(25, 135, 84, 0.25);
}

#send-log {
    margin: 0;
    padding: 5px 20px;
    list-style: none;
    color: var(--hud-border-neon);
    letter-spacing: 0.03em;
}

/* ═════════════════════════════════════════════════════════════════════════════
   8. DIÁLOGOS DE ERROR, PAUSA Y REQUISITO DE ESCRITORIO
   ═════════════════════════════════════════════════════════════════════════════ */
.screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 23, 16, 0.88);
    backdrop-filter: blur(10px);
}

.dialog {
    width: min(100%, 440px);
    background: rgba(10, 24, 16, 0.98);
    border: 2px solid var(--hud-border-neon);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(77, 255, 190, 0.4);
    padding: 28px;
    border-radius: 18px;
    text-align: center;
    color: var(--text-primary);
    animation: playerCardPop 0.25s ease-out;
}

.dialog h2 {
    font-family: var(--font-arcade);
    font-size: 0.95rem;
    color: var(--hud-border-neon);
    text-shadow: 0 0 10px rgba(77, 255, 190, 0.5);
    margin: 0 0 12px;
}

.dialog p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #c9e8d2;
    line-height: 1.5;
    margin: 0 0 14px;
}

.dialog button {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: 2px solid var(--hud-border-neon);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.68rem;
    box-shadow: 0 4px 0 #064e3b, 0 0 15px rgba(77, 255, 190, 0.3);
}

.dialog a {
    display: inline-block;
    margin: 12px;
    font-family: var(--font-arcade);
    font-size: 0.62rem;
    color: var(--hud-border-neon);
}

#desktop-required {
    z-index: 110;
}

#duo-error {
    z-index: 120;
}

@media (max-height: 600px) {
    .page-header {
        padding: 5px 12px;
    }
    .scoreboard {
        padding: 4px 12px;
    }
    .player-card {
        padding: 14px;
    }
    .tutorial {
        padding: 8px;
    }
}
