:root {
    --ink: #172033;
    --muted: #667085;
    --line: #dfe5ee;
    --primary: #246bfe;
    --primary-dark: #1550ca;
    --soft: #eef4ff;
    --warm: #fff8ec;
    --bg: #f6f8fc;
    --success: #107c5d
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65
}

.container {
    width: min(960px, calc(100% - 32px));
    margin: 0 auto
}

.site-header {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--line)
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.brand {
    font-weight: 800;
    letter-spacing: .04em
}

.brand-mark {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    margin-right: 8px
}

.text-button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer
}

.hero-card {
    margin: 48px auto 28px;
    background: linear-gradient(135deg, #fff 0%, #f0f5ff 100%);
    border: 1px solid #dce6fb;
    border-radius: 28px;
    padding: 56px clamp(24px, 7vw, 76px);
    box-shadow: 0 16px 48px rgba(33, 72, 139, .09)
}

.eyebrow, .section-kicker {
    font-size: 12px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase
}

.hero-card h1 {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.2;
    margin: 14px 0 14px;
    letter-spacing: -.04em
}

.hero-card p {
    max-width: 670px;
    color: var(--muted);
    font-size: 17px
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--success);
    font-size: 14px;
    margin: 24px 0 30px
}

.primary-button, .secondary-button {
    border: 0;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s
}

.primary-button {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(36, 107, 254, .22)
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px)
}

.secondary-button {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line)
}

.secondary-button:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.hidden {
    display: none !important
}

.progress-wrap {
    margin: 28px 0 22px
}

.progress-label {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 7px
}

.progress-track {
    height: 8px;
    background: #e6ebf3;
    border-radius: 100px;
    overflow: hidden
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #246bfe, #6f9cff);
    border-radius: 100px;
    transition: width .3s
}

.form-section {
    display: none
}

.form-section.active {
    display: block
}

.form-section h2, .result-header h2 {
    font-size: 32px;
    line-height: 1.25;
    margin: 5px 0 7px;
    letter-spacing: -.03em
}

.section-desc {
    color: var(--muted);
    margin: 0 0 20px
}

.question-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    margin: 14px 0;
    box-shadow: 0 5px 20px rgba(23, 32, 51, .035)
}

.question-card h3 {
    font-size: 17px;
    margin: 0 0 15px
}

.question-card h3 small {
    display: inline;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin-left: 6px;
    white-space: nowrap
}

.choice-grid {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 10px
}

.choice-grid label, .radio-list label {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 11px 12px;
    border: 1px solid #e7ebf2;
    border-radius: 10px;
    cursor: pointer;
    transition: .15s
}

.choice-grid label:hover, .radio-list label:hover, .direction-grid label:hover {
    border-color: #a9c2ff;
    background: #fbfdff
}

.choice-grid input, .radio-list input, .direction-grid input {
    accent-color: var(--primary);
    margin-top: 5px
}

.radio-list {
    display: grid;
    gap: 9px
}

.range-row {
    display: grid;
    grid-template-columns:130px 1fr 28px;
    gap: 12px;
    align-items: center;
    margin: 13px 0
}

.range-row span {
    font-size: 14px
}

.range-row input, .subject-row input {
    accent-color: var(--primary);
    width: 100%
}

output {
    font-weight: 800;
    color: var(--primary);
    text-align: center
}

.direction-grid {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap: 12px
}

.direction-grid label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 15px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    cursor: pointer
}

.direction-grid label span {
    font-weight: 750
}

.direction-grid label small {
    color: var(--muted);
    font-size: 12px
}

.direction-grid input {
    align-self: flex-start
}

.subject-grid {
    overflow: auto
}

.subject-head, .subject-row {
    display: grid;
    grid-template-columns:130px repeat(3, minmax(90px, 1fr));
    gap: 14px;
    align-items: center;
    min-width: 570px
}

.subject-head {
    padding: 8px 0;
    color: var(--muted);
    font-size: 12px;
    border-bottom: 1px solid var(--line)
}

.subject-row {
    padding: 13px 0;
    border-bottom: 1px solid #edf0f4
}

.subject-row strong {
    font-size: 14px
}

.tip {
    background: var(--warm);
    border-radius: 10px;
    padding: 10px 12px;
    color: #8a5c16;
    font-size: 13px
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 60px
}

.form-actions .primary-button:last-child {
    margin-left: auto
}

.result-section {
    margin: 42px 0 70px
}

.result-header {
    background: linear-gradient(135deg, #172d59, #246bfe);
    color: #fff;
    border-radius: 24px;
    padding: 34px clamp(22px, 5vw, 48px);
    box-shadow: 0 15px 35px rgba(25, 70, 153, .22)
}

.result-header .eyebrow {
    color: #bcd0ff
}

.result-header h2 {
    margin-top: 9px
}

.result-header p {
    margin-bottom: 0;
    color: #e2ebff;
    font-size: 16px
}

.result-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    margin: 16px 0
}

.result-block h3 {
    margin: 0 0 12px;
    font-size: 20px
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.tag {
    background: var(--soft);
    color: #2458b7;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700
}

.result-block ol, .result-block ul {
    padding-left: 23px;
    margin: 8px 0
}

.result-block li {
    margin: 5px 0
}

.fit-table {
    width: 100%;
    border-collapse: collapse
}

.fit-table th, .fit-table td {
    text-align: left;
    padding: 11px 9px;
    border-bottom: 1px solid #edf0f4;
    font-size: 14px
}

.fit-table th {
    color: var(--muted);
    font-size: 12px
}

.result-actions {
    display: none!important;
    gap: 12px;
    margin: 24px 0
}

.disclaimer {
    color: var(--muted);
    font-size: 12px
}

.error {
    border-color: #e35d6a !important;
    background: #fff7f7 !important
}

.error-message {
    color: #c93446;
    font-size: 13px;
    margin: 7px 0 0
}

/* ============================================
   移动端优化样式
   ============================================ */
@media (max-width: 700px) {
    /* 容器优化 */
    .container {
        width: 100%;
        padding: 0 16px;
    }

    /* 顶部栏优化 */
    .site-header {
        height: 56px;
    }

    .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    /* Hero卡片优化 */
    .hero-card {
        margin-top: 16px;
        margin-bottom: 20px;
        padding: 28px 20px;
        border-radius: 20px;
    }

    .hero-card h1 {
        font-size: 28px;
        line-height: 1.3;
        margin: 10px 0;
    }

    .hero-card p {
        font-size: 15px;
        line-height: 1.6;
    }

    .hero-meta {
        font-size: 13px;
        gap: 12px;
        margin: 20px 0 24px;
    }

    /* 按钮优化 - 更大的触摸区域 */
    .primary-button, .secondary-button {
        padding: 14px 24px;
        font-size: 16px;
        border-radius: 14px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 进度条优化 */
    .progress-wrap {
        margin: 20px 0 18px;
    }

    .progress-track {
        height: 12px;
    }

    .progress-label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* 区块标题优化 */
    .section-kicker {
        font-size: 10px;
        padding: 8px 16px;
        margin-bottom: 10px;
    }

    .form-section h2 {
        font-size: 26px;
        margin: 6px 0 10px;
    }

    .section-desc {
        font-size: 15px;
        margin: 0 0 24px;
    }

    /* 问题卡片优化 */
    .question-card {
        padding: 20px 16px;
        margin: 12px 0;
        border-radius: 16px;
    }

    .question-card h3 {
        font-size: 16px;
        margin: 0 0 16px;
        line-height: 1.4;
    }

    .question-card h3 small {
        display: block;
        margin-top: 4px;
        margin-left: 0;
    }

    /* 选择网格优化 - 单列显示 */
    .choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .choice-grid label, .radio-list label {
        padding: 14px 12px;
        font-size: 15px;
        min-height: 48px;
    }

    .choice-grid input, .radio-list input {
        width: 20px;
        height: 20px;
    }

    /* 方向网格优化 */
    .direction-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .direction-grid label {
        padding: 16px;
    }

    /* 基本信息表单优化 */
    .basic-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .basic-grid label {
        font-size: 14px;
    }

    .basic-grid input, .basic-grid select {
        padding: 13px 12px;
        font-size: 16px; /* 防止iOS自动缩放 */
        border-radius: 12px;
        min-height: 48px;
    }

    /* 文本域优化 */
    textarea {
        padding: 14px 12px;
        font-size: 16px; /* 防止iOS自动缩放 */
        border-radius: 12px;
        min-height: 120px;
    }

    /* 学科评估优化 */
    .subject-evaluation {
        gap: 20px;
    }

    .eval-item {
        padding: 16px;
        border-radius: 12px;
    }

    .eval-item > label {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .rating-group {
        flex-direction: column;
        gap: 8px;
    }

    .rating-group label {
        min-width: 100%;
        justify-content: flex-start;
        padding: 14px 12px;
        font-size: 15px;
        border-width: 2px;
    }

    .rating-group input[type="radio"] {
        width: 20px;
        height: 20px;
    }

    /* 范围行优化 */
    .range-row {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .range-row span {
        font-size: 13px;
    }

    output {
        font-size: 16px;
        min-width: 32px;
    }

    /* 学科网格优化 */
    .subject-grid {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .subject-head, .subject-row {
        min-width: 500px;
        gap: 8px;
        grid-template-columns: 100px repeat(3, minmax(80px, 1fr));
    }

    .subject-head {
        font-size: 11px;
    }

    .subject-row strong {
        font-size: 13px;
    }

    /* 底部操作栏优化 - 固定在底部 */
    .form-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, 
            rgba(246, 248, 252, 0.98) 0%, 
            rgba(246, 248, 252, 0.95) 70%, 
            rgba(246, 248, 252, 0.9) 100%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 12px 16px 16px;
        margin: 0;
        gap: 10px;
        z-index: 100;
        box-shadow: 0 -4px 24px rgba(23, 32, 51, 0.08);
        border-top: 1px solid rgba(223, 229, 238, 0.8);
    }

    /* 为底部固定按钮留出空间 - 增加padding避免遮挡 */
    .form-section {
        padding-bottom: 100px !important;
    }
    
    /* 最后一个问题卡片额外增加下边距 */
    .form-section .question-card:last-child {
        margin-bottom: 20px;
    }

    .form-actions .primary-button,
    .form-actions .secondary-button {
        flex: 1;
        margin: 0;
    }

    /* 报告区域优化 */
    .result-section {
        margin: 20px 0 40px;
    }

    .result-header {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .result-header .eyebrow {
        font-size: 10px;
    }

    .result-header h2 {
        font-size: 24px;
        margin-top: 8px;
    }

    .result-header p {
        font-size: 14px;
    }

    .result-block {
        padding: 20px 16px;
        margin: 12px 0;
        border-radius: 16px;
    }

    .result-block h3 {
        font-size: 18px;
    }

    .result-block h4 {
        font-size: 16px;
    }
    
    /* ===== AI报告移动端优化 ===== */
    
    /* 一级标题 (# 章节标题) */
    .result-block h1 {
        font-size: 20px !important;
        font-weight: 700;
        color: #1a1a1a;
        margin: 28px 0 16px;
        padding-bottom: 8px;
        border-bottom: 2px solid #e5e7eb;
        line-height: 1.4;
    }
    
    /* 二级标题 (## 小节标题) */
    .result-block h2 {
        font-size: 18px !important;
        font-weight: 600;
        color: #2c3e50;
        margin: 24px 0 12px;
        line-height: 1.4;
    }
    
    /* 三级标题 (### 组合推荐等) */
    .result-block h3 {
        font-size: 17px !important;
        font-weight: 600;
        color: #34495e;
        margin: 20px 0 10px;
        line-height: 1.4;
    }
    
    /* 四级标题 (#### 推荐理由等) */
    .result-block h4 {
        font-size: 16px !important;
        font-weight: 600;
        color: #4a5568;
        margin: 16px 0 8px;
        line-height: 1.4;
    }
    
    /* 段落文本 */
    .result-block p {
        font-size: 15px !important;
        line-height: 1.75;
        color: #333;
        margin: 12px 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* 无序列表 */
    .result-block ul {
        padding-left: 20px;
        margin: 12px 0;
    }
    
    .result-block ul li {
        font-size: 15px !important;
        line-height: 1.7;
        margin: 8px 0;
        color: #333;
        list-style-type: disc;
    }
    
    /* 有序列表 */
    .result-block ol {
        padding-left: 20px;
        margin: 12px 0;
    }
    
    .result-block ol li {
        font-size: 15px !important;
        line-height: 1.7;
        margin: 8px 0;
        color: #333;
    }
    
    /* 嵌套列表 */
    .result-block li ul,
    .result-block li ol {
        margin-top: 6px;
        margin-bottom: 6px;
    }
    
    /* 表格优化 */
    .result-block table {
        width: 100%;
        border-collapse: collapse;
        margin: 16px 0;
        font-size: 14px !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .result-block table thead {
        background: #f7fafc;
    }
    
    .result-block table th {
        padding: 10px 8px !important;
        text-align: left;
        font-weight: 600;
        color: #4a5568;
        border-bottom: 2px solid #e2e8f0;
        font-size: 13px !important;
        white-space: nowrap;
    }
    
    .result-block table td {
        padding: 10px 8px !important;
        border-bottom: 1px solid #e2e8f0;
        color: #333;
        font-size: 14px !important;
    }
    
    .result-block table tr:last-child td {
        border-bottom: none;
    }
    
    /* 加粗文本 */
    .result-block strong {
        font-weight: 600;
        color: #1a202c;
    }
    
    /* 行内代码 */
    .result-block code {
        background: #f7fafc;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 14px;
        color: #e53e3e;
        font-family: 'Courier New', monospace;
    }
    
    /* 引用块 */
    .result-block blockquote {
        border-left: 3px solid #3182ce;
        background: #ebf8ff;
        padding: 12px 16px;
        margin: 16px 0;
        font-size: 15px;
        line-height: 1.7;
        color: #2c5282;
        border-radius: 4px;
    }
    
    /* 水平分割线 */
    .result-block hr {
        border: none;
        border-top: 1px solid #e2e8f0;
        margin: 24px 0;
    }
    
    /* 星级评分优化 */
    .result-block p:has(⭐) {
        font-size: 16px !important;
        font-weight: 500;
    }

    /* AI报告内容优化 */
    .ai-report-content {
        padding: 16px;
        font-size: 15px;
    }

    .ai-report-content h1 {
        font-size: 22px;
        margin-top: 24px;
        padding-bottom: 10px;
    }

    .ai-report-content h2 {
        font-size: 20px;
        margin-top: 28px;
    }

    .ai-report-content h3 {
        font-size: 18px;
        margin-top: 24px;
    }

    .ai-report-content h4 {
        font-size: 16px;
    }

    .ai-report-content p {
        margin: 14px 0;
        line-height: 1.75;
    }

    .ai-report-content ul,
    .ai-report-content ol {
        padding-left: 20px;
    }

    .ai-report-content li {
        margin: 8px 0;
        line-height: 1.7;
    }

    .ai-report-content table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }

    .ai-report-content table th,
    .ai-report-content table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .ai-report-content .disclaimer-section {
        margin-top: 28px;
        padding-top: 20px;
    }

    .ai-report-content .disclaimer-section strong {
        font-size: 14px;
    }

    .ai-report-content .disclaimer-section p {
        font-size: 12.5px;
        line-height: 1.7;
    }

    /* Loading界面优化 */
    .loading-content {
        padding: 24px 20px;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 24px;
    }

    .loading-content h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .loading-content > p {
        font-size: 15px;
    }

    .loading-tips {
        margin-top: 32px;
        padding-top: 24px;
    }

    .loading-tips .tip {
        font-size: 14px;
    }

    /* 提示文字优化 */
    .hint {
        font-size: 13px;
        line-height: 1.5;
    }

    .tip {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 12px;
    }

    /* 标签列表优化 */
    .tag-list {
        gap: 8px;
    }

    .tag {
        padding: 6px 14px;
        font-size: 14px;
    }

    /* Modal优化 */
    .modal-content {
        padding: 24px 20px;
        width: calc(100% - 32px);
        max-height: 85vh;
        border-radius: 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .close-button {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }

    .config-form select,
    .config-form input {
        padding: 13px 12px;
        font-size: 16px;
        min-height: 48px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-actions button {
        width: 100%;
        min-height: 48px;
    }

    /* 滚动优化 */
    .question-card:last-child {
        margin-bottom: 20px;
    }
}

/* 小屏幕额外优化 */
@media (max-width: 400px) {
    .hero-card {
        padding: 24px 16px;
    }

    .hero-card h1 {
        font-size: 24px;
    }

    .form-section h2 {
        font-size: 22px;
    }
    
    /* 增加底部空间避免按钮遮挡 */
    .form-section {
        padding-bottom: 110px !important;
    }

    .question-card {
        padding: 16px 12px;
    }
    
    .question-card:last-child {
        margin-bottom: 24px;
    }

    .rating-group label {
        font-size: 14px;
        padding: 12px 10px;
    }

    .primary-button, .secondary-button {
        font-size: 15px;
        padding: 12px 20px;
    }
    
    /* 固定按钮栏增加padding */
    .form-actions {
        padding: 14px 12px 18px;
    }
    
    /* AI报告小屏幕优化 */
    .result-block {
        padding: 16px 12px;
        margin: 10px 0;
    }
    
    .result-block h1 {
        font-size: 18px !important;
        margin: 20px 0 12px;
    }
    
    .result-block h2 {
        font-size: 17px !important;
        margin: 18px 0 10px;
    }
    
    .result-block h3 {
        font-size: 16px !important;
        margin: 16px 0 8px;
    }
    
    .result-block h4 {
        font-size: 15px !important;
        margin: 14px 0 6px;
    }
    
    .result-block p,
    .result-block li {
        font-size: 14px !important;
        line-height: 1.7;
    }
    
    .result-block table {
        font-size: 13px !important;
    }
    
    .result-block table th,
    .result-block table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    
    .result-block ul,
    .result-block ol {
        padding-left: 18px;
    }
}

@media print {
    .site-header, .hero-card, .form-actions, .progress-wrap, .result-actions {
        display: none !important
    }

    .container {
        width: 100%
    }

    .result-section {
        margin: 0
    }

    .result-header {
        box-shadow: none;
        color: #000;
        background: #fff;
        border: 2px solid #246bfe
    }

    .result-header p {
        color: #333
    }

    .result-block {
        break-inside: avoid
    }
}

.basic-grid {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 14px
}

.basic-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--muted);
    font-size: 13px
}

.basic-grid label span {
    white-space: nowrap
}

.basic-grid label small {
    white-space: nowrap
}

.basic-grid input, .basic-grid select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px 11px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px
}

.basic-grid input:focus, .basic-grid select:focus {
    outline: 2px solid #c8d8ff;
    border-color: var(--primary)
}

.success-tag {
    background: #eaf8f2;
    color: #107c5d
}

.muted {
    color: var(--muted)
}

.strength-list {
    margin-top: 13px
}

.result-block h4 {
    margin: 22px 0 8px;
    font-size: 16px
}

@media (max-width: 700px) {
    .basic-grid {
        grid-template-columns:1fr
    }
}


/* AI 功能相关样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.close-button {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.2s;
}

.close-button:hover {
    color: #333;
}

.modal-desc {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

.config-form label {
    display: block;
    margin-bottom: 20px;
    font-weight: 500;
    color: #333;
}

.config-form select,
.config-form input {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.config-form select:focus,
.config-form input:focus {
    outline: none;
    border-color: #1F4E79;
}

.hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #999;
    font-weight: normal;
}

.api-help {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin-top: 16px;
}

.api-help p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.api-help ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.api-help li {
    margin: 6px 0;
    font-size: 14px;
    color: #666;
}

.api-help a {
    color: #1F4E79;
    text-decoration: none;
    border-bottom: 1px solid #1F4E79;
}

.api-help a:hover {
    color: #0B2545;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

.ai-result-content {
    line-height: 1.8;
    color: #333;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    margin: 20px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.ai-result-content h1,
.ai-result-content h2,
.ai-result-content h3 {
    color: #1F4E79;
    margin-top: 24px;
    margin-bottom: 12px;
}

.ai-result-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #1F4E79;
    padding-bottom: 8px;
}

.ai-result-content h2 {
    font-size: 20px;
}

.ai-result-content h3 {
    font-size: 18px;
}

.ai-result-content ul,
.ai-result-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.ai-result-content li {
    margin: 8px 0;
}

.ai-result-content p {
    margin: 12px 0;
}

.ai-result-content strong {
    color: #0B2545;
}

.ai-result-content code {
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.ai-result-content pre {
    background: #2d2d2d;
    color: #f8f8f8;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
}

.ai-result-content blockquote {
    border-left: 4px solid #1F4E79;
    padding-left: 16px;
    margin: 16px 0;
    color: #666;
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式优化 */
@media (max-width: 700px) {
    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .modal-large {
        max-width: 95%;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}


/* Loading 界面样式 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 40px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-content h2 {
    font-size: 28px;
    margin: 0 0 16px 0;
    font-weight: 600;
    color: white;
}

.loading-content > p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px 0;
}

.loading-tips {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-tips .tip {
    font-size: 15px;
    /*color: rgba(255, 255, 255, 0.95);*/
    margin: 12px 0;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI 报告内容样式 */
.ai-report-content {
    line-height: 1.8;
    color: #333;
    padding: 20px;
    background: white;
}

.ai-report-content h1,
.ai-report-content h2,
.ai-report-content h3 {
    color: #1F4E79;
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.ai-report-content h1 {
    font-size: 28px;
    border-bottom: 3px solid #1F4E79;
    padding-bottom: 12px;
    margin-top: 0;
}

.ai-report-content h2 {
    font-size: 24px;
    border-bottom: 2px solid #EAF2F8;
    padding-bottom: 10px;
}

.ai-report-content h3 {
    font-size: 20px;
}

.ai-report-content h4 {
    font-size: 18px;
    color: #0B2545;
    margin-top: 20px;
    margin-bottom: 12px;
}

.ai-report-content p {
    margin: 16px 0;
    line-height: 1.8;
}

.ai-report-content ul,
.ai-report-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.ai-report-content li {
    margin: 10px 0;
    line-height: 1.7;
}

.ai-report-content strong {
    color: #0B2545;
    font-weight: 600;
}

.ai-report-content em {
    color: #1F4E79;
    font-style: italic;
}

.ai-report-content blockquote {
    border-left: 4px solid #1F4E79;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
    background: #F8F9FA;
    padding: 16px 20px;
    border-radius: 4px;
}

.ai-report-content code {
    background: #F8F9FA;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #0B2545;
    font-family: 'Courier New', monospace;
}

.ai-report-content pre {
    background: #2d2d2d;
    color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.ai-report-content pre code {
    background: none;
    padding: 0;
    color: #f8f8f8;
}

.ai-report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-report-content table th {
    background: #1F4E79;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.ai-report-content table td {
    padding: 12px;
    border-bottom: 1px solid #EAF2F8;
}

.ai-report-content table tr:hover {
    background: #F8F9FA;
}

.ai-report-content hr {
    border: none;
    border-top: 2px solid #EAF2F8;
    margin: 32px 0;
}

/* 重要声明样式 */
.ai-report-content .disclaimer-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #E0E0E0;
}

.ai-report-content .disclaimer-section strong {
    display: block;
    font-size: 16px;
    color: #0B2545;
    margin-bottom: 12px;
    font-weight: 600;
}

.ai-report-content .disclaimer-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0;
}

/* 响应式优化 */
@media (max-width: 700px) {
    .loading-content {
        padding: 20px;
    }

    .loading-content h2 {
        font-size: 22px;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
    }

    .ai-report-content {
        padding: 16px;
    }

    .ai-report-content h1 {
        font-size: 24px;
    }

    .ai-report-content h2 {
        font-size: 20px;
    }

    .ai-report-content h3 {
        font-size: 18px;
    }

    .ai-report-content .disclaimer-section {
        margin-top: 32px;
        padding-top: 24px;
    }

    .ai-report-content .disclaimer-section strong {
        font-size: 15px;
    }

    .ai-report-content .disclaimer-section p {
        font-size: 13px;
    }
}

/* 强制必填标记不换行 */
.question-card h3 small[style*="color: #e53935"] {
    display: inline !important;
    white-space: nowrap !important;
    margin-left: 4px;
}

.basic-grid label small[style*="color: #e53935"] {
    display: inline !important;
    white-space: nowrap !important;
    margin-left: 4px;
}

/* ============================================
   学科评估专用样式 - 优化版
   ============================================ */
.subject-evaluation {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.eval-item {
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
    border: 1px solid #e8eef7;
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
}

.eval-item:hover {
    border-color: #c8d8ff;
    box-shadow: 0 4px 16px rgba(36, 107, 254, 0.08);
    transform: translateY(-2px);
}

.eval-item > label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #172033;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eef7;
}

.rating-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-group label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    border: 2px solid #e8eef7;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #667085;
    font-weight: 500;
    text-align: center;
}

.rating-group label:hover {
    border-color: #a9c2ff;
    background: #fbfdff;
    transform: translateY(-1px);
}

.rating-group input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.rating-group input[type="radio"]:checked + * {
    /* 用于选中状态的样式 */
}

.rating-group label:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef4ff 0%, #fbfdff 100%);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(36, 107, 254, 0.15);
}

/* 评分等级颜色标识 */
.rating-group label:has(input[value="5"]) {
    border-color: #dcf5e8;
}

.rating-group label:has(input[value="5"]):hover,
.rating-group label:has(input[value="5"]:checked) {
    border-color: #107c5d;
    background: linear-gradient(135deg, #eaf8f2 0%, #ffffff 100%);
    color: #107c5d;
}

.rating-group label:has(input[value="4"]) {
    border-color: #e3f2fd;
}

.rating-group label:has(input[value="4"]):hover,
.rating-group label:has(input[value="4"]:checked) {
    border-color: #2196f3;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    color: #1976d2;
}

.rating-group label:has(input[value="3"]) {
    border-color: #fff3e0;
}

.rating-group label:has(input[value="3"]):hover,
.rating-group label:has(input[value="3"]:checked) {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
    color: #f57c00;
}

.rating-group label:has(input[value="2"]) {
    border-color: #fce4ec;
}

.rating-group label:has(input[value="2"]):hover,
.rating-group label:has(input[value="2"]:checked) {
    border-color: #e91e63;
    background: linear-gradient(135deg, #fce4ec 0%, #ffffff 100%);
    color: #c2185b;
}

.rating-group label:has(input[value="1"]) {
    border-color: #ffebee;
}

.rating-group label:has(input[value="1"]):hover,
.rating-group label:has(input[value="1"]:checked) {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
    color: #d32f2f;
}

/* 学科卡片标题图标优化 */
.question-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #172033;
}

/* 移动端响应式优化 */
@media (max-width: 700px) {
    .rating-group {
        flex-direction: column;
        gap: 8px;
    }

    .rating-group label {
        min-width: 100%;
        justify-content: flex-start;
        padding: 14px 12px;
    }

    .eval-item {
        padding: 16px;
    }

    .subject-evaluation {
        gap: 20px;
    }
}

/* 打分文字简化显示（移动端） */
@media (max-width: 500px) {
    .rating-group label {
        font-size: 13px;
        padding: 12px 8px;
    }
}

/* 学科图标动效 */
.question-card h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), #6f9cff);
    border-radius: 3px;
    margin-right: 4px;
}

/* 评估项标签美化 */
.eval-item > label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 渐变分隔线 */
.form-section .question-card:not(:last-child) {
    position: relative;
}

.form-section .question-card:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e8eef7, transparent);
}

/* 优化提示文字样式 */
.hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* 优化输入框焦点效果 */
.basic-grid input:focus,
.basic-grid select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.1);
}

textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    resize: vertical;
    transition: all 0.2s;
}

textarea:hover {
    border-color: #a9c2ff;
}

/* 优化选择框组 */
.choice-grid label {
    transition: all 0.2s ease;
}

.choice-grid input:checked + * {
    /* 占位符 */
}

.choice-grid label:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef4ff 0%, #fbfdff 100%);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(36, 107, 254, 0.12);
}

.radio-list label:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef4ff 0%, #fbfdff 100%);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(36, 107, 254, 0.12);
}

/* 美化按钮组 */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    /*margin: 32px 0 60px;*/
    padding-top: 24px;
    border-top: 2px solid var(--line);
}

.primary-button,
.secondary-button {
    position: relative;
    overflow: hidden;
}

.primary-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.primary-button:hover::before {
    width: 300px;
    height: 300px;
}

.secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 优化进度条 */
.progress-track {
    height: 10px;
    background: linear-gradient(90deg, #f0f4ff, #e6ebf3);
    border-radius: 100px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #246bfe, #6f9cff, #246bfe);
    background-size: 200% 100%;
    animation: progressShimmer 2s infinite;
    border-radius: 100px;
    box-shadow: 0 2px 8px rgba(36, 107, 254, 0.3);
    transition: width 0.4s ease;
}

@keyframes progressShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 优化区块标题 */
.section-kicker {
    display: inline-block;
    background: linear-gradient(135deg, #eef4ff, #f8faff);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
    border: 1px solid #d4e3ff;
}

.form-section h2 {
    font-size: 36px;
    line-height: 1.2;
    margin: 8px 0 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #172033, #246bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    color: var(--muted);
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.6;
}

/* 优化卡片阴影 */
.question-card {
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 8px 28px rgba(23, 32, 51, 0.08);
    transform: translateY(-2px);
}
