* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    transform-origin: center;
    animation: appear 0.5s ease-out;
}

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

h1 {
    color: #1e3c72;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.timer {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.2em;
    color: #1e3c72;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.time-unit {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    min-width: 80px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.time-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #2a5298;
}

.time-label {
    font-size: 0.8em;
    color: #666;
}

.question-container {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.question-container:hover {
    transform: translateY(-5px);
}

#question {
    font-size: 1.3em;
    line-height: 1.6;
    margin: 20px 0;
    color: #2c3e50;
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

button:active {
    transform: translateY(0);
}

.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.2em;
    animation: slideIn 0.5s ease-out;
    display: none;
}

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

.correct {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.incorrect {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
    color: white;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.2);
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f00;
    animation: confetti 5s ease-in-out infinite;
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(720deg); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .timer {
        flex-direction: column;
        gap: 5px;
    }

    .time-unit {
        min-width: auto;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}