* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6fb;
    color: #1f2937;
}

.page {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: 40px 0;
}

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 8px;
}

.hero p {
    color: #6b7280;
    font-size: 18px;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.card h2 {
    margin-top: 0;
}

label {
    display: block;
    margin: 18px 0;
    font-weight: 600;
}

select,
button {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 16px;
}

button {
    border: none;
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

.question {
    margin-bottom: 28px;
    border-top: 1px solid #e5e7eb;
    padding-top: 22px;
}

.answers label {
    display: block;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 10px 0;
    font-weight: 400;
    cursor: pointer;
}

.answers label:hover {
    background: #f9fafb;
}

.result {
    font-size: 22px;
    font-weight: 700;
    margin-top: 24px;
}

.correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
}

.wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
}

input[type="number"] {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 16px;
}

.question-limit::placeholder {
    color: #9ca3af;
}

.question-count-hint {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.question-limit.invalid {
    border: 2px solid #ef4444;
    background: #fef2f2;
}

.quiz-navigation {
    display: flex;
    gap: 14px;
    margin-top: 32px;
}

.quiz-navigation button {
    flex: 1;
}

.secondary-button {
    background: #e5e7eb;
    color: #1f2937;
}

.secondary-button:hover {
    background: #d1d5db;
}

.question-image {
    width: 100%;
    max-width: 760px;
    border-radius: 14px;
    margin: 20px 0;
    display: block;
    border: 1px solid #e5e7eb;
}

sup {
    vertical-align: super;
    font-size: 0.75em;
}

sub {
    vertical-align: sub;
    font-size: 0.75em;
}

.result-summary {
    text-align: center;
    margin-bottom: 28px;
}

.score-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
}

.result-bars {
    max-width: 600px;
    margin: 0 auto;
}

.result-bar-label {
    display: flex;
    justify-content: space-between;
    margin: 16px 0 8px;
}

.progress {
    height: 18px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 999px;
}

.result-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-link {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.secondary-link {
    background: #e5e7eb;
    color: #1f2937;
}

.result-question {
    border-top: 1px solid #e5e7eb;
    padding: 22px 0;
}

.result-question h3 {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.result-question h3 span {
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 999px;
}

.result-correct h3 span {
    background: #dcfce7;
    color: #166534;
}

.result-wrong h3 span {
    background: #fee2e2;
    color: #991b1b;
}
.simulation-card {
    margin-top: 24px;
}

.simulation-card ul {
    padding-left: 20px;
    color: #4b5563;
}