/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY GENERAL */
body {
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at center, #1a1a1a, #0d0d0d);
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
.header {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO (ARRIBA IZQUIERDA) */
.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

/* MARCADOR DE PUNTOS */
.score-display {
    font-size: 18px;
    font-weight: 600;
    color: #ff6a00;
    letter-spacing: 1px;
}

/* SETTINGS (ARRIBA DERECHA) */
.settings {
    font-size: 26px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.settings:hover {
    transform: rotate(20deg) scale(1.2);
}

/* CONTENIDO PRINCIPAL */
.main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* CONTENEDOR MENÚ */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
    transition: all 0.3s ease;
}

/* BOTONES GENERALES */
.btn {
    padding: 15px 30px;
    border-radius: 10px;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    text-align: center;
}

.btn:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* BOTÓN PRINCIPAL PLAY */
.play-btn {
    background-color: #ff6a00;
    color: white;
    font-size: 20px;
}

/* BOTONES SECUNDARIOS */
.secondary-btn {
    background-color: #1f1f1f;
    color: white;
    border: 1px solid #333;
}

/* PANTALLA DE JUEGO */
#game-screen {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    text-align: center;
}

/* TARJETA BLANCA PARA LA IMAGEN (Resalta el calzado) */
.img-wrapper {
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* IMAGEN SNEAKER */
.sneaker-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* RESPUESTAS (GRID MODO CLÁSICO) */
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.answer-btn {
    width: 100%;
    padding: 15px;
    background-color: #1f1f1f;
    color: white;
    border: 1px solid #333;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.answer-btn:hover {
    background-color: #ff6a00;
    border-color: #ff6a00;
    transform: scale(1.02);
}

/* INPUT MODO EXPERTO */
#sneaker-input {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    border: 2px solid #333;
    color: white;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s;
}

#sneaker-input:focus {
    outline: none;
    border-color: #ff6a00;
}

/* CLASE GLOBAL PARA OCULTAR SCREEN */
.hidden {
    display: none !important;
}

/* ==========================================================================
   NUEVO: ESTILOS PARA EL PANEL DE ESTADÍSTICAS (MODAL)
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fondo oscuro transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #141414;
    border: 2px solid #ff6a00;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    position: relative;
    color: white;
    box-shadow: 0 0 30px rgba(255, 106, 0, 0.25);
    animation: popup 0.3s ease-out;
}

@keyframes popup {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ff6a00;
}

.modal h2 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-box {
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-box.full-width {
    grid-column: span 2;
    border-color: #ff6a00;
    background: linear-gradient(135deg, #1f1f1f 0%, #29170b 100%);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.stat-box.full-width .stat-label {
    color: #ff6a00;
}

.stat-val {
    font-size: 22px;
    font-weight: 800;
    color: white;
}

.stat-box.full-width .stat-val {
    font-size: 36px;
}
/* ==========================================================================
   NUEVO: DISEÑO DE RETROALIMENTACIÓN INTEGRADA (SISTEMA DE CORRECCIÓN)
   ========================================================================== */
.feedback-banner {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.5px;
    animation: slideDown 0.2s ease-out;
}

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

/* Fondo verde translúcido para Aciertos */
.feedback-banner.correct {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

/* Fondo rojo translúcido para Fallos */
.feedback-banner.incorrect {
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* Caja de corrección de respuesta debajo de la imagen */
.feedback-correction {
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #e74c3c;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center;
    color: #e0e0e0;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.feedback-correction strong {
    color: #ffffff;
    font-size: 15px;
    display: inline-block;
    margin-top: 4px;
}

/* El título se pone AQUÍ, con el centrado flex real */
.menu-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);

    /* --- ESTO ES LO QUE SOLUCIONA EL DESPLAZAMIENTO --- */
    white-space: nowrap;    /* Evita que se rompa en dos líneas */
    width: max-content;     /* La caja medirá exactamente lo que mida el texto */
    align-self: center;     /* Flexbox centrará la caja respecto a los botones */
}

/* Opcional: Oculta el logo del header solo cuando el menú de inicio está activo */
body:has(#menu-screen:not(.hidden)) .header .logo {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
/* ESTILOS DEL NUEVO PANEL DE CONFIGURACIÓN */
.btn-opt {
    flex: 1;
    padding: 14px;
    background: #181818;
    border: 2px solid #333;
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-opt:hover {
    background-color: #252525;
    transform: translateY(-2px);
}

/* Colores personalizados para las palabras de dificultad solicitados */
.btn-opt.diff-normal { color: #2ecc71; border-color: rgba(46, 204, 113, 0.3); }
.btn-opt.diff-hard   { color: #f1c40f; border-color: rgba(241, 196, 15, 0.3); }
.btn-opt.diff-expert { color: #e74c3c; border-color: rgba(231, 76, 60, 0.3); }

/* Estados activos (cuando el jugador selecciona uno) */
.btn-opt.active {
    background-color: #ffffff !important;
    color: #0d0d0d !important;
    border-color: #ffffff !important;
}

/* El botón seleccionado adopta el color completo de su dificultad */
.btn-opt.diff-normal.active {
    background-color: #2ecc71 !important;
    color: #0d0d0d !important;
    border-color: #2ecc71 !important;
}
.btn-opt.diff-hard.active {
    background-color: #f1c40f !important;
    color: #0d0d0d !important;
    border-color: #f1c40f !important;
}
.btn-opt.diff-expert.active {
    background-color: #e74c3c !important;
    color: #0d0d0d !important;
    border-color: #e74c3c !important;
}