:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --background: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --correct-color: #10b981;
    --wrong-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

#progress-container {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 64px;
    height: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#progress-bar {
    height: 100%;
    background: #fbbf24;
    width: 0%;
    transition: width 0.3s ease;
}

#question-counter {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.8rem;
    color: white;
    font-weight: 500;
}

main {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.screen {
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
}

.hidden {
    display: none !important;
}

h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

p {
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--text-muted);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.primary {
    background: var(--primary-color);
    color: white;
}

.primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.secondary {
    background: var(--text-muted);
    color: white;
    margin-top: 20px;
}

.secondary:hover {
    background: #4b5563;
}

#question-text {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: left;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
    position: relative;
}

.option-btn:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: #e0e7ff;
}

.option-btn.correct {
    border-color: var(--correct-color);
    background: #d1fae5;
    color: #065f46;
}

.option-btn.wrong {
    border-color: var(--wrong-color);
    background: #fee2e2;
    color: #991b1b;
}

.option-btn.disabled {
    cursor: default;
    pointer-events: none;
}

#feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

#feedback.correct {
    color: var(--correct-color);
    background: #d1fae5;
}

#feedback.wrong {
    color: var(--wrong-color);
    background: #fee2e2;
}

.score-display {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

@media (max-width: 600px) {
    .container {
        border-radius: 0;
    }

    main {
        padding: 20px;
    }

    h1 {
        font-size: 1.2rem;
    }
}