/* Modern Quiz App Styles */
:root {
    --primary-color: #3498db;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --neutral-color: #f5f5f5;
    --text-color: #333;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--neutral-color);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

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

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

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

.button.primary {
    background-color: var(--primary-color);
    color: white;
}

.button.primary:hover:not(:disabled) {
    background-color: #2980b9;
}

.button.success {
    background-color: var(--success-color);
    color: white;
}

.button.success:hover:not(:disabled) {
    background-color: #27ae60;
}

/* Question Styles */
h3 {
    margin-bottom: 20px;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.option {
    padding: 15px;
    background-color: var(--neutral-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.option:hover {
    border-color: var(--primary-color);
}

.option.selected {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.option.correct {
    border-color: var(--success-color);
    background-color: rgba(46, 204, 113, 0.1);
}

.option.incorrect {
    border-color: var(--error-color);
    background-color: rgba(231, 76, 60, 0.1);
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    resize: vertical;
    font-family: inherit;
    font-size: 16px;
}

textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Feedback Styles */
.feedback-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.feedback-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.answer-box {
    padding: 15px;
    background-color: var(--neutral-color);
    border-radius: var(--border-radius);
    min-height: 50px;
}

.answer-box.correct {
    background-color: rgba(46, 204, 113, 0.1);
    border: 2px solid var(--success-color);
}

.answer-box.incorrect {
    background-color: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--error-color);
}

/* Results Styles */
.score-container {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

#score-percentage {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 10px;
    color: var(--primary-color);
}

.results-list {
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

/* Results page button group */
#results-page .button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#results-page .button {
    flex: 1 1 calc(50% - 10px);
    min-width: 150px;
}

.result-item {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.result-item:last-child {
    border-bottom: none;
}

.result-question {
    font-weight: bold;
    margin-bottom: 10px;
}

.result-answers {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-user-answer, .result-correct-answer {
    padding: 10px;
    border-radius: var(--border-radius);
}

.result-user-answer.correct {
    background-color: rgba(46, 204, 113, 0.1);
}

.result-user-answer.incorrect {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .card {
        padding: 20px;
    }
} 