/* ==========================================================================
   DESAFÍO SYSTEM SOLUTION — ESTILOS PRINCIPALES
   Optimizado para Tablets Táctiles, Monitores de Feria y Modo Kiosco
   ========================================================================== */

:root {
    --bg-primary: #0a1128;
    --bg-secondary: #101f42;
    --bg-card: rgba(16, 31, 66, 0.85);
    --bg-card-border: rgba(255, 255, 255, 0.12);
    
    --color-brand-blue: #0b1e5b;
    --color-brand-orange: #ff6600;
    --color-brand-orange-hover: #ff7a1a;
    --color-cyan: #00d2ff;
    --color-green: #00e676;
    --color-red: #ff3d00;
    --color-gold: #ffc107;
    
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --text-dim: #718096;
    
    --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    
    --shadow-glow-orange: 0 0 25px rgba(255, 102, 0, 0.45);
    --shadow-glow-cyan: 0 0 25px rgba(0, 210, 255, 0.35);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Reset básico y prevención de zoom o selecciones no deseadas en pantallas táctiles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(255, 102, 0, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(0, 210, 255, 0.1) 0%, transparent 45%),
        linear-gradient(135deg, #070d1e 0%, #0c1836 50%, #09132b 100%);
    font-family: var(--font-main);
    color: var(--text-main);
}

/* Contenedor Kiosco de Pantalla Completa */
.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ----------------------------------------------------
   CABECERA KIOSCO SUPERIOR
   ---------------------------------------------------- */
.kiosk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(10, 17, 40, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-card-border);
    z-index: 50;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

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

.btn-header-tool {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-header-tool:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.15);
}

.btn-header-tool.muted {
    opacity: 0.6;
    border-color: var(--color-red);
}

/* ----------------------------------------------------
   SISTEMA DE PANTALLAS (PAGES)
   ---------------------------------------------------- */
.screen-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

/* ----------------------------------------------------
   PANTALLA 0 / 1: MODO ESPERA (ATTRACT SCREEN) & CARRUSEL
   ---------------------------------------------------- */
.standby-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 960px;
    width: 100%;
    padding: 24px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 88vh;
    max-height: 850px;
    display: flex;
    flex-direction: column;
}

.standby-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: rotateBg 15s linear infinite;
}

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

/* Slides del Carrusel de Atracción */
.standby-slides-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.standby-slide {
    display: none;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s ease;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.standby-slide.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

/* Indicadores del Carrusel */
.standby-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.standby-dot {
    width: 28px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.standby-dot.active {
    background: var(--color-brand-orange);
    width: 45px;
    box-shadow: 0 0 10px var(--color-brand-orange);
}

/* Banner Motivacional de Participación en Ranking */
.motivational-callout {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(255, 102, 0, 0.15));
    border: 2px solid var(--color-cyan);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: pulseCyan 2.2s infinite;
}

@keyframes pulseCyan {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); border-color: var(--color-cyan); }
    50% { box-shadow: 0 0 28px rgba(0, 210, 255, 0.6); border-color: #ffffff; }
}

.motivational-callout .moto-icon {
    font-size: 1.8rem;
    animation: floating 2s infinite;
}

.motivational-callout .moto-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.motivational-callout .moto-highlight {
    color: var(--color-brand-orange);
    text-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

.fexpo-header-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
}

.standby-header-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 6px;
    padding: 0 15px;
}

.standby-header-logos .logo-left {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 102, 0, 0.4));
}

.standby-header-logos .logo-right {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

.logo-main-attract {
    max-height: 52px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(255, 102, 0, 0.3));
}

.title-badge {
    display: inline-block;
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.2), rgba(0, 210, 255, 0.2));
    border: 1px solid rgba(255, 102, 0, 0.5);
    color: var(--color-brand-orange);
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 40%, #ffd0a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.main-subtitle {
    font-size: 1.1rem;
    color: var(--color-cyan);
    font-weight: 600;
    margin-bottom: 12px;
}

/* Gran Banner del Premio Sorpresa del 1er Lugar */
.grand-prize-callout {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 102, 0, 0.25));
    border: 2px solid var(--color-gold);
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulseGold 2.5s infinite;
}

@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 193, 7, 0.3); border-color: var(--color-gold); }
    50% { box-shadow: 0 0 30px rgba(255, 193, 7, 0.7); border-color: #ffffff; }
}

.grand-prize-text {
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.grand-prize-highlight {
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

/* Grid de Premios y Niveles de Feria */
.fair-hook-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.hook-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    transition: transform 0.2s ease;
}

.hook-card.gold-tier {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.4);
}

.hook-card.orange-tier {
    background: rgba(255, 102, 0, 0.1);
    border-color: rgba(255, 102, 0, 0.4);
}

.hook-card .hook-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.hook-card .hook-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.hook-card .hook-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Grid Doble en Pantalla de Espera: Récord + Mini Ranking en Vivo */
.standby-center-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.standby-box {
    background: rgba(6, 12, 28, 0.6);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.standby-box-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.85rem;
}

.mini-rank-item .pos {
    font-weight: 900;
    width: 22px;
}

.mini-rank-item .pname {
    font-weight: 700;
    color: #ffffff;
    flex: 1;
    margin: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-rank-item .pstats {
    font-weight: 800;
    color: var(--color-gold);
}

/* Récord Actual */
.record-banner {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 102, 0, 0.15));
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.record-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.record-player {
    font-weight: 900;
    font-size: 1.2rem;
    color: #ffffff;
}

.record-stat {
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    color: var(--color-cyan);
    font-size: 0.95rem;
}

.record-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--color-gold);
    font-size: 1rem;
}

.record-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.record-player {
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
}

.record-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--color-cyan);
    font-size: 0.95rem;
}

/* Botones Principales CTA */
.btn-cta-giant {
    background: linear-gradient(135deg, var(--color-brand-orange) 0%, #e65100 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 18px 45px;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: var(--shadow-glow-orange);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    animation: pulseCta 2.2s infinite;
}

@keyframes pulseCta {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 102, 0, 0.4); }
    50% { transform: scale(1.04); box-shadow: 0 0 35px rgba(255, 102, 0, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 102, 0, 0.4); }
}

.btn-cta-giant:active {
    transform: scale(0.97);
}

.standby-footer-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-sub-action {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sub-action:hover, .btn-sub-action:active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ----------------------------------------------------
   PANTALLA 2: FORMULARIO DE REGISTRO
   ---------------------------------------------------- */
.register-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 580px;
    width: 100%;
    padding: 35px;
}

.reg-header {
    text-align: center;
    margin-bottom: 25px;
}

.reg-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.reg-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.form-input {
    width: 100%;
    background: rgba(7, 13, 30, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--color-brand-orange);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

/* Selector Táctil Rápido de Calificación de Leads */
.tactile-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.tactile-radio-card {
    position: relative;
    cursor: pointer;
    background: rgba(7, 13, 30, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 12px 6px;
    text-align: center;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tactile-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tactile-radio-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.tactile-radio-card.active,
.tactile-radio-card:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.25), rgba(0, 210, 255, 0.15));
    border-color: var(--color-brand-orange);
    box-shadow: 0 0 16px rgba(255, 102, 0, 0.35);
    transform: translateY(-2px);
}

.tactile-radio-card .rc-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

.tactile-radio-card .rc-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    display: block;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--color-brand-orange);
    cursor: pointer;
    margin-top: 2px;
}

.error-banner {
    display: none;
    background: rgba(255, 61, 0, 0.15);
    border: 1px solid var(--color-red);
    color: #ff8a80;
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.9rem;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 600;
}

.error-banner.show {
    display: block;
    animation: shake 0.3s ease;
}

.reg-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-primary-block {
    flex: 2;
    background: linear-gradient(135deg, var(--color-brand-orange) 0%, #e65100 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-glow-orange);
    transition: all 0.2s ease;
}

.btn-primary-block:active {
    transform: scale(0.97);
}

.btn-secondary-block {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

/* ----------------------------------------------------
   PANTALLA 3: CUENTA REGRESIVA
   ---------------------------------------------------- */
.countdown-box {
    text-align: center;
}

.countdown-num {
    font-size: 9rem;
    font-weight: 900;
    color: var(--color-brand-orange);
    text-shadow: 0 0 40px rgba(255, 102, 0, 0.7);
    line-height: 1;
    margin-bottom: 15px;
}

.countdown-num.pulse {
    animation: zoomPulse 0.85s ease-out;
}

.countdown-num.burst {
    font-size: 7rem;
    color: var(--color-cyan);
    text-shadow: 0 0 40px rgba(0, 210, 255, 0.8);
    animation: zoomBurst 0.85s ease-out;
}

@keyframes zoomPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes zoomBurst {
    0% { transform: scale(0.3); opacity: 0; }
    70% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.countdown-label {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
}

/* ----------------------------------------------------
   PANTALLA 4: JUEGO EN VIVO (DESAFÍO)
   ---------------------------------------------------- */
.game-layout {
    width: 100%;
    max-width: 960px;
    height: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

/* Barra Superior de Juego */
.game-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(16, 31, 66, 0.9);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 10px 20px;
}

.game-progress-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chal-badge {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-cyan);
}

.steps-dots {
    display: flex;
    gap: 6px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--color-brand-orange);
    box-shadow: 0 0 10px var(--color-brand-orange);
    transform: scale(1.2);
}

.step-dot.completed {
    background: var(--color-green);
}

.game-live-stats {
    display: flex;
    align-items: center;
    gap: 18px;
}

.score-badge {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-gold);
}

.timer-badge {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 120px;
    text-align: center;
}

/* Barra de tiempo continua */
.timer-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.timer-bar-fill {
    height: 100%;
    width: 100%;
    transition: width 0.05s linear;
}

.timer-bar-fill.normal {
    background: linear-gradient(90deg, var(--color-cyan), var(--color-green));
}

.timer-bar-fill.warning {
    background: linear-gradient(90deg, var(--color-gold), #ff9800);
}

.timer-bar-fill.critical {
    background: linear-gradient(90deg, #ff5722, var(--color-red));
    box-shadow: 0 0 10px var(--color-red);
}

/* Contenido Central del Juego: 2 Columnas (Problema + Teclado) */
.game-main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    min-height: 0;
}

/* Tarjeta del Problema */
.problem-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.problem-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.category-tag {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-brand-orange);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.icon-box {
    font-size: 2rem;
}

.problem-intro {
    font-size: 1.3rem;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.problem-lines {
    background: rgba(4, 9, 24, 0.85);
    border: 2px solid rgba(0, 210, 255, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chal-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
}

.chal-line .chal-label {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.chal-line .chal-val {
    font-size: 1.55rem;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.chal-line.plus .chal-val { 
    color: #00e676; 
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.chal-line.minus .chal-val { 
    color: #ff5252; 
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.chal-line.discount .chal-val { 
    color: var(--color-gold); 
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.chal-line.item { 
    font-size: 1.6rem; 
    color: #ffffff; 
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chal-bullet {
    font-size: 1.2rem;
}

.problem-question-box {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.22) 0%, rgba(14, 40, 110, 0.7) 100%);
    border: 2px solid var(--color-cyan);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    animation: glowCyanBorder 3s infinite alternate;
}

@keyframes glowCyanBorder {
    0% { box-shadow: 0 0 15px rgba(0, 210, 255, 0.2); }
    100% { box-shadow: 0 0 25px rgba(0, 210, 255, 0.5); }
}

.problem-question {
    font-size: 1.7rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
    line-height: 1.3;
}

/* Tarjeta del Teclado y Entrada */
.keypad-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-display-wrapper {
    position: relative;
}

.answer-input-box {
    width: 100%;
    background: rgba(4, 9, 22, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    outline: none;
    letter-spacing: 2px;
    pointer-events: none; /* Se maneja con los botones táctiles */
}

/* Grid del Teclado Numérico Táctil */
.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    flex: 1;
}

.keypad-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}

.keypad-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.keypad-btn.action-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.btn-confirm-answer {
    background: linear-gradient(135deg, var(--color-green) 0%, #00b248 100%);
    color: #003314;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.35);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-confirm-answer:active {
    transform: scale(0.97);
}

/* Overlay de Feedback Correcto / Incorrecto */
.feedback-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    pointer-events: none;
    padding: 20px 40px;
    border-radius: 40px;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.feedback-overlay.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.feedback-overlay.correct {
    background: linear-gradient(135deg, var(--color-green), #00a843);
}

.feedback-overlay.wrong {
    background: linear-gradient(135deg, var(--color-red), #d50000);
}

/* ----------------------------------------------------
   PANTALLA 5: RESULTADOS Y PREMIO
   ---------------------------------------------------- */
.result-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 680px;
    width: 100%;
    padding: 35px 30px;
    text-align: center;
}

.top10-banner {
    display: inline-block;
    background: linear-gradient(90deg, #ffc107, #ff6600);
    color: #000;
    font-weight: 900;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
    animation: pulseCta 2s infinite;
}

.top10-banner.hidden {
    display: none;
}

.res-player-name {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.res-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.res-stat-card {
    background: rgba(6, 12, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 14px 10px;
}

.res-stat-card .val {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
}

.res-stat-card .lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.res-rank-badge {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-cyan);
    margin-bottom: 20px;
}

/* Tarjeta de Premio */
.prize-box {
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.prize-box.won {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.25), rgba(255, 193, 7, 0.2));
    border: 2px solid var(--color-brand-orange);
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.4);
}

.prize-box.consolation {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.prize-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.prize-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 6px;
}

.prize-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* Tarjeta Comercial System Solution en Pantalla de Resultados */
.system-pitch-card {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.12), rgba(11, 30, 91, 0.45));
    border: 2px solid var(--color-cyan);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.system-pitch-card .pitch-badge {
    display: inline-block;
    background: var(--color-cyan);
    color: #061129;
    font-weight: 900;
    font-size: 0.85rem;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.system-pitch-card .pitch-text {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.45;
    margin-bottom: 8px;
}

.system-pitch-card .pitch-callout {
    font-size: 0.9rem;
    color: var(--color-gold);
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.attempts-left-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.res-actions-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ----------------------------------------------------
   PANTALLA 6: RANKING TOP 10
   ---------------------------------------------------- */
.ranking-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 800px;
    width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
}

.ranking-header {
    text-align: center;
    margin-bottom: 14px;
}

.ranking-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-gold);
}

.ranking-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ranking-table-wrapper {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-brand-orange) rgba(255, 255, 255, 0.05);
}

.ranking-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.ranking-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-brand-orange);
    border-radius: 3px;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ranking-table th {
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--bg-card-border);
    text-transform: uppercase;
    position: sticky;
    top: 0;
    background: #0d1a38;
    z-index: 2;
}

.ranking-table td {
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-table tr.highlight-row {
    background: rgba(255, 102, 0, 0.2);
    border-left: 4px solid var(--color-brand-orange);
}

.pos-cell {
    font-weight: 900;
    font-size: 1.15rem;
    width: 50px;
}

.winner-tag {
    background: rgba(0, 230, 118, 0.2);
    color: var(--color-green);
    border: 1px solid var(--color-green);
    border-radius: 12px;
    font-size: 0.7rem;
    padding: 2px 8px;
    margin-left: 8px;
    font-weight: 800;
}

.score-cell {
    color: var(--color-gold);
    font-weight: 800;
}

.time-cell {
    color: var(--color-cyan);
    font-weight: 800;
}

/* ----------------------------------------------------
   ILUSTRACIONES ANIMADAS DE NEGOCIOS Y POS
   ---------------------------------------------------- */
.illustration-box {
    width: 100%;
    max-height: 80px;
    margin-bottom: 12px;
    background: rgba(4, 9, 22, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px 10px;
}

.business-svg {
    width: 100%;
    max-height: 72px;
    height: auto;
}

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

.anim-floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes pulsePos {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; filter: drop-shadow(0 0 6px #ff6600); }
}

.anim-pulse {
    animation: pulsePos 1.8s infinite;
}

@keyframes laserScan {
    0%, 100% { opacity: 0.2; transform: scaleX(0.7); }
    50% { opacity: 1; transform: scaleX(1.1); stroke: #ff0055; }
}

.anim-laser {
    animation: laserScan 1.2s infinite;
}

@keyframes printTicket {
    0% { transform: translateY(10px); opacity: 0.5; }
    50% { transform: translateY(0px); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0.5; }
}

.anim-ticket {
    animation: printTicket 2.5s ease-in-out infinite;
}

/* Animaciones y utilidades */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.35s ease;
}

/* Media Queries para Tablets y Pantallas Pequeñas */
@media (max-width: 900px) {
    .game-main-content {
        grid-template-columns: 1fr;
    }
    
    .standby-center-split {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .fair-hook-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .keypad-btn {
        min-height: 48px;
        font-size: 1.4rem;
    }
    
    .illustration-box {
        max-height: 110px;
    }
}

@media (max-width: 600px) {
    .fair-hook-grid {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 1.6rem;
    }
    
    .res-stats-grid {
        grid-template-columns: 1fr;
    }
}

