* {
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: system-ui, 'Segoe UI', 'Roboto', sans-serif;
    background: white;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.container {
    max-width: 700px;
    width: 100%;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    padding: 24px 20px 32px;
}

button {
    background: #f0f2f5;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 60px;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
}

button.primary {
    background: #1e6fdf;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

button.primary:hover {
    background: #0a5ac2;
    transform: scale(0.97);
}

button.outline {
    background: white;
    border: 1.5px solid #1e6fdf;
    color: #1e6fdf;
}

button.outline:hover {
    background: #eef4ff;
}

button.small {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-top: 40px;
}

.home-buttons button {
    width: 220px;
    font-size: 1.3rem;
    padding: 14px;
}

.title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.sub {
    text-align: center;
    color: #5e6873;
    margin-bottom: 32px;
}

.import-area {
    margin-top: 30px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 24px;
    border: 1px dashed #cbd5e1;
    text-align: center;
}

.import-label {
    display: inline-block;
    background: #1e6fdf;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 8px 0;
}

.import-label:hover {
    background: #0a5ac2;
}

#fileInput {
    display: none;
}

.import-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: #16a34a;
    margin-top: 8px;
}

.select-quantity {
    margin: 16px 0 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.quantity-btn {
    background: #e9ecef;
    padding: 6px 14px;
    font-size: 0.9rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
}

.quantity-btn.active {
    background: #1e6fdf;
    color: white;
}

.info-note {
    font-size: 0.75rem;
    text-align: center;
    color: #6c757d;
    margin-top: 16px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 28px;
}

.timer-box {
    background: #fee2e2;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: bold;
    font-size: 1.3rem;
    color: #b91c1c;
    font-family: monospace;
}

.exit-btn {
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 14px;
    font-size: 0.85rem;
}

.question-text {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 20px 0 28px;
    background: #fafcff;
    padding: 12px 0;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0 20px;
}

.option {
    background: #f8f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 60px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.1s linear;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option:hover {
    background: #eef2ff;
    border-color: #b9c8ff;
}

.option.correct-highlight {
    background: #b9e6ff !important;
    border-color: #0084cc !important;
}

.option.wrong-highlight {
    background: #ffd9b5 !important;
    border-color: #e68a2e !important;
}

.option-prefix {
    font-weight: 700;
    width: 32px;
    color: #2c3e66;
}

.option-text {
    flex: 1;
}

.marker {
    font-size: 1.3rem;
    font-weight: bold;
    width: 28px;
    text-align: center;
}

.results-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 32px 0;
}

.result-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4rem;
    background: #eef2ff;
    color: #1f2a44;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.circle-correct {
    background: #22c55e;
    color: white;
}

.circle-wrong {
    background: #ef4444;
    color: white;
}

.restart-home {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

footer {
    text-align: center;
    font-size: 0.7rem;
    margin-top: 28px;
    color: #aaa;
}

@media (max-width: 550px) {
    .container {
        padding: 18px;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .option {
        padding: 12px 16px;
    }

    .quantity-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}
