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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.subject-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 2px solid transparent;
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: #667eea;
}

.subject-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subject-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.subject-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.quiz-header {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.subject-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
}

.question-counter {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.passage-section {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.passage-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.passage-content {
    line-height: 1.6;
    color: #444;
}

.question-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.5;
}

.options-list {
    list-style: none;
}

.option-item {
    margin-bottom: 0.8rem;
}

.option-button {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.option-button:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-button.correct {
    border-color: #4CAF50;
    background: #f1f8e9;
    color: #2e7d32;
}

.option-button.incorrect {
    border-color: #f44336;
    background: #ffebee;
    color: #c62828;
}

.option-button.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.explanation {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid #667eea;
    display: none;
}

.explanation h4 {
    color: #333;
    margin-bottom: 1rem;
}

.explanation-content {
    line-height: 1.6;
    color: #555;
}

.question-map {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
}

.map-item {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

.map-item:hover {
    border-color: #667eea;
}

.map-item.current {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.map-item.correct {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

.map-item.incorrect {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subject-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quiz-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .map-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
    
    .map-item {
        width: 35px;
        height: 35px;
    }
}