/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #1a202c;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== 头部 ===== */
header {
    background: #2d3748;
    color: #fff;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-inner h1 {
    font-size: 1.4rem;
    font-weight: 600;
}
.badge {
    background: #48bb78;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-weight: 500;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    margin: 24px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.welcome {
    text-align: center;
}
.welcome h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.muted {
    color: #718096;
    font-size: 0.95rem;
}
.small {
    font-size: 0.85rem;
}

/* ===== 模块选择网格 ===== */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.module-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.module-card:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}
.module-card.active {
    border-color: #4299e1;
    background: #ebf8ff;
}
.module-card input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}
.module-card h3 {
    font-size: 1rem;
    margin: 4px 0;
}
.module-card p {
    font-size: 0.9rem;
    color: #4a5568;
}
.module-card small {
    color: #a0aec0;
}

/* ===== 按钮 ===== */
.btn {
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn.primary {
    background: #4299e1;
    color: #fff;
}
.btn.primary:hover:not(:disabled) {
    background: #3182ce;
}
.btn.secondary {
    background: #e2e8f0;
    color: #2d3748;
}
.btn.secondary:hover {
    background: #cbd5e0;
}
.help-btn {
    display: inline-block;
    background: #ed8936;
    color: #fff;
    text-decoration: none;
    margin: 8px 0;
}
.help-btn:hover {
    background: #dd6b20;
}

/* ===== 免责声明 ===== */
.disclaimer {
    margin-top: 20px;
    padding: 14px 16px;
    background: #fefcbf;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #744210;
    border-left: 4px solid #d69e2e;
}
.disclaimer.large {
    background: #fed7d7;
    border-left-color: #e53e3e;
    color: #742a2a;
}

/* ===== 答题页 ===== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}
#progress-fill {
    height: 100%;
    background: #4299e1;
    transition: width 0.3s ease;
}
.quiz-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 20px;
}
#quiz-module-name {
    font-weight: 600;
}
#q-text {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 20px;
}
#q-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#q-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
#q-options label:hover {
    border-color: #bee3f8;
    background: #f7fafc;
}
#q-options input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
#q-options input[type="radio"]:checked + span {
    font-weight: 600;
}
#q-options label:has(input:checked) {
    border-color: #4299e1;
    background: #ebf8ff;
}
.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

/* ===== 结果页 ===== */
.result-card h2 {
    text-align: center;
    margin-bottom: 16px;
}
.result-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f4f8;
}
.result-item:last-child {
    border-bottom: none;
}
.result-item .score {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2b6cb0;
}
.result-item .level {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}
.level.green { background: #c6f6d5; color: #276749; }
.level.yellow { background: #fefcbf; color: #975a16; }
.level.orange { background: #feebc8; color: #9c4221; }
.level.red { background: #fed7d7; color: #9b2c2c; }
hr {
    border: none;
    border-top: 2px dashed #e2e8f0;
    margin: 20px 0;
}
.help-section {
    text-align: center;
}
#btn-retest {
    margin-top: 16px;
    width: 100%;
}

/* ===== 页脚 ===== */
footer {
    margin-top: auto;
    text-align: center;
    padding: 24px 0;
    color: #a0aec0;
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .card {
        padding: 20px 16px;
    }
    .module-grid {
        grid-template-columns: 1fr;
    }
    .header-inner h1 {
        font-size: 1.1rem;
    }
    #q-text {
        font-size: 1rem;
    }
}
/* ===== 新增：介绍区域 ===== */
.info-section {
    margin-top: 30px;
    text-align: left;
}
.info-section h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #2d3748;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.info-card {
    background: #f7fafc;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid #4299e1;
    transition: background 0.2s;
}
.info-card:hover {
    background: #edf2f7;
}
.info-card h4 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #2b6cb0;
}
.info-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #2d3748;
    margin: 0;
}
.info-card p strong {
    color: #2b6cb0;
}
.info-summary {
    background: #ebf8ff;
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 16px;
    border-left: 4px solid #3182ce;
    font-size: 0.95rem;
    color: #2a4365;
}
.info-summary strong {
    color: #e53e3e;
}
@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .info-card {
        padding: 12px;
    }
}