/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid #3a00d0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.score-display {
    display: flex;
    justify-content: space-around;
    font-size: 1.2rem;
    font-weight: bold;
}

main {
    padding: 30px;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

.tutorial-content {
    margin: 20px 0;
    text-align: left;
}

.tutorial-step {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tutorial-step h3 {
    color: #4a00e0;
    margin-bottom: 10px;
}

.example {
    background-color: #e6e6ff;
    border-left: 4px solid #4a00e0;
    padding: 10px;
    margin-top: 10px;
    font-family: monospace;
    font-size: 1.1rem;
}

.puzzle-container {
    width: 100%;
    max-width: 500px;
}

.puzzle-display {
    background-color: #f8f9fa;
    border: 2px solid #4a00e0;
    border-radius: 10px;
    padding: 30px;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.input-container {
    display: flex;
    margin-bottom: 20px;
}

#answer-input {
    flex: 1;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #4a00e0;
    border-radius: 8px 0 0 8px;
    outline: none;
}

#answer-input:focus {
    border-color: #8e2de2;
    box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.2);
}

.hint-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.hint-text {
    margin-left: 15px;
    font-style: italic;
    color: #666;
    flex: 1;
    text-align: left;
}

.feedback {
    min-height: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.final-score {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.final-score p {
    margin: 10px 0;
    font-size: 1.2rem;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 0, 224, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 0, 224, 0.4);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #4a00e0;
    border: 2px solid #4a00e0;
}

.btn-secondary:hover {
    background-color: #e6e6ff;
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .puzzle-display {
        font-size: 1.5rem;
        padding: 20px;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    #answer-input {
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    #submit-answer {
        border-radius: 8px;
    }
    
    .hint-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hint-text {
        margin-left: 0;
        margin-top: 10px;
    }
}