/**
 * 高考志愿辅助系统 - 自定义样式
 */

/* 基础样式 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0 !important;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.625rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem 0.75rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* 匹配度标签 */
.match-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.match-safe {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.match-stable {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.match-chase {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.match-risk {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

/* 类别卡片 */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

/* 统计数字 */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

/* 分页样式 */
.pagination {
    gap: 4px;
}

.page-link {
    border-radius: 8px;
    border: none;
    padding: 0.5rem 0.875rem;
    color: #475569;
}

.page-link:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: #94a3b8;
    background-color: transparent;
}

/* Toast提示 */
.toast-container {
    z-index: 9999;
}

/* 模态框 */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

/* 加载动画 */
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 空状态 */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 搜索高亮 */
.search-highlight {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 打印样式 */
@media print {
    .navbar, .sidebar, .btn, .pagination {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
