* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.setup-container {
    text-align: center;
}

.setup-section {
    margin-bottom: 30px;
}

.setup-section h2 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.subject-buttons, .question-count-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.setup-btn {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.setup-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
}

.setup-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.start-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 20px;
}

.start-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.question-counter {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.score {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
}

.timer {
    font-weight: bold;
    color: #dc3545;
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 20px;
}

.timer.warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.question-container {
    margin-bottom: 30px;
}

.question {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 18px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.05em;
}

.option:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.option.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.option.correct {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.option.incorrect {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0;
    font-weight: bold;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.result-container {
    text-align: center;
    padding: 40px 20px;
}

.result-container h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.final-score {
    font-size: 3em;
    color: #28a745;
    margin: 30px 0;
    font-weight: bold;
}

.result-message {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}