:root {
    --bg-color: #0f1c14;
    /* Deep forest dark */
    --panel-bg: rgba(22, 43, 29, 0.7);
    /* Translucent dark green */
    --panel-border: rgba(167, 243, 208, 0.15);
    /* Soft mint border */
    --text-primary: #f0fdf4;
    /* Off white / mint text */
    --text-secondary: #a7f3d0;
    /* Muted mint text */
    --accent: #10b981;
    /* Emerald green accent */
    --accent-hover: #059669;
    /* Darker emerald */
    --selected-bg: rgba(16, 185, 129, 0.2);
    --selected-border: #34d399;
    /* Bright mint selected border */
    --correct: #22c55e;
    --incorrect: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(5, 150, 105, 0.12) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.quiz-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(to right, #6ee7b7, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #34d399, #10b981);
    width: 0%;
    transition: width 0.3s ease;
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Stats Styles */
.stat-row {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #34d399, #10b981);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* Scrollbar for stats container */
#stats-container::-webkit-scrollbar {
    width: 6px;
}
#stats-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
#stats-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    line-height: 1.4;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Option Buttons & Checkboxes */
.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--panel-border);
    color: var(--text-primary);
    padding: 16px 22px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-btn::before {
    content: '';
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.25s ease;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.option-btn.selected {
    border-color: var(--selected-border);
    background: var(--selected-bg);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.option-btn.selected::before {
    background-color: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.option-btn.correct {
    border-color: var(--correct);
    background: rgba(34, 197, 94, 0.15);
    color: var(--text-primary);
}

.option-btn.correct::before {
    background-color: var(--correct);
    border-color: var(--correct);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.option-btn.incorrect {
    border-color: var(--incorrect);
    background: rgba(239, 68, 68, 0.15);
    color: var(--text-primary);
}

.option-btn.incorrect::before {
    background-color: var(--incorrect);
    border-color: var(--incorrect);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn.primary {
    background: var(--accent);
    color: white;
}

.btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.results-panel {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#final-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}