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

body {
    background: #f5f5f5;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app {
    width: 500px;
}

.screen {
    background: #fff;
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hidden {
    display: none;
}

h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.intro {
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
}

.settings {
    margin-bottom: 24px;
}

.settings label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
    margin-top: 12px;
}

.settings label:first-child {
    margin-top: 0;
}

.settings select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.settings select:focus {
    border-color: #999;
}

.start-btn {
    width: 100%;
    padding: 12px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.start-btn:hover {
    background: #333;
}

/* Quiz screen */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.timer {
    background: #111;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.timer.warning {
    background: #c0392b;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-bottom: 24px;
}

.progress {
    height: 100%;
    background: #111;
    border-radius: 2px;
    transition: width 0.3s;
    width: 0%;
}

.question {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #111;
    min-height: 52px;
}

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

.option-btn {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.option-btn:hover {
    background: #f9f9f9;
    border-color: #bbb;
}

.option-btn.correct {
    background: #e8f5e9;
    border-color: #27ae60;
    color: #27ae60;
    font-weight: 500;
}

.option-btn.wrong {
    background: #fdecea;
    border-color: #c0392b;
    color: #c0392b;
    font-weight: 500;
}

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

/* Result screen */
h2 {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.final-score {
    font-size: 36px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}

.score-label {
    font-size: 14px;
    color: #999;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #666;
}

.result-stats span {
    font-weight: 600;
    color: #333;
}

.result-buttons {
    display: flex;
    gap: 8px;
}

.retry-btn {
    flex: 1;
    padding: 12px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.retry-btn:hover {
    background: #333;
}

.home-btn {
    flex: 1;
    padding: 12px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.home-btn:hover {
    background: #f5f5f5;
}

.score-circle.great { border-color: #27ae60; }
.score-circle.great .final-score { color: #27ae60; }

.score-circle.ok { border-color: #e67e22; }
.score-circle.ok .final-score { color: #e67e22; }

.score-circle.bad { border-color: #c0392b; }
.score-circle.bad .final-score { color: #c0392b; }

@media (max-width: 540px) {
    .app {
        width: 100%;
    }
}