@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg: #f4f1ea;
    --dark: #1a1a1a;
    --blue: #2563eb;
    --border: 2px solid #1a1a1a;
}

body {
    background-color: var(--dark);
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Evita el rebote en iOS */
    position: fixed;
    width: 100%;
}

#game-container {
    background: var(--bg);
    width: 90%;
    max-width: 500px;
    height: 85vh;
    max-height: 700px;
    border: var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
}

.top-nav { position: absolute; top: 15px; left: 15px; z-index: 20; }
.back-link img { width: 30px; height: 30px; }

.screen { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; }

h1 { font-size: 2.8rem; line-height: 0.9; margin: 10px 0; color: var(--dark); text-transform: uppercase; text-align: center; }

.btn-primary {
    background: var(--dark);
    color: var(--bg);
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    max-width: 250px;
}

/* UI JUEGO CENTRADA */
.ui-top {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-bottom: var(--border);
    padding-bottom: 8px;
    position: relative;
    min-height: 30px;
}

.timer-display {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: 700;
}

.image-viewport {
    width: 100%;
    flex: 1;
    margin: 15px 0;
    border: var(--border);
    background: #ddd;
    overflow: hidden;
    border-radius: 4px;
}

#mountain-img { width: 100%; height: 100%; object-fit: cover; }

#options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.option-btn {
    background: white;
    border: var(--border);
    padding: 12px 5px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.hidden { display: none !important; }

/* Ajustes para móviles muy pequeños */
@media (max-height: 600px) {
    h1 { font-size: 2rem; }
    .image-viewport { 
        margin: 10px 0; 
        height: 50%;
    }

}