/* === FUENTE === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&display=swap');

/* === RESETEO GENERAL === */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === FONDO CON SLIDES === */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    position: relative;
    text-align: center;
}

/* Fondo animado que rota entre imágenes */
bbody::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    animation: slideShow 720s infinite ease-in-out; /* 12 minutos totales (3 min por imagen) */
    z-index: -2;
    filter: brightness(0.65);
    transition: background-image 2s ease-in-out; /* Fundido suave */
}

/* Capa oscura para mejorar legibilidad */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* === ANIMACIÓN DEL FONDO === */
/* Cada imagen se mantiene 3 minutos aprox */
@keyframes slideShow {
    0%   { background-image: url('img/historia1.jpg'); }
    25%  { background-image: url('img/historia2.jpg'); }
    50%  { background-image: url('img/historia3.jpg'); }
    75%  { background-image: url('img/historia4.jpg'); }
    100% { background-image: url('img/historia1.jpg'); }
}
/* === CONTENEDOR PRINCIPAL === */
.game-container {
    width: 100%;
    max-width: 520px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    padding: 28px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    color: #fff;
    animation: fadeIn 0.8s ease;
}

/* === TÍTULO Y SUBTÍTULO === */
h1 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 3rem;
    letter-spacing: 2px;
    margin: 0 0 10px;
    color: #ffda6a;
    text-shadow: 0 0 15px rgba(255, 221, 118, 0.8);
    animation: glow 3s infinite ease-in-out;
}

p {
    color: #eaeaea;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Animación de brillo del título */
@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 221, 118, 0.6); }
    50% { text-shadow: 0 0 25px rgba(255, 221, 118, 1); }
}

/* === TARJETAS DE PISTAS === */
#clues-container {
    margin-bottom: 20px;
}

.clue-card {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 16px;
    color: #fff;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === ENTRADA DEL USUARIO === */
.input-section {
    display: flex;
    gap: 10px;
}

#guess-input {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    color: #333;
}

#guess-button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffc107, #ff8c00);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

#guess-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffb300, #ff6f00);
}

#guess-button:disabled {
    background-color: #b9a26f;
    cursor: not-allowed;
}

/* === MENSAJES === */
#message-area {
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.message-success {
    color: #8aff8a;
}

.message-error {
    color: #d4ac0d;
}

/* === RESPONSIVO === */
@media (max-width: 600px) {
    h1 {
        font-size: 2.2rem;
    }
    .game-container {
        padding: 20px;
    }
}
/* El fondo oscuro del pop-up */
.popup-overlay {
    position: fixed; /* Fijo en la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999; /* Por encima de todo */
    
    /* IMPORTANTE: Oculto por defecto */
    display: none; 
    
    justify-content: center;
    align-items: center;
}

/* Clase para mostrarlo cuando JS lo active */
.popup-overlay.show {
    display: flex;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 400px;
    color: #333; /* Texto negro dentro del popup blanco */
}

.hint-popup {
    /* Oculto por defecto */
    display: none;
    
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    
    /* El estilo amarillo que pediste */
    background-color: #fff3cd; /* Amarillo pálido */
    color: #664d03; /* Texto oscuro para contraste */
    border: 1px solid #ffecb5; /* Borde amarillo */
    
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    
    /* Animación descendente */
    animation: slideDown 0.4s ease-out;
}

/* Clase que usará JS para mostrar el cartel */
.hint-popup.show {
    display: block;
}

/* Animación de entrada */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === POP-UP DIARIO === */
#daily-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: rgba(255,255,255,0.95);
    color: #222;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.4s ease;
}

.popup-content h2 {
    margin-top: 0;
    color: #007bff;
}

#countdown {
    font-size: 1.8em;
    margin: 15px 0;
    font-weight: bold;
}

#close-popup {
    padding: 10px 20px;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

#close-popup:hover {
    background-color: #0056b3;
}

#daily-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    border-radius: 16px;
    padding: 30px 40px;
    text-align: center;
    max-width: 350px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    animation: popupFade 0.5s ease;
}

.popup-gif {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
}

#close-popup {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#close-popup:hover {
    background-color: #0056b3;
}

@keyframes popupFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

p {
    color: #222;
}

/* 1. Para poner el título y el botón en la misma línea */
.header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Espacio entre título y botón */
    margin-bottom: 10px;
}

/* Como ahora usamos flex, quitamos el margin-top del h1 para que se alinee bien */
.header-row h1 {
    margin: 0;
}

/* 2. Estilo del botón de interrogación */
.icon-button {
    background: none;
    border: 2px solid #e4e6eb;
    border-radius: 50%; /* Redondo */
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: #606770;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-button:hover {
    background-color: #e4e6eb;
    color: #000;
}

/* 3. Estilo del Footer (Pie de página) */
.site-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: #888;
    width: 100%;
    padding-bottom: 20px;
}

.site-footer a {
    color: #666;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
    color: #007bff;
}



