:root {
    --primary-color: #00a8e8;
    --secondary-color: #0077b6;
    --accent-color: #ffd166;
    --success-color: #06d6a0;
    --error-color: #ef476f;
    --text-color: #2b2d42;
    --bg-color: #ffffff;
    --card-bg: #f8f9fa;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 24px;
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

#progress-container {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#question-counter {
    font-weight: 600;
    color: #8d99ae;
    font-size: 0.9rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: slideUp 0.6s ease-out;
}

.card.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    line-height: 1.4;
    font-weight: 700;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.option-btn {
    background-color: white;
    border: 2px solid #edf2f4;
    border-radius: 16px;
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
}

.option-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 232, 0.1);
}

.option-btn:active {
    transform: translateY(0);
}

.btn-primary,
.btn-secondary {
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 20px rgba(0, 119, 182, 0.2);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 119, 182, 0.3);
}

.btn-secondary {
    background-color: #8d99ae;
    color: white;
}

.btn-secondary:hover {
    background-color: #2b2d42;
}

#feedback-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.correct #feedback-icon::after {
    content: "✨";
}

.incorrect #feedback-icon::after {
    content: "💡";
}

#explanation-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
    background: white;
    padding: 20px;
    border-radius: 16px;
    border-left: 5px solid var(--primary-color);
}

.score-display {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
}

.trophy-icon {
    font-size: 5rem;
    margin-bottom: 10px;
}

.result-img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

#result-message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Transitions pour le cycle de questions */
.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

/* Couleurs de feedback */
.correct-answer {
    background-color: var(--success-color) !important;
    color: white !important;
    border-color: var(--success-color) !important;
}

.incorrect-answer {
    background-color: var(--error-color) !important;
    color: white !important;
    border-color: var(--error-color) !important;
}

@media (min-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}