* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f5f5;
    color: #222;
}

.container {
    width: min(700px, 92%);
    margin: 40px auto;
}


/* Header */

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    margin-bottom: 5px;
}

.subtitle {
    margin-top: 0;
    color: #777;
}


/* Controls */

.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.controls label {
    display: flex;
    align-items: center;
    gap: 8px;
}

select {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
}


/* Statistics */

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    text-align: center;
}

.stats div {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* Progress bar */

.progress-container {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #555;
    transition: width 0.3s ease;
}


/* Flashcard */

.card {
    background: white;
    border-radius: 12px;
    padding: 50px 40px 40px;
    text-align: center;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.08);

    margin-bottom: 20px;
}

.prompt {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 35px;
}

.answer-area {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.answer-area input {
    flex: 1;
    max-width: 400px;

    padding: 12px 15px;
    font-size: 1.05rem;

    border: 1px solid #bbb;
    border-radius: 7px;
}

.answer-area input:focus {
    outline: 2px solid #888;
    border-color: #888;
}


/* Buttons */

button {
    border: none;
    border-radius: 7px;
    padding: 11px 18px;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    opacity: 0.85;
}

.primary-button {
    background: #333;
    color: white;
}

.secondary-button {
    background: #e8e8e8;
    color: #222;
}

.reset-button {
    background: transparent;
    color: #888;
    font-size: 0.9rem;
}


/* Answer/result */

.result {
    margin: 25px 0;
    font-size: 1.1rem;
}

.result.correct-result {
    color: #16733b;
}

.result.incorrect-result {
    color: #a32929;
}

.correct-answer {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 8px;
}


/* Assessment */

.self-assessment {
    text-align: center;
    margin: 20px 0;
}

.self-assessment p {
    color: #666;
}

.assessment-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.correct {
    background: #dff2e5;
    color: #176b38;
}

.incorrect {
    background: #f5dddd;
    color: #922b2b;
}


/* Bottom actions */

.actions {
    text-align: center;
    margin-top: 20px;
}


/* Utility */

.hidden {
    display: none !important;
}


/* Footer */

footer {
    text-align: center;
    color: #999;
    margin-top: 35px;
    font-size: 0.85rem;
}

kbd {
    background: #e5e5e5;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 0.8rem;
}


/* Mobile */

@media (max-width: 600px) {

    .container {
        margin-top: 25px;
    }

    .card {
        padding: 40px 20px 30px;
    }

    .prompt {
        font-size: 2.5rem;
    }

    .answer-area {
        flex-direction: column;
    }

    .answer-area input {
        max-width: none;
    }

    .assessment-buttons {
        flex-direction: column;
    }

}
