:root {
    --primary-color: #2c3e50;
    --secondary-color: #8b7355;
    --accent-color: #c9a961;
    --text-color: #2c2c2c;
    --light-bg: #f8f6f1;
    --border-color: #d4cfc4;
}

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

body {
    font-family: 'EB Garamond', 'Georgia', serif;
    background: var(--light-bg);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border: 1px solid var(--border-color);
    padding: 30px;
    max-width: 1200px;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding: 25px 40px;
    }
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.spacer {
    min-width: 150px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .spacer {
        display: none;
    }
}

h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 2em;
    text-align: center;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.poem-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.poem-selector label {
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

.poem-selector select {
    font-family: 'EB Garamond', 'Georgia', serif;
    font-size: 0.9em;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    cursor: pointer;
}

.poem-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.loading {
    text-align: center;
    color: var(--text-color);
    padding: 30px;
    font-size: 1em;
}

.score {
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.95em;
    color: var(--secondary-color);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.quiz-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .quiz-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .question-box {
        flex: 1;
    }
    
    .options-container {
        flex: 1;
    }
}

.question-box {
    background: var(--light-bg);
    padding: 25px;
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .question-box {
        padding: 20px;
    }
}

.line-number {
    color: var(--secondary-color);
    font-size: 0.8em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: center;
}

.a-verse {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: 400;
    margin-bottom: 15px;
    font-style: italic;
    line-height: 1.3;
    text-align: center;
}

@media (min-width: 768px) {
    .a-verse {
        font-size: 1.8em;
    }
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option {
    background: white;
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.4em;
    font-style: italic;
}

.option:hover {
    background: var(--light-bg);
    border-color: var(--secondary-color);
}

.option.selected {
    background: var(--light-bg);
    border-color: var(--primary-color);
}

.option.correct {
    border-color: var(--accent-color);
    background: #faf8f3;
}

.option.incorrect {
    border-color: var(--secondary-color);
    background: #f9f7f4;
}

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

.buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-family: 'EB Garamond', 'Georgia', serif;
    letter-spacing: 0.5px;
}

button:not(:disabled):hover {
    background: var(--secondary-color);
}

button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    color: #999;
}

.feedback {
    text-align: center;
    margin-top: 12px;
    font-size: 1em;
    font-weight: bold;
    min-height: 25px;
}

.feedback.correct {
    color: var(--accent-color);
}

.feedback.incorrect {
    color: var(--secondary-color);
}

.attribution {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85em;
    color: var(--secondary-color);
}

.attribution a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

.attribution a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}