body { 
    font-family: 'Segoe UI', sans-serif; 
    background: #FF9800; 
    color: white; 
    text-align: center; 
    margin: 0;
    touch-action: manipulation;
}
.container { 
    max-width: 500px; 
    margin: 100px auto 50px auto; 
    padding: 20px;
}
h1 { 
    font-size: 3rem; 
    margin: 0;
}
#question { 
    font-size: 4rem; 
    margin: 20px; 
    font-weight: bold;
}
input { 
    font-size: 2rem; 
    padding: 10px; 
    width: 150px; 
    text-align: center; 
    border-radius: 10px; 
    border: none; 
    outline: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#timer { 
    font-size: 2.5rem; 
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.1);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 20px;
}
#score { 
    font-size: 1.5rem; 
    margin-top: 20px; 
}
button {
    margin-top: 20px; 
    padding: 10px 20px; 
    background: white; 
    color: #FF9800;
    border: none; 
    border-radius: 5px; 
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.hidden { display: none !important; }
.popup {
    background: white;
    padding: 30px;
    border-radius: 15px;
    color: #333;
    text-align: center;
    animation: popIn 0.3s ease;
}
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
#restartBtn {
    background: #FF9800;
    color: white;
}
/* Modal de Instrucciones */
.cup-modal, .draw-modal, .math-modal, .orbit-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.cup-modal.hidden, .draw-modal.hidden, .math-modal.hidden, .orbit-modal.hidden {
    display: none;
}

.cup-modal-content, .draw-modal-content, .math-modal-content, .orbit-modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    animation: slideIn 0.4s ease;
}

.cup-modal-content h2, .draw-modal-content h1, .math-modal-content h1, .orbit-modal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.instructions-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.instructions-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #FFD700;
}

.instructions-grid {
    display: grid;
    gap: 15px;
    text-align: left;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.instruction-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.instruction-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.start-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1e3c72;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

.start-btn:active {
    transform: translateY(-1px);
}

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

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

@media (max-width: 768px) {
    .cup-modal-content, .draw-modal-content, .math-modal-content, .orbit-modal-content {
        padding: 30px 20px;
        max-width: 90%;
    }

    .cup-modal-content h2, .draw-modal-content h1, .math-modal-content h1, .orbit-modal-content h1 {
        font-size: 2rem;
    }

    .instruction-icon {
        font-size: 1.5rem;
        min-width: 35px;
    }

    .instruction-item {
        font-size: 0.9rem;
    }
}
