* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen {
    display: none;
    width: 100%;
    max-width: 600px;
}

.screen.active {
    display: block;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.celebration-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-number {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 30px;
    font-weight: 600;
}

.question-container {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.question-label {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.question-text {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.question-hint {
    color: #666;
    font-size: 1em;
    font-style: italic;
    line-height: 1.6;
}

.answer-container {
    margin-bottom: 20px;
}

.answer-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.2em;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.answer-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.submit-btn,
.start-btn,
.restart-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover,
.start-btn:hover,
.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.submit-btn:active,
.start-btn:active,
.restart-btn:active {
    transform: translateY(0);
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    display: none;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
}

.treasure-message {
    font-size: 1.3em;
    color: #333;
    margin: 30px 0;
    line-height: 1.8;
}

.treasure-code {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 3px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .question-text {
        font-size: 1.2em;
    }

    .question-hint {
        font-size: 0.9em;
    }

    .answer-input {
        font-size: 1.1em;
        padding: 15px;
    }

    .question-label {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.5em;
    }

    .celebration-icon {
        font-size: 60px;
    }

    .treasure-code {
        font-size: 1.2em;
        padding: 12px 20px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 25px 15px;
        border-radius: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .question-container {
        padding: 20px;
    }

    .question-text {
        font-size: 1.1em;
    }

    .answer-input {
        font-size: 1em;
        padding: 12px;
    }

    .submit-btn,
    .start-btn,
    .restart-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
}