body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
}

.container {
    flex: 1;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 90%;
}

h2 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.theme-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 1.5rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.theme-btn:hover {
    background-color: #2980b9;
}

/* Quiz Interface */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.option-btn {
    padding: 1rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.option-btn:hover {
    background-color: #f9f9f9;
    border-color: #bbb;
}

.option-btn.selected {
    border-color: #3498db;
    background-color: #eaf6fd;
}

.quiz-footer {
    margin-top: 2rem;
    text-align: right;
}

.action-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.action-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.action-btn:hover:not(:disabled) {
    background-color: #219150;
}

/* Review / Results */
.score-display {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.review-item {
    border: 1px solid #ddd;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    background-color: #fafafa;
}

.review-item.correct {
    border-left: 5px solid #27ae60;
}

.review-item.incorrect {
    border-left: 5px solid #c0392b;
}

.review-question {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

.review-explanation {
    margin-top: 0.5rem;
    font-style: italic;
    color: #555;
    background-color: #eef;
    padding: 0.5rem;
    border-radius: 4px;
}

.user-answer, .correct-answer {
    display: block;
    margin-top: 0.2rem;
}

.txt-correct { color: #27ae60; font-weight: bold; }
.txt-wrong { color: #c0392b; font-weight: bold; }
