* {
    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;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

header .subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.screen {
    display: none;
    padding: 30px;
}

.screen.active {
    display: block;
}

h2 {
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn.secondary {
    background: #f0f0f0;
    color: #333;
}

.btn.danger {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.quiz-header span {
    font-weight: 600;
    color: #667eea;
}

.question {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.option {
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    text-align: center;
}

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

.option.selected {
    border-color: #667eea;
    background: #f0f3ff;
}

.option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}

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

.option.disabled {
    pointer-events: none;
}

.score-display {
    text-align: center;
    padding: 30px;
    margin-bottom: 24px;
}

.score-display .score-value {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-display .score-label {
    font-size: 1.2rem;
    color: #666;
    margin-top: 8px;
}

#score-breakdown {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

#score-breakdown h3 {
    margin-bottom: 16px;
    color: #333;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.breakdown-translation {
    font-size: 0.9rem;
    color: #666;
    padding: 4px 0 12px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.breakdown-item.correct {
    color: #4caf50;
}

.breakdown-item.incorrect {
    color: #f44336;
}

#scores-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.score-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.score-entry .score-info {
    flex: 1;
}

.score-entry .score-chapter {
    font-weight: 600;
    color: #333;
}

.score-entry .score-date {
    font-size: 0.85rem;
    color: #666;
}

.score-entry .score-result {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.no-scores {
    text-align: center;
    color: #666;
    padding: 40px;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .question {
        font-size: 1.2rem;
    }

    .option {
        padding: 12px;
        font-size: 1rem;
    }
}
