.container {
    max-width: 680px;
    min-height: 420px;
    padding: 34px 32px;
    text-align: left;
}

.app-header {
    text-align: center;
    margin-bottom: 24px;
}

.app-header .brain-icon {
    font-size: 52px;
    margin-bottom: 8px;
}

.app-header h1 {
    margin-bottom: 6px;
}

.subtitle {
    margin-bottom: 0;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

.notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f3f4ff;
    color: #555;
    font-size: 14px;
    line-height: 1.55;
}

.field-label {
    display: block;
    margin: 10px 0 7px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.quiz-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 14px;
}

.timer {
    min-width: 70px;
    font-size: 20px;
    font-weight: 800;
    color: #5b5fc7;
    text-align: right;
}

.timer.urgent {
    color: #dc2626;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #eceef5;
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.25s ease;
}

.question-card {
    min-height: 285px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(66, 76, 120, 0.08);
}

.category-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
}

.question-prompt {
    margin: 0 0 18px;
    color: #1f2937;
    font-size: 20px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.options {
    display: grid;
    gap: 10px;
}

.option-button {
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    box-shadow: none;
}

.option-button:hover {
    border-color: #a5b4fc;
    box-shadow: none;
}

.option-button.selected {
    border-color: #6366f1;
    color: #312e81;
    background: #eef2ff;
}

.option-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.quiz-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.quiz-navigation button {
    margin: 0;
}

.secondary-button {
    color: #4b5563;
    background: #e5e7eb;
}

.secondary-button:hover {
    box-shadow: 0 5px 16px rgba(75, 85, 99, 0.18);
}

.status-message {
    min-height: 20px;
    margin-top: 12px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.loading-panel {
    padding: 44px 0;
    text-align: center;
}

.loading-panel .brain-icon {
    animation: pulse 1.2s ease-in-out infinite;
}

.result-panel {
    padding: 12px 0 4px;
    text-align: center;
}

.result-panel .result-number {
    line-height: 1.1;
}

.score-detail {
    margin-top: 16px;
    padding: 11px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 14px;
}

.restart-note {
    margin-top: 18px;
    color: #6b7280;
    font-size: 13px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@media (max-width: 600px) {
    body {
        align-items: flex-start;
        padding: 12px;
    }

    .container {
        min-height: calc(100vh - 24px);
        padding: 24px 18px;
        border-radius: 16px;
    }

    .app-header .brain-icon {
        font-size: 44px;
    }

    .question-card {
        min-height: 320px;
        padding: 18px 14px;
    }

    .question-prompt {
        font-size: 18px;
    }
}
