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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* 标题 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 数据状态 */
.data-status {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.data-status.success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.data-status.info {
    background: rgba(99, 102, 241, 0.9);
    color: white;
}

.data-status.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.card h2 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* 专业类型选择 */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-card:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.radio-card input {
    display: none;
}

.radio-card input:checked + .radio-title {
    color: var(--primary);
}

.radio-card input:checked ~ .radio-desc {
    color: var(--primary);
}

.radio-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.radio-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.radio-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

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

.form-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 公式框 */
.formula-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.formula-box strong {
    color: var(--primary);
}

/* 成绩输入网格 */
.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.score-item {
    display: flex;
    flex-direction: column;
}

.score-item label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.score-item input {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.score-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* 满分徽章 */
.满分-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: normal;
}

/* 公式卡片 */
.formula-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.formula-card h3 {
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.formula-detail {
    padding: 10px 0;
}

.formula-detail p {
    margin: 8px 0;
    font-size: 1rem;
}

.formula-detail strong {
    font-size: 1.2rem;
}

.score-note {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* 预测按钮 */
.predict-btn {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.predict-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

.predict-btn:active {
    transform: translateY(0);
}

/* 结果卡片 */
.results-card {
    animation: slideUp 0.4s ease;
}

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

/* 匹配统计 */
.match-stats {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-item {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.stat-item strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* 结果表格 */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.results-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
}

.results-table th:first-child {
    border-radius: 10px 0 0 10px;
}

.results-table th:last-child {
    border-radius: 0 10px 10px 0;
}

.results-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

.results-table tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.results-table tr:last-child td {
    border-bottom: none;
}

/* 匹配徽章 */
.match-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.match-best {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.match-best .match-badge {
    background: #10b981;
    color: white;
}

.match-high {
    background: rgba(59, 130, 246, 0.1);
}

.match-high .match-badge {
    background: #3b82f6;
    color: white;
}

.match-medium {
    background: rgba(139, 92, 246, 0.1);
}

.match-medium .match-badge {
    background: #8b5cf6;
    color: white;
}

.match-low {
    background: rgba(107, 114, 128, 0.1);
}

.match-low .match-badge {
    background: #9ca3af;
    color: white;
}

/* 差值样式 */
.diff-positive {
    color: #10b981;
    font-weight: 600;
}

.diff-negative {
    color: #ef4444;
    font-weight: 600;
}

/* 无数据 */
.no-data-cell {
    text-align: center;
    padding: 50px 20px !important;
    color: var(--text-secondary);
}

.no-data-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.no-data-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.toast-success {
    background: #10b981;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

.toast-icon {
    font-size: 1.2rem;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 16px;
    }
    
    .score-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .results-table {
        font-size: 0.85rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }
}
/* 专业方向选择 */
.direction-select {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.select-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.select-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.select-group select,
.select-group input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-group select:focus,
.select-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.direction-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--primary);
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 8px;
}

.direction-hint:empty {
    display: none;
}

/* 补充标记样式 */
.match-supplement {
    background: rgba(245, 158, 11, 0.08) !important;
}

.match-supplement .match-badge {
    background: #f59e0b;
    color: white;
}

/* LLM 筛查功能 */
.llm-review-section {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
}

.llm-review-section h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--primary);
}

.llm-hint {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.llm-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.llm-input-row textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.9rem;
    resize: none;
    min-height: 60px;
}

.llm-input-row textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

.llm-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.llm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.llm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.llm-loading {
    margin-top: 12px;
    padding: 12px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
}

.llm-error {
    margin-top: 12px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.9rem;
}

.llm-review-info {
    margin-top: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

@media (max-width: 600px) {
    .llm-input-row {
        flex-direction: column;
    }
    .llm-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 统考成绩输入区域 - 与百分制输入保持一致 */
.total-input-wrapper {
    margin-top: 16px;
}

.total-input-wrapper .total-title {
    display: none;
}

.total-input-wrapper .score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* 音乐表演/教育切换提示 */
.total-mode-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.total-mode-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.total-mode-badge.performance {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.total-mode-badge.education {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
}

/* 副项输入区域 - 统考模式 */
.total-sub-wrapper {
    margin-top: 16px;
}

/* 分项输入区域的样式 */
.score-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
}

.toggle-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.toggle-label span {
    font-size: 0.95rem;
    color: rgba(209, 6, 6, 0.85);
}

.toggle-label input:checked + span {
    color: rgb(225, 11, 11);
    font-weight: 600;
}

.toggle-label input:checked {
    background: #667eea;
}

/* 年份切换标签样式 */
.year-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.year-tab {
    padding: 6px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.year-tab:hover {
    border-color: var(--primary, #6366f1);
    color: var(--primary, #6366f1);
}

.year-tab.active {
    background: var(--primary, #6366f1);
    color: white;
    border-color: var(--primary, #6366f1);
}

/* 结果标题年份标签 */
.year-label {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* 结果标题样式 */
.results-header {
    margin-bottom: 16px;
}

.results-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}
