:root {
    color-scheme: light;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #ffffff;
    color: #0f172a;
}

body.no-select,
body.no-select * {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body.no-select input,
body.no-select textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

input,
button,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

.question-content p {
    margin: 0 0 1rem;
}

.question-content p:last-child {
    margin-bottom: 0;
}

.option-item {
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.option-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.option-item.selected {
    box-shadow: 0 12px 28px rgba(30, 58, 138, 0.08);
}

.toast-root {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(360px, calc(100vw - 2rem));
}

.toast {
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5rem;
    color: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    animation: toast-in 0.2s ease;
}

.toast-info {
    border-left: 4px solid #1e293b;
}

.toast-success {
    border-left: 4px solid #1d4ed8;
}

.toast-warning {
    border-left: 4px solid #d97706;
}

.toast-error {
    border-left: 4px solid #dc2626;
}

.toast-hide {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(4px);
}

.modal-overlay[aria-hidden="false"] {
    display: flex;
}

.timer-warning {
    border-color: #fcd34d !important;
    background: #fffbeb !important;
}

.timer-danger {
    border-color: #fca5a5 !important;
    background: #fef2f2 !important;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .toast-root {
        left: 1rem;
        right: 1rem;
        width: auto;
    }
}