/* ============================================
   Home Credit 风险分析项目展示网站 — 样式表
   设计原则：专业、简洁、金融风
   ============================================ */

/* CSS 变量 */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2744;
    --accent: #f6ad55;
    --accent-light: #fbd38d;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --info: #3182ce;
    --bg: #f7fafc;
    --bg-alt: #edf2f7;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
}

/* 重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   布局
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.logo svg {
    flex-shrink: 0;
}

.subtitle {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
}

.nav-list {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.nav-list li {
    margin-bottom: 2px;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.nav-link.active {
    background: rgba(26, 54, 93, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.github-link:hover {
    color: var(--primary);
}

/* ============================================
   移动端菜单
   ============================================ */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 90;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 80px 40px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        radial-gradient(circle at 20% 50%, white 1px, transparent 1px),
        radial-gradient(circle at 80% 50%, white 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-desc {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.stat-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 24px 16px;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-value.highlight {
    color: var(--accent-light);
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag {
    padding: 6px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: var(--accent-light);
}

.hero-author {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 16px;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.hero-author .author-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
    margin: 12px auto 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(8px); }
    60% { transform: rotate(45deg) translateY(4px); }
}

/* ============================================
   Section 通用
   ============================================ */
.section {
    padding: 80px 40px;
}

.section-alt {
    background: var(--bg-alt);
}

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

.section-header {
    margin-bottom: 48px;
}

.section-num {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(26, 54, 93, 0.08);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 400;
}

.section-intro {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.8;
}

/* ============================================
   Card
   ============================================ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
}

.highlight-card {
    background: linear-gradient(135deg, rgba(26,54,93,0.04) 0%, rgba(49,130,206,0.04) 100%);
    border-color: rgba(26,54,93,0.15);
}

.highlight-card p {
    color: var(--text);
}

.image-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.image-card img {
    width: 100%;
    border-radius: var(--radius-sm);
    display: block;
}

/* 图片网格布局 */
.image-grid {
    display: grid;
    gap: 24px;
    margin-top: 16px;
}

.image-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.image-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .image-grid.two-col,
    .image-grid.three-col {
        grid-template-columns: 1fr;
    }
}

.full-width-image img {
    max-height: 500px;
    object-fit: contain;
    object-position: center;
}

.caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* ============================================
   Grid
   ============================================ */
.content-grid {
    display: grid;
    gap: 24px;
}

.content-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.mt-05 { margin-top: 8px; }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 24px; }
.mb-1 { margin-bottom: 16px; }
.text-light { color: var(--text-light); }

/* ============================================
   表格
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead {
    background: var(--primary);
    color: #fff;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
}

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

.data-table tbody tr:hover {
    background: rgba(26, 54, 93, 0.02);
}

.model-table .best-row {
    background: rgba(246, 173, 85, 0.08);
}

.model-table .best-row td {
    font-weight: 600;
}

.highlight-cell {
    color: var(--success);
    font-weight: 700;
}

/* Expand/collapse button for cross-combination table */
.expand-btn {
    display: inline-block;
    padding: 6px 18px;
    margin: 4px 0;
    background: var(--bg);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.expand-btn:hover {
    background: var(--primary);
    color: #fff;
}
.expand-toggle-row td {
    text-align: center;
    padding: 10px 16px;
    border-bottom: none;
}
.weakest-row {
    background: rgba(229, 62, 62, 0.04);
}
.weakest-row td {
    color: var(--text-light);
}

/* ============================================
   Alert
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.7;
}

.alert-info {
    background: rgba(49, 130, 206, 0.08);
    border-left: 4px solid var(--info);
    color: var(--text);
}

.alert-warning {
    background: rgba(214, 158, 46, 0.08);
    border-left: 4px solid var(--warning);
    color: var(--text);
}

.alert-success {
    background: rgba(56, 161, 105, 0.08);
    border-left: 4px solid var(--success);
    color: var(--text);
}

/* ============================================
   List
   ============================================ */
.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-light);
    line-height: 1.7;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    background: rgba(56, 161, 105, 0.12);
    color: var(--success);
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============================================
   Feature List
   ============================================ */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.feature-rank {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.feature-info p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.7;
}

.feature-categories {
    list-style: none;
}

.feature-categories li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.cat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.cat-1 { background: var(--danger); }
.cat-2 { background: var(--info); }
.cat-3 { background: var(--warning); }
.cat-4 { background: var(--success); }

/* ============================================
   Feature Grid (Feature Engineering)
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 4px;
}
.feature-count {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(26, 54, 93, 0.06);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature-card ul {
    list-style: none;
}

.feature-card ul li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

.feature-card ul li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
}

/* ============================================
   Score Stats
   ============================================ */
.score-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.score-range {
    font-weight: 600;
    font-size: 0.9rem;
}

.score-range.low { color: var(--danger); }
.score-range.mid { color: var(--warning); }
.score-range.high { color: var(--success); }

.score-risk {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.formula-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.95rem;
    color: var(--primary);
    text-align: center;
    margin: 16px 0;
    letter-spacing: 0.5px;
}

/* ============================================
   Model Cards
   ============================================ */
.model-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.model-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.model-card.best-model {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm);
}

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

.model-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.model-badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--bg-alt);
    color: var(--text-light);
}

.model-badge.best {
    background: var(--accent);
    color: var(--primary-dark);
}

.model-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.7;
}

.model-pros {
    list-style: none;
}

.model-pros li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.6;
}

.model-pros li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 0.75rem;
}

/* ============================================
   Top Features (IV)
   ============================================ */
.top-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.top-rank {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.top-name {
    flex: 1;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    color: var(--text);
}

.top-iv {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--success);
}

/* ============================================
   Mini Stats
   ============================================ */
.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.mini-stat {
    text-align: center;
}

.mini-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.mini-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ============================================
   Roadmap
   ============================================ */
.roadmap {
    position: relative;
    padding-left: 24px;
}

.roadmap::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.roadmap-item {
    position: relative;
    padding-bottom: 24px;
}

.roadmap-item:last-child {
    padding-bottom: 0;
}

.roadmap-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--card-bg);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
}

.roadmap-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.roadmap-content p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   Sub-heading
   ============================================ */
.sub-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 12px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.6);
    padding: 48px 40px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.footer-desc {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-light);
}

.divider {
    color: rgba(255,255,255,0.3);
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .content-grid.two-col,
    .feature-grid,
    .model-cards {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 24px 60px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 48px 20px;
    }

    .card {
        padding: 20px;
    }

    .model-cards {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 32px 20px;
    }

    .feature-item {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px 10px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .table-wrapper {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* ============================================
   打印优化
   ============================================ */
@media print {
    .sidebar,
    .menu-toggle,
    .scroll-hint {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .section {
        padding: 30px 20px;
        page-break-inside: avoid;
    }

    .hero {
        min-height: auto;
        padding: 40px 20px;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   Lightbox 图片放大查看器
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 39, 68, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 40px 20px;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: white;
}

.lightbox-caption {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-align: center;
    max-width: 600px;
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1001;
}

.lightbox-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary-dark);
    transform: rotate(90deg);
}

.lightbox-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    pointer-events: none;
}

/* 图片卡片指针样式 */
.image-card img {
    cursor: zoom-in;
}

/* 禁止背景滚动 */
body.lightbox-open {
    overflow: hidden;
}
