/* Global Styles */
:root {
    --primary-blue: #5B7FD4;
    --accent-yellow: #FFFF00;
    --accent-yellow-dark: #e6e600;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-white: #ffffff;
    --bg-light: #f9f9f9;
    --success-green: #4CAF50;
    --error-red: #F44336;
    --border-radius-btn: 28px;
    --border-radius-card: 20px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background-color: var(--primary-blue);
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    gap: 1rem;
}

.logo {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.header-text h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    color: white;
    /* Explicitly white */
}

.header-text p {
    font-size: 1.2rem;
    opacity: 1;
    color: var(--accent-yellow);
    /* Changed to yellow */
    font-weight: 500;
}

/* Main Container */
.quiz-container {
    flex: 1;
    max-width: 700px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen {
    width: 100%;
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-card);
    transition: opacity 0.3s ease;
}

.hidden {
    display: none;
}

/* Typography */
h2 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: var(--border-radius-btn);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.primary-btn {
    background-color: var(--primary-blue);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 127, 212, 0.4);
    filter: brightness(110%);
}

.secondary-btn {
    background-color: var(--bg-white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.secondary-btn:hover {
    background-color: #f0f4ff;
}

/* Progress Section */
.progress-section {
    width: 100%;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-yellow);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

/* Question Card */
.question-card {
    text-align: left;
    margin-bottom: 1.5rem;
}

#question-text {
    font-size: 1.4rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Options */
.options-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.option-btn {
    background: white;
    border: 3px solid transparent;
    border-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%23FFFF00' stroke-width='4' stroke-dasharray='10%2c 10' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    border-radius: 12px;
    /* Fallback */
    padding: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-primary);
    /* For the custom dashed border to work with radius we simulate it or use standard dashed border for simplicity. 
       Let's stick to standard CSS border to ensure compatibility and simplicity as requested 'pure CSS' */
    border: 2px dashed var(--accent-yellow);
    position: relative;
    text-align: left;
}

.option-btn:hover {
    background-color: #ffffe0;
    transform: scale(1.01);
}

.option-btn.selected {
    background-color: #fff9c4;
    border-style: solid;
    border-color: var(--accent-yellow-dark);
}

.option-btn.correct {
    background-color: #e8f5e9;
    border-color: var(--success-green);
    border-style: solid;
}

.option-btn.incorrect {
    background-color: #ffebee;
    border-color: var(--error-red);
    border-style: solid;
}

.option-circle {
    background-color: var(--accent-yellow);
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
    font-family: var(--font-heading);
}

/* Feedback */
.feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    background-color: #f0f4ff;
    text-align: left;
    border-left: 5px solid var(--primary-blue);
    animation: fadeIn 0.5s ease;
}

.feedback.correct-feedback {
    background-color: #e8f5e9;
    border-color: var(--success-green);
}

.feedback.incorrect-feedback {
    background-color: #ffebee;
    border-color: var(--error-red);
}

#feedback-message {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

/* Results */
.score-circle {
    width: 120px;
    height: 120px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1.5rem auto;
    border: 5px solid var(--accent-yellow);
}

#final-score {
    font-size: 3.5rem;
}

.motivational-message {
    font-size: 1.3rem;
    margin: 1.5rem 0;
    color: var(--text-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .header-text h1 {
        font-size: 1rem;
    }

    .question-card h2 {
        font-size: 1.2rem;
    }

    .option-btn {
        font-size: 1rem;
        padding: 0.8rem;
    }
}