/* ==================== 全国高考志愿填报系统 - 样式表 ==================== */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #0d9488;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366f1;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ==================== 头部导航 ==================== */
.header {
    background: linear-gradient(135deg, #1a73e8 0%, #6366f1 100%);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(26,115,232,0.3);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.logo-icon {
    font-size: 32px;
}

.logo-sub {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
}

/* ==================== 导航标签 ==================== */
.nav-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 4px;
    flex: 1 1 560px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav-tab {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
    border: none;
    background: transparent;
    white-space: nowrap;
}

.nav-tab:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.nav-tab.active {
    color: var(--primary);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==================== 主内容区 ==================== */
.main-content {
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
}

.page { display: none; }
.page.active { display: block; }

.hero-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== 卡片组件 ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-lg); }

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== 智能推荐页 ==================== */
.recommend-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

/* checkbox多选组 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 8px 0;
}
.checkbox-group .ck {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    transition: all 0.15s;
    user-select: none;
}
.checkbox-group .ck:hover {
    border-color: var(--primary);
    background: rgba(79,70,229,0.04);
}
.checkbox-group .ck input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--primary);
    padding: 0;
    border: none;
}
.checkbox-group .ck:has(input:checked) {
    border-color: var(--primary);
    background: rgba(79,70,229,0.08);
    color: var(--primary);
    font-weight: 600;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

/* ==================== 推荐结果 ==================== */
.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.summary-item {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
}

.summary-item.chong { background: #fef3c7; }
.summary-item.wen { background: #d1fae5; }
.summary-item.bao { background: #dbeafe; }

.summary-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.summary-item.chong .summary-number { color: #d97706; }
.summary-item.wen .summary-number { color: #059669; }
.summary-item.bao .summary-number { color: #2563eb; }

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.uni-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.uni-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.uni-card.chong { border-left: 4px solid #f59e0b; }
.uni-card.wen { border-left: 4px solid #10b981; }
.uni-card.bao { border-left: 4px solid #3b82f6; }

.uni-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    min-width: 48px;
    text-align: center;
}

.badge-chong { background: #fef3c7; color: #92400e; }
.badge-wen { background: #d1fae5; color: #065f46; }
.badge-bao { background: #dbeafe; color: #1e40af; }

.uni-info h3 {
    font-size: 17px;
    margin-bottom: 4px;
}

.uni-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tag {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #f3f4f6;
    color: var(--text-secondary);
}

.tag.tag-985 { background: #fef3c7; color: #92400e; }
.tag.tag-211 { background: #dbeafe; color: #1e40af; }
.tag.tag-first { background: #d1fae5; color: #065f46; }
.tag.tag-industry { background: #fce7f3; color: #9d174d; margin: 1px 2px; font-size: 11px; }
.tag.tag-career { background: #ede9fe; color: #5b21b6; margin: 1px 2px; font-size: 11px; }

.uni-score {
    text-align: right;
    min-width: 120px;
}

.score-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.score-diff {
    font-size: 13px;
    color: var(--text-secondary);
}

.probability {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-top: 4px;
}

.prob-high { background: #d1fae5; color: #065f46; }
.prob-mid { background: #fef3c7; color: #92400e; }
.prob-low { background: #fee2e2; color: #991b1b; }

/* ==================== 院校查询 ==================== */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid var(--border);
    background: white;
    transition: all 0.2s;
}

.chip:hover, .chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

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

.uni-table th {
    background: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.uni-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.uni-table tr:hover td {
    background: #f9fafb;
}

.uni-table .plan-major-cell {
    min-width: 360px;
    max-width: 620px;
    white-space: normal;
    line-height: 1.6;
}

.uni-table .plan-note-cell {
    min-width: 160px;
    white-space: normal;
}

/* ==================== 专业分析 ==================== */
.major-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.major-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
}

.major-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.major-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.major-name {
    font-size: 17px;
    font-weight: 600;
}

.major-category {
    font-size: 12px;
    color: var(--text-secondary);
}

.demand-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.demand-high { background: #d1fae5; color: #065f46; }
.demand-mid { background: #fef3c7; color: #92400e; }
.demand-low { background: #fee2e2; color: #991b1b; }

.major-salary {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
}

.major-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0;
    line-height: 1.5;
}

.major-recommendation {
    background: #f0fdf4;
    border-left: 3px solid var(--success);
    padding: 10px 14px;
    margin-top: 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px;
    line-height: 1.6;
}

.major-warning {
    background: #fef2f2;
    border-left: 3px solid var(--danger);
    padding: 10px 14px;
    margin-top: 8px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px;
    color: #991b1b;
}

/* ==================== 专业详情页 ==================== */
.major-card-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-size: 12px;
    color: var(--primary);
    text-align: right;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.major-card:hover .major-card-footer { opacity: 1; }

.major-detail-tab-content { display: none; }
.major-detail-tab-content.active { display: block; }

.major-course-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.major-course-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    transition: all 0.2s;
}
.major-course-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.major-practice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.major-practice-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--bg-secondary);
}
.major-practice-list li:last-child { border-bottom: none; }
.major-practice-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    font-size: 13px;
}

.career-path-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.career-path-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.career-path-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}
.career-path-flow {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    line-height: 1.6;
}
.career-path-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.career-path-row {
    display: flex;
    align-items: center;
    font-size: 13px;
    gap: 8px;
}
.career-label {
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 90px;
}
.career-value {
    color: var(--text);
    font-weight: 500;
}

.zhang-comment-box {
    margin-top: 24px;
    border: 2px solid #fbbf24;
    border-radius: var(--radius);
    overflow: hidden;
}
.zhang-comment-header {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 18px;
}
.zhang-comment-body {
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
    background: #fffbeb;
}

/* ==================== AI咨询 ==================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #1a73e8, #6366f1);
    color: white;
}

.message.user .message-avatar {
    background: #f3f4f6;
}

.message-content {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.message.assistant .message-content {
    background: #f3f4f6;
    border-bottom-left-radius: 4px;
}

.message.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: white;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    resize: none;
    max-height: 120px;
}

.chat-input:focus {
    border-color: var(--primary);
}

.send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.quick-questions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
}

.quick-q {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-q:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* ==================== 分数线查询 ==================== */
.score-table-wrap {
    overflow-x: auto;
}

/* ==================== 加载动画 ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 8px;
    color: var(--text-secondary);
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    .logo {
        flex: 1 1 150px;
        min-width: 0;
        gap: 6px;
        font-size: 16px;
        line-height: 1.2;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 24px;
        font-size: 20px;
        line-height: 1;
    }

    .logo-sub {
        display: none;
    }

    .nav-tabs {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        overflow-x: auto;
        padding: 3px;
        gap: 3px;
        border-radius: 8px;
    }

    .nav-tab {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .user-area {
        margin-left: 0;
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: 100%;
    }

    .user-area button,
    .user-area .btn-auth-outline,
    .user-area .btn-auth-fill,
    .user-area .btn-help,
    .user-area .btn-pay,
    .user-area .btn-logout {
        padding: 4px 8px !important;
        font-size: 12px !important;
        line-height: 1.2;
    }

    #paid-indicator,
    .user-badge,
    #user-name {
        font-size: 11px !important;
    }

    .hero-section {
        padding: 20px 14px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero-desc {
        font-size: 13px;
    }

    .stats-banner {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2px;
        margin-bottom: 4px;
    }

    .stat-item {
        padding: 2px 2px;
        border-radius: 6px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }

    .stat-number {
        font-size: 10px;
        line-height: 1;
    }

    .stat-label {
        font-size: 7px;
        line-height: 1;
        margin-top: 0;
        transform: scale(0.92);
        transform-origin: center top;
    }

    .card {
        padding: 14px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    .card-title {
        font-size: 16px;
        line-height: 1.35;
    }

    .main-content {
        padding: 0 12px;
        margin: 12px auto;
    }

    .recommend-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-group {
        min-width: 0;
        gap: 5px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .search-input,
    .score-filter-bar input,
    .score-filter-bar select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto;
        padding: 9px 10px !important;
        font-size: 14px !important;
        box-sizing: border-box;
    }

    #career-desc,
    #rec-major-input,
    #rec-city-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .btn-select-major,
    .btn-select-city {
        width: 100%;
        justify-content: center;
        padding: 9px 10px;
        font-size: 13px;
    }

    .checkbox-group {
        gap: 5px;
        padding: 4px 0;
    }

    .checkbox-group .ck {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        justify-content: flex-start;
        padding: 4px 6px;
        font-size: 12px;
        line-height: 1.25;
        border-radius: 12px;
    }

    .multi-select-tags {
        gap: 4px;
    }

    .multi-select-tag {
        max-width: 100%;
        font-size: 12px;
        padding: 3px 7px;
    }

    .score-filter-bar {
        gap: 8px;
    }

    .score-filter-bar > * {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .hero-actions .btn,
    .recommend-form .btn {
        width: 100%;
    }

    .uni-card {
        grid-template-columns: 1fr;
    }

    .uni-score {
        text-align: left;
    }

    .major-grid {
        grid-template-columns: 1fr;
    }

    .message {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 6px 8px;
        gap: 6px;
    }

    .logo {
        font-size: 15px;
    }

    .logo-icon {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
        font-size: 18px;
    }

    .user-area {
        order: 2;
        flex: 1 0 100%;
        justify-content: center;
    }

    .nav-tabs {
        order: 3;
    }

    .nav-tab {
        padding: 5px 8px;
        font-size: 11px;
    }

    .hero-section {
        padding: 16px 10px;
    }

    .hero-title {
        font-size: 20px;
    }

    .stats-banner {
        gap: 2px;
        margin-bottom: 4px;
    }

    .stat-item {
        padding: 2px 1px;
        border-radius: 5px;
    }

    .stat-number {
        font-size: 9px;
    }

    .stat-label {
        font-size: 7px;
        transform: scale(0.88);
        transform-origin: center top;
    }

    .checkbox-group .ck {
        flex-basis: 100%;
    }
}

/* ==================== 统计banner ==================== */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #1a73e8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== 分数查询结果页 ==================== */
.score-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hero-section {
    background: linear-gradient(135deg, rgba(26,115,232,0.05), rgba(99,102,241,0.05));
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* typing */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typing 1.4s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ==================== 院校详情弹窗 ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}
.modal-overlay:has(.fullscreen) {
    padding: 0;
    align-items: stretch;
}
.modal-overlay.show { display: flex; }

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 900px;
    padding: 32px;
    position: relative;
    animation: modalIn 0.25s ease;
    resize: both;
    overflow: auto;
    min-width: 360px;
    min-height: 300px;
    transition: all 0.25s ease;
}
.modal-content.fullscreen {
    max-width: 100% !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0;
    border-radius: 0;
    resize: none;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-toolbar {
    position: absolute;
    top: 12px; right: 16px;
    display: flex; gap: 8px; align-items: center; z-index: 10;
}
.modal-close {
    background: none; border: none;
    font-size: 28px; color: var(--text-secondary);
    cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.modal-btn-maximize {
    background: none; border: none;
    font-size: 22px; color: var(--text-secondary);
    cursor: pointer; line-height: 1; padding: 0;
}
.modal-btn-maximize:hover { color: var(--primary); }

.detail-header { margin-bottom: 24px; }
.detail-header h2 { font-size: 24px; margin-bottom: 8px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-meta { font-size: 14px; color: var(--text-secondary); }

.detail-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.detail-section:last-child { border-bottom: none; }
.detail-section h3 {
    font-size: 16px; margin-bottom: 10px; color: var(--primary-dark);
}
.detail-section p { font-size: 14px; color: var(--text); line-height: 1.7; }
.detail-tag-list { display: flex; gap: 6px; flex-wrap: wrap; }

.detail-stats {
    display: flex; gap: 24px; flex-wrap: wrap;
}
.detail-stat-item { text-align: center; }
.detail-stat-item .stat-num {
    font-size: 28px; font-weight: 700; color: var(--primary);
}
.detail-stat-item .stat-lbl {
    font-size: 13px; color: var(--text-secondary);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.plan-prov { color: var(--text); }
.plan-num { font-weight: 600; color: var(--primary); }

/* ==================== 院校详情标签页 ==================== */
.detail-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin: 16px 0 20px;
}
.detail-tab {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.detail-tab:hover { color: var(--primary); }
.detail-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.detail-tab-content { display: none; }
.detail-tab-content.active { display: block; }

/* 专业分数线对比表 */
.major-score-table th { white-space: nowrap; font-size: 13px; }
.major-score-table td { font-size: 13px; }

/* 专业趋势卡片 */
.major-trend-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.major-trend-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.major-trend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.major-trend-card.hot {
    border-color: #fca5a5;
    background: #fff5f5;
}
.major-trend-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}
.major-trend-scores {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.major-trend-year {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.major-trend-year .year-label {
    font-size: 11px;
    color: var(--text-secondary);
}
.major-trend-year .year-score {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}
.major-trend-year .year-plan {
    font-size: 11px;
    color: var(--text-secondary);
}
.major-trend-summary {
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

/* ==================== 上海中考模块样式 ==================== */
.zk-tier { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; vertical-align: middle; margin-left: 4px; }
.zk-tier-top { background: linear-gradient(135deg, #ff6b35, #f7c948); color: #fff; }
.zk-tier-elite { background: linear-gradient(135deg, #6366f1, #818cf8); color: #fff; }
.zk-tier-normal { background: #e5e7eb; color: #374151; }
.zk-policy-tips { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.zk-tip { font-size: 13px; color: #92400e; line-height: 1.8; }

/* ==================== 用户认证模块 ==================== */
.user-area { display: flex; align-items: center; gap: 8px; margin-left: 16px; flex-shrink: 0; }
.btn-login { padding: 6px 16px; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: #fff; border-radius: 20px; cursor: pointer; font-size: 13px; transition: all .2s; }
.btn-login:hover { background: rgba(255,255,255,0.15); }
.btn-register { padding: 6px 16px; border: none; background: #fff; color: var(--primary); border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .2s; }
.btn-register:hover { background: #f0f7ff; }
.user-logged { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; }
.user-badge { padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.user-badge.badge-free { background: #6b7280; color: #fff; }
.user-badge.badge-registered { background: #10b981; color: #fff; }
.user-badge.badge-vip { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.user-name { font-weight: 500; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout { padding: 4px 12px; border: 1px solid rgba(255,255,255,0.4); background: transparent; color: rgba(255,255,255,0.9); border-radius: 16px; cursor: pointer; font-size: 12px; }
.btn-logout:hover { background: rgba(255,255,255,0.1); }

/* 弹窗 */
#auth-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.auth-modal { background: #fff; border-radius: var(--radius); width: 400px; max-width: 90vw; padding: 32px; position: relative; box-shadow: var(--shadow-lg); animation: fadeInUp .25s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
#auth-modal .modal-close { position: absolute; top: 12px; right: 16px; border: none; background: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; line-height: 1; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.auth-tab { flex: 1; padding: 10px; border: none; background: none; font-size: 15px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form .form-group { margin-bottom: 16px; }
.auth-form .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.auth-form .form-group input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; transition: border-color .2s; }
.auth-form .form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.auth-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.btn-primary { padding: 10px 24px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-full { width: 100%; }
.auth-tip { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.auth-tip a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* 等级说明 */
.auth-levels { margin-top: 20px; padding: 16px; background: #f8fafc; border-radius: var(--radius-sm); }
.auth-levels h4 { font-size: 13px; margin-bottom: 10px; }
.level-row { font-size: 12px; color: var(--text-secondary); line-height: 2; display: flex; align-items: center; gap: 8px; }
.level-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.level-badge.free { background: #e5e7eb; color: #6b7280; }
.level-badge.reg { background: #d1fae5; color: #059669; }
.level-badge.vip { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }

/* 权限提示条 */
.role-banner { padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; }
.role-banner.free { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.role-banner.registered { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.role-banner.vip { background: linear-gradient(135deg, #fef3c7, #fce7f3); color: #92400e; border: 1px solid #fbbf24; }
.role-banner .btn-sm { padding: 4px 14px; border-radius: 16px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; }
.role-banner .btn-sm.btn-upgrade { background: var(--primary); color: #fff; }
/* 登录/注册 */
.btn-auth-outline {
    padding: 5px 14px;
    border: 1.5px solid var(--primary);
    border-radius: 6px;
    background: #fff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-auth-outline:hover { background: var(--primary); color: #fff; }
.btn-auth-fill {
    padding: 5px 14px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-auth-fill:hover { background: var(--primary-dark); }
.user-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.user-badge.badge-free { background: #e5e7eb; color: #6b7280; }
.user-badge.badge-registered { background: #d1fae5; color: #059669; }
.user-badge.badge-vip { background: linear-gradient(135deg, #fef3c7, #fce7f3); color: #b45309; }

/* 认证弹窗 */
.auth-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 400px;
    width: 92%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.2s ease;
}
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* 自动补全下拉 */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    z-index: 1500;
    background: #fff;
    border: 2px solid var(--primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.autocomplete-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}
.autocomplete-item:hover { background: var(--primary-light); color: var(--primary); }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item .ac-sub { font-size: 11px; color: #999; margin-left: 6px; }

/* ==================== 表单内嵌展开面板（专业/城市选择） ==================== */
.btn-select-major, .btn-select-city {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    transition: all 0.2s;
}
.btn-select-major:hover, .btn-select-city:hover {
    background: var(--primary);
    color: #fff;
}

.picker-dropdown {
    margin-top: 8px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-height: 400px;
    display: flex;
    flex-direction: column;
}
.picker-dropdown-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: 320px;
    background: #fafbfc;
}
.picker-dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: #f8f9fa;
    font-size: 13px;
    color: var(--text-secondary);
}
.picker-dropdown-footer .btn-sm {
    padding: 6px 20px;
    font-size: 13px;
}

/* 下拉面板内的专业分类样式 */
.picker-category {
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.picker-category.collapsed .picker-cat-body { display: none; }
.picker-cat-title {
    padding: 8px 14px;
    background: var(--primary-light);
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-dark);
    cursor: pointer;
    user-select: none;
}
.picker-cat-body {
    padding: 8px 12px;
}
.picker-sub-title {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin: 8px 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.picker-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.picker-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.picker-item:hover { border-color: var(--primary); background: #f0f5ff; }
.picker-item.checked {
    border-color: var(--primary);
    background: rgba(26,115,232,0.08);
    color: var(--primary);
    font-weight: 600;
}
.picker-item input[type="checkbox"] {
    width: 13px; height: 13px;
    accent-color: var(--primary);
    margin: 0;
}

/* 已选标签 */
.multi-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 24px;
}
.multi-select-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #93c5fd;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
}
.tag-remove {
    cursor: pointer;
    font-size: 13px;
    opacity: 0.5;
    font-weight: 700;
}
.tag-remove:hover { opacity: 1; color: var(--danger); }

/* 省份→城市层级（内嵌下拉面板） */
.picker-province {
    margin-bottom: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.picker-province.has-selection { border-color: var(--primary); }
.picker-province-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    user-select: none;
}
.picker-province-title:hover { background: #e8f0fe; }
.province-arrow { font-size: 10px; color: var(--text-secondary); }
.picker-province-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 12px;
    background: #fff;
}
.picker-city-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.picker-city-item:hover { border-color: var(--primary); background: #f0f5ff; }
.picker-city-item.checked {
    border-color: var(--primary);
    background: rgba(26,115,232,0.08);
    color: var(--primary);
    font-weight: 600;
}
.picker-city-item input[type="checkbox"] {
    width: 12px; height: 12px;
    accent-color: var(--primary);
    margin: 0;
}

/* ==================== 移动端最终覆盖：顶部统计卡片压缩 ====================
   注意：基础统计样式在前面的移动端规则之后定义，所以这里放在文件末尾兜底覆盖。 */
@media (max-width: 768px) {
    .stats-banner {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 2px !important;
        margin-bottom: 4px !important;
    }

    .stat-item {
        padding: 2px 2px !important;
        border-radius: 6px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    }

    .stat-number {
        font-size: 10px !important;
        line-height: 1 !important;
    }

    .stat-label {
        font-size: 7px !important;
        line-height: 1 !important;
        margin-top: 0 !important;
        transform: scale(0.9);
        transform-origin: center top;
    }
}

@media (max-width: 480px) {
    .stats-banner {
        gap: 2px !important;
        margin-bottom: 3px !important;
    }

    .stat-item {
        padding: 1px 1px !important;
        border-radius: 5px !important;
    }

    .stat-number {
        font-size: 9px !important;
    }

    .stat-label {
        font-size: 7px !important;
        transform: scale(0.85);
        transform-origin: center top;
    }
}

/* ==================== 移动端最终覆盖：推荐页文字与卡片缩小约1/3 ====================
   只作用于手机端，PC端保持原效果。 */
@media (max-width: 768px) {
    #page-recommend .hero-section {
        padding: 12px 8px !important;
        margin-bottom: 10px !important;
    }

    #page-recommend .hero-title {
        font-size: 16px !important;
        margin-bottom: 4px !important;
        line-height: 1.25 !important;
    }

    #page-recommend .hero-desc,
    #page-recommend .hero-section div[style*="数据说明"] {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    #page-recommend .hero-actions {
        margin-top: 8px !important;
        gap: 6px !important;
    }

    #page-recommend .hero-actions .btn,
    #page-recommend button,
    #page-recommend .btn-select-major,
    #page-recommend .btn-select-city {
        font-size: 11px !important;
        padding: 7px 8px !important;
        border-radius: 7px !important;
        line-height: 1.25 !important;
    }

    #page-recommend .card {
        padding: 10px !important;
        margin-bottom: 10px !important;
        border-radius: 9px !important;
    }

    #page-recommend .card-title {
        font-size: 13px !important;
        line-height: 1.35 !important;
        margin-bottom: 8px !important;
    }

    #page-recommend .card-title span,
    #page-recommend .card div[style*="font-size:13px"],
    #page-recommend .card span[style*="font-size:12px"] {
        font-size: 10px !important;
        line-height: 1.35 !important;
    }

    #page-recommend .recommend-form {
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    #page-recommend .form-group {
        gap: 4px !important;
    }

    #page-recommend .form-group label {
        font-size: 11px !important;
        line-height: 1.25 !important;
    }

    #page-recommend .form-group input,
    #page-recommend .form-group select,
    #page-recommend #career-desc,
    #page-recommend #rec-major-input,
    #page-recommend #rec-city-input {
        font-size: 12px !important;
        padding: 7px 8px !important;
        border-radius: 7px !important;
        line-height: 1.25 !important;
    }

    #page-recommend .checkbox-group .ck,
    #page-recommend .multi-select-tag {
        font-size: 10px !important;
        padding: 3px 6px !important;
        border-radius: 10px !important;
        line-height: 1.2 !important;
    }

    #page-recommend .checkbox-group .ck input[type="checkbox"] {
        width: 11px !important;
        height: 11px !important;
    }
}

@media (max-width: 480px) {
    #page-recommend .hero-title {
        font-size: 15px !important;
    }

    #page-recommend .card-title {
        font-size: 12px !important;
    }

    #page-recommend .form-group input,
    #page-recommend .form-group select,
    #page-recommend #career-desc,
    #page-recommend #rec-major-input,
    #page-recommend #rec-city-input {
        font-size: 11px !important;
        padding: 6px 7px !important;
    }
}
