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

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f0f2f5; color: #1a1a2e; }

.quiz-container { max-width: 700px; margin: 0 auto; padding: 24px 16px; }

/* List page */
.quiz-main-title { text-align: center; font-size: 2rem; margin-bottom: 4px; }
.quiz-subtitle { text-align: center; color: #666; margin-bottom: 24px; }
.quiz-grid { display: flex; flex-direction: column; gap: 12px; }
.quiz-card {
    display: block; background: #fff; border-radius: 12px; padding: 20px;
    text-decoration: none; color: inherit; border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: border-color .2s, box-shadow .2s;
}
.quiz-card:hover { border-color: #1565c0; box-shadow: 0 4px 12px rgba(21,101,192,.15); }
.quiz-card h2 { font-size: 1.2rem; margin-bottom: 4px; }
.quiz-card p { color: #555; font-size: .9rem; }
.quiz-card-meta { display: inline-block; margin-top: 8px; font-size: .8rem; color: #1565c0; font-weight: 600; }
.empty-state { text-align: center; color: #999; padding: 40px; }

/* Header & progress */
.quiz-header { margin-bottom: 20px; }
.quiz-header h1 { font-size: 1.4rem; margin-bottom: 12px; }
.back-link { display: inline-block; margin-bottom: 8px; color: #1565c0; text-decoration: none; font-size: .9rem; }
.progress-bar-wrap {
    height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; margin-bottom: 6px;
}
.progress-bar { height: 100%; background: #1565c0; border-radius: 4px; transition: width .3s; width: 0; }
.progress-text { font-size: .85rem; color: #666; }

/* Question card */
.question-slide {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.question-image { margin-bottom: 16px; border-radius: 8px; overflow: hidden; background: #f5f5f5; }
.question-image img { width: 100%; height: auto; display: block; max-height: 350px; object-fit: contain; }
.question-text { font-size: 1.15rem; font-weight: 600; margin-bottom: 20px; line-height: 1.5; }

/* Choices */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border: 2px solid #e0e0e0; border-radius: 10px; cursor: pointer;
    transition: border-color .2s, background .2s; font-size: 1rem;
}
.choice:hover { border-color: #90caf9; background: #f5f9ff; }
.choice input[type="radio"] { accent-color: #1565c0; width: 18px; height: 18px; flex-shrink: 0; }
.choice.correct { border-color: #2e7d32; background: #e8f5e9; }
.choice.wrong { border-color: #c62828; background: #ffebee; }

/* Feedback */
.feedback { margin-top: 16px; padding: 12px 16px; border-radius: 8px; font-weight: 600; font-size: 1rem; }
.feedback-correct { background: #e8f5e9; color: #2e7d32; }
.feedback-wrong { background: #ffebee; color: #c62828; }
.explanation { margin-top: 8px; padding: 12px 16px; background: #fff8e1; border-radius: 8px; color: #5d4037; font-size: .9rem; line-height: 1.5; }

/* Navigation */
.quiz-nav { display: flex; gap: 10px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.btn {
    padding: 12px 28px; border: none; border-radius: 8px; font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: #1565c0; color: #fff; }
.btn-primary:hover { background: #0d47a1; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #bdbdbd; }
.btn-finish { background: #2e7d32; color: #fff; }
.btn-finish:hover { background: #1b5e20; }

/* Results */
.results-card {
    background: #fff; border-radius: 12px; padding: 40px 24px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.results-card h2 { font-size: 1.6rem; margin-bottom: 16px; }
.results-score { font-size: 3rem; font-weight: 700; margin-bottom: 16px; color: #1565c0; }
.results-bar-wrap { height: 12px; background: #e0e0e0; border-radius: 6px; overflow: hidden; margin-bottom: 12px; max-width: 400px; margin-left: auto; margin-right: auto; }
.results-bar { height: 100%; border-radius: 6px; transition: width .5s; }
.results-bar.pass { background: #2e7d32; }
.results-bar.fail { background: #c62828; }
.results-card p { font-size: 1.1rem; margin-bottom: 20px; }
.results-card .btn { margin: 0 6px; }

@media (max-width: 600px) {
    .quiz-container { padding: 12px 8px; }
    .question-slide { padding: 16px; }
    .btn { padding: 10px 18px; font-size: .9rem; }
}
