/* 寻踪陆陇其 - 主样式文件 */

:root {
    /* 古典怀旧色调 - 宣纸、墨色、朱砂 */
    --ink-black: #1a1a1a;
    --ink-gray: #4a4a4a;
    --paper-cream: #f5f0e8;
    --paper-aged: #e8e0d0;
    --paper-dark: #d4c8b8;
    --accent-teal: #2d5a5a;
    --accent-burgundy: #8b3a3a;
    --accent-gold: #b8860b;
    --cinnabar: #c41e3a;
    --ink-wash: rgba(26, 26, 26, 0.03);
    --shadow-soft: 0 4px 20px rgba(26, 26, 26, 0.08);
    --shadow-card: 0 2px 12px rgba(26, 26, 26, 0.06);
    --border-classical: 1px solid var(--paper-dark);
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: #f5f0e6;
    color: var(--ink-black);
    line-height: 1.8;
    min-height: 100vh;
    background-image: url('../../橙汁视觉 中式古籍内页素材 (10).jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* 头部样式 */
.header {
    background: 
        linear-gradient(180deg, rgba(245, 240, 230, 0.92) 0%, rgba(235, 225, 210, 0.88) 100%),
        url('../../橙汁视觉 中式古籍内页素材 (10).jpg');
    background-size: cover;
    background-position: center top;
    color: #2c241b;
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    border-bottom: 4px double #a08060;
    box-shadow: 
        0 2px 10px rgba(44, 36, 27, 0.1),
        inset 0 -10px 30px rgba(44, 36, 27, 0.05);
    overflow: hidden;
}

.header-bg-calligraphy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 80%;
    background: url('../../lujiashu.png') center/contain no-repeat;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

.header::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 5%;
    right: 5%;
    height: calc(100% - 30px);
    border: 1px solid rgba(160, 128, 96, 0.3);
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
}

.header::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(5% + 5px);
    right: calc(5% + 5px);
    height: calc(100% - 40px);
    border: 1px solid rgba(160, 128, 96, 0.2);
    border-radius: 1px;
    pointer-events: none;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
}

.header h1 {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    margin-bottom: 1rem;
    color: #1a1a1a;
    position: relative;
    display: inline-block;
    padding: 0 2rem;
}

.header h1::before,
.header h1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #a08060, transparent);
}

.header h1::before { left: -20px; }
.header h1::after { right: -20px; }

.header-decoration {
    font-size: 1.5rem;
    color: #a08060;
    letter-spacing: 0.5em;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.header .subtitle {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    margin-top: 1rem;
    color: #5a4a3a;
    font-weight: 500;
}

.header .source {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    margin-top: 2rem;
    font-style: italic;
    letter-spacing: 0.08em;
    color: #7a6a5a;
}

/* 容器和布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: linear-gradient(145deg, #faf8f3 0%, #f0ebe0 100%);
    border-radius: 2px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 2px 8px rgba(26, 26, 26, 0.08);
    transition: all 0.3s ease;
    border: var(--border-classical);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--cinnabar);
    border-radius: 3px;
    opacity: 0.3;
    background: 
        linear-gradient(45deg, transparent 48%, var(--cinnabar) 48%, var(--cinnabar) 52%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, var(--cinnabar) 48%, var(--cinnabar) 52%, transparent 52%);
    background-size: 8px 8px;
    background-position: center;
    background-repeat: no-repeat;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--accent-gold);
    border-left: 2px solid var(--accent-gold);
    opacity: 0.4;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 6px 20px rgba(26, 26, 26, 0.12);
}

.stat-card .number {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--accent-teal);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
}

.stat-card.highlight .number { color: var(--cinnabar); }

.stat-card .label {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
    font-size: 1rem;
    color: var(--ink-gray);
    margin-top: 0.75rem;
    letter-spacing: 0.1em;
}

/* 图表和表格卡片 */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.chart-card, .table-card, .map-wrapper {
    background: linear-gradient(145deg, #faf8f3 0%, #f0ebe0 100%);
    border-radius: 2px;
    padding: 1.75rem;
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 2px 8px rgba(26, 26, 26, 0.08);
    border: var(--border-classical);
    margin-bottom: 2.5rem;
    position: relative;
}

.chart-card::before, .table-card::before, .map-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-gold) 10%, 
        var(--accent-gold) 90%, 
        transparent 100%
    );
    opacity: 0.5;
}

.chart-card h3, .table-card h3, .map-wrapper h3 {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink-black);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--accent-gold);
    letter-spacing: 0.12em;
    position: relative;
    display: inline-block;
}

.chart-card h3::after, .table-card h3::after, .map-wrapper h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

.table-card h3 { border-bottom-color: var(--cinnabar); }
.table-card h3::after { background: var(--cinnabar); }

.chart-container {
    position: relative;
    height: 300px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-row { grid-template-columns: 1fr; }
    .family-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .header h1 { font-size: 1.8rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
}

/* 动画 */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
