:root {
    --primary: #4a90e2;
    --dark: #2d3748;
    --light: #f7fafc;
    --accent: #ed8936;
    --secondary: #f3f4f6;
    --success: #48bb78;
    --error: #f56565;
    --text: #2d3748;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    margin: 0;
    line-height: 1.6;
}

/* Quiz pages */
body.quiz {
    background-color: #ebf4ff;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

body.quiz footer {
    width: 100%;
    margin-top: auto;
    display: flex;
    justify-content: center;
    padding: 20px 0 0;
}

/* Shared card styles */
#quiz-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.progress {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
}

body.quiz h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

body.quiz h2 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    line-height: 1.4;
}

.options {
    display: grid;
    gap: 12px;
}

.option-btn {
    background: var(--secondary);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    text-align: left;
}

.option-btn:hover {
    background: #e2e8f0;
    border-color: var(--primary);
}

.option-btn.correct { background: var(--success); color: white; border-color: var(--success); }
.option-btn.wrong { background: var(--error); color: white; border-color: var(--error); }

#feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
    font-weight: 600;
}

#next-btn {
    margin-top: 25px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    display: none;
}

#next-btn:hover { opacity: 0.9; }

.score-display { font-size: 1.5rem; font-weight: bold; color: var(--primary); }

/* Index page styles */
header {
    background: linear-gradient(135deg, var(--primary), #63b3ed);
    color: white;
    padding: 60px 20px;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
}

.container {
    max-width: 900px;
    margin: -40px auto 40px;
    padding: 20px;
}

.intro-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

h1 { margin: 0; font-size: 2.5rem; }

h2 { color: var(--primary); }

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.quiz-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    border-top: 5px solid var(--primary);
}

.quiz-card:hover {
    transform: translateY(-5px);
}

.quiz-card-content {
    padding: 20px;
    flex-grow: 1;
}

.quiz-card h3 {
    margin-top: 0;
    color: var(--dark);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.status-badge {
    display: inline-block;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: #e2e8f0;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-size: 0.9rem;
}
