:root {
    --color-red: #8B2323;
    --color-red-light: #A63434;
    --color-red-dark: #6B1A1A;
    --color-vermilion: #C41E3A;
    --color-vermilion-deep: #9B1B30;
    --color-ink: #2D3748;
    --color-ink-light: #4A5568;
    --color-ink-wash: #718096;
    --color-gold: #C9A86C;
    --color-gold-light: #E0C992;
    --color-gold-dark: #A68B4B;
    --color-brocade-gold: #D4AF37;
    --color-ochre: #B8860B;
    --color-bamboo: #556B2F;
    --color-bamboo-light: #768B4A;
    --color-dai-qing: #3A4A5C;
    --color-grey-stone: #8B8682;
    --color-porcelain: #F5F3EF;
    --bg-paper: #FAF8F3;
    --bg-paper-dark: #F2EEE5;
    --bg-rice-paper: #F8F6F0;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 48px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --border-ink: 1px solid rgba(45, 55, 72, 0.1);
    --border-red: 1px solid rgba(139, 35, 35, 0.2);
    --border-gold: 1px solid rgba(201, 168, 108, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Serif SC", "Source Han Serif SC", "SimSun", "STSong", "FangSong", serif;
    background-color: var(--bg-rice-paper);
    color: var(--color-ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 35, 35, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 168, 108, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Noto Serif SC", "Source Han Serif SC", "SimSun", "STSong", "FangSong", serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.05em;
}

p, span, div, a, li {
    font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

button {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 248, 243, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent, var(--color-red), var(--color-gold), var(--color-red), transparent) 1;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 35, 35, 0.08);
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 35, 35, 0.1) 10%, 
        rgba(201, 168, 108, 0.2) 50%, 
        rgba(139, 35, 35, 0.1) 90%, 
        transparent 100%);
}

/* 中国传统装饰元素 */
.section-title {
    position: relative;
}

.section-title::before,
.section-title::after {
    content: '❋';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gold);
    font-size: 1.2rem;
    margin: 0 1rem;
}

.section-title::before {
    left: calc(50% - 80px);
}

.section-title::after {
    right: calc(50% - 80px);
}

/* 卡片中国风边框 */
.category-card,
.building-card,
.content-module {
    position: relative;
}

.category-card::before,
.building-card::before,
.content-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-red), var(--color-gold), var(--color-red));
}

/* 按钮中国风 */
button,
.btn,
a[class*="btn"] {
    position: relative;
    overflow: hidden;
}

button::after,
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::after,
.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* 页脚中国风 */
footer {
    background: linear-gradient(180deg, var(--bg-paper-dark) 0%, #E8E2D5 100%);
    border-top: 3px solid;
    border-image: linear-gradient(90deg, transparent, var(--color-red), var(--color-gold), var(--color-red), transparent) 1;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6'%3E%3Cpath d='M0 0 L100 0 L95 3 L90 0 L85 3 L80 0 L75 3 L70 0 L65 3 L60 0 L55 3 L50 0 L45 3 L40 0 L35 3 L30 0 L25 3 L20 0 L15 3 L10 0 L5 3 Z' fill='%238B232320'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 100px 6px;
}

/* 中国传统分隔线 */
.divider-chinese {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider-chinese::before,
.divider-chinese::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.divider-chinese::before {
    background: linear-gradient(90deg, transparent, var(--color-gold));
}

.divider-chinese::after {
    background: linear-gradient(90deg, var(--color-gold), transparent);
}

/* 中国传统边框样式 */
.chinese-border {
    border: 2px solid var(--color-red);
    border-radius: var(--radius-sm);
    position: relative;
}

.chinese-border::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid var(--color-gold);
    border-radius: calc(var(--radius-sm) + 2px);
    z-index: -1;
}

/* 中国传统印章效果 */
.seal {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--color-red);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0 var(--color-red-dark);
    transform: rotate(-2deg);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-red);
    text-decoration: none;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🏛️';
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
}

.nav-links a {
    color: var(--color-gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-red);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-red);
}

.nav-links a:hover::after {
    width: 100%;
}

.search-box {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.search-box input {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(139, 35, 35, 0.15);
    border-radius: var(--radius-md);
    background: rgba(250, 248, 243, 0.8);
    width: 200px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(139, 35, 35, 0.08);
    background: white;
}

.search-box button {
    padding: 0.6rem 1.2rem;
    background: var(--color-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
}

.search-box button:hover {
    background: var(--color-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 35, 35, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-gray);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(139, 35, 35, 0.1);
}

.mobile-menu {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-top: 1px solid rgba(139, 35, 35, 0.1);
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    margin-bottom: 0.6rem;
}

.mobile-menu li:last-child {
    margin-bottom: 0;
}

.mobile-menu a {
    color: var(--color-gray);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(201, 168, 108, 0.1);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--color-red);
    padding-left: 0.5rem;
}

.mobile-menu .mobile-search {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(201, 168, 108, 0.2);
}

.mobile-menu .mobile-search .search-box {
    display: flex;
    gap: 0.5rem;
}

.mobile-menu .mobile-search input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(139, 35, 35, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.mobile-menu .mobile-search button {
    padding: 0.7rem 1.2rem;
    background: var(--color-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

/* Hero区域 */
.hero {
    height: 24vh;
    background: linear-gradient(135deg, var(--bg-paper) 0%, var(--bg-paper-dark) 60%, #F0EDE3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><path d="M0 100 Q100 60 200 100 T400 100" stroke="%238B232310" fill="none" stroke-width="3"/><path d="M0 120 Q100 80 200 120 T400 120" stroke="%23C9A86C15" fill="none" stroke-width="2"/></svg>');
    background-size: cover;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--color-red);
    margin-bottom: 0.8rem;
    letter-spacing: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(139, 35, 35, 0.1);
}

.hero p {
    font-size: 1.2rem;
    color: var(--color-gray);
    letter-spacing: 6px;
    font-weight: 400;
}

/* 轮播图 */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 2rem;
    max-width: 800px;
}

.carousel-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: 12px;
    font-weight: 700;
    text-shadow: 2px 4px 12px rgba(0,0,0,0.6);
}

.carousel-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    letter-spacing: 4px;
    text-shadow: 1px 2px 8px rgba(0,0,0,0.5);
}

.carousel-btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--color-red);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 35, 35, 0.5);
}

.carousel-btn:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 35, 35, 0.6);
}

.carousel-btn-prev,
.carousel-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.carousel-btn-prev:hover,
.carousel-btn-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 30px;
}

.carousel-btn-next {
    right: 30px;
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.carousel-dots .dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* 通用容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--color-red);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 4px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    border-radius: 2px;
}

/* 栏目入口 */
.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(201, 168, 108, 0.1);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 35, 35, 0.2);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-red);
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 1.3rem;
    color: var(--color-gray-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--color-gray-light);
    line-height: 1.6;
}

/* 建筑卡片 */
.building-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.building-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    border: 1px solid rgba(201, 168, 108, 0.1);
}

.building-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.building-card.top-featured {
    border: 2px solid rgba(139, 35, 35, 0.3);
}

.building-card.top-featured::before {
    content: '精选';
    position: absolute;
    top: 15px;
    right: -35px;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
    color: white;
    padding: 4px 40px;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(139, 35, 35, 0.3);
    z-index: 10;
}

.building-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.building-card:hover .building-image {
    transform: scale(1.05);
}

.building-info {
    padding: 1.4rem;
}

.building-info h3 {
    font-size: 1.25rem;
    color: var(--color-red);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.building-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--color-gray-light);
    margin-bottom: 1rem;
}

.building-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-paper);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 108, 0.15);
}

.building-description {
    line-height: 1.7;
    color: var(--color-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.building-features {
    background: linear-gradient(to right, rgba(201, 168, 108, 0.08), rgba(139, 35, 35, 0.04));
    padding: 0.8rem;
    border-left: 3px solid var(--color-gold);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    border-radius: 0 6px 6px 0;
}

.building-features strong {
    color: var(--color-red);
    font-weight: 500;
}

.building-cultural {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(201, 168, 108, 0.3);
    font-size: 0.8rem;
    color: var(--color-bamboo);
}

/* 筛选器 */
.filter-section {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(201, 168, 108, 0.1);
}

.filter-title {
    font-size: 1.1rem;
    color: var(--color-red);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(201, 168, 108, 0.3);
    font-weight: 600;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.7rem 1rem;
    border: 1px solid rgba(139, 35, 35, 0.15);
    border-radius: var(--radius-md);
    background: var(--bg-paper);
    min-width: 140px;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(139, 35, 35, 0.08);
    background: white;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.8rem;
    background: var(--color-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--color-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 35, 35, 0.3);
}

.filter-reset {
    padding: 0.7rem 1.5rem;
    color: var(--color-gray);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.filter-reset:hover {
    color: var(--color-red);
    background: rgba(139, 35, 35, 0.05);
}

/* 数据统计 */
.stats-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><path d="M0 100 Q100 60 200 100 T400 100" stroke="%23ffffff10" fill="none" stroke-width="3"/><path d="M0 120 Q100 80 200 120 T400 120" stroke="%23ffffff10" fill="none" stroke-width="2"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    color: white;
    flex: 1;
    padding: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-gold-light);
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    letter-spacing: 3px;
    font-weight: 400;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.4), transparent);
}

/* 文化速览网格 */
.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* 时间轴 */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-red), var(--color-gold));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--color-red);
    border-radius: 50%;
    top: 0;
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(139, 35, 35, 0.2);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
}

.timeline-content {
    background: white;
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(201, 168, 108, 0.1);
}

.timeline-content h3 {
    color: var(--color-red);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-era {
    color: var(--color-gold);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* 内容模块 */
.content-module {
    background: white;
    margin-bottom: 1.5rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-red);
}

.content-module h3 {
    color: var(--color-red);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.content-module p {
    line-height: 1.8;
    color: var(--color-gray);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a {
    background: white;
    color: var(--color-gray);
    border: 1px solid rgba(201, 168, 108, 0.3);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--color-red);
    color: white;
    border-color: var(--color-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 35, 35, 0.3);
}

.pagination span {
    background: var(--color-red);
    color: white;
    border: 1px solid var(--color-red);
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 3px solid var(--color-gold);
}

footer .footer-content {
    max-width: 800px;
    margin: 0 auto;
}

footer .footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 4px;
    margin-bottom: 1.2rem;
}

footer .footer-slogan {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

footer .footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.3rem 0;
    position: relative;
    transition: color 0.3s ease;
}

footer .footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

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

footer .footer-links a:hover::after {
    width: 100%;
}

footer .footer-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    margin: 1.5rem auto;
}

footer .footer-copyright {
    color: #666;
    font-size: 0.8rem;
}

footer .footer-admin {
    margin-top: 1rem;
}

footer .footer-admin a {
    color: #555;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer .footer-admin a:hover {
    color: var(--color-gold);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(201, 168, 108, 0.15);
}

.tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, var(--bg-paper) 0%, var(--bg-paper-dark) 100%);
    color: var(--color-gray);
    border: 1px solid rgba(201, 168, 108, 0.3);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background: var(--color-red);
    color: white;
    border-color: var(--color-red);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(139, 35, 35, 0.3);
}

.tag-lg {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    color: white;
    border-color: var(--color-red);
}

.tag-lg:hover {
    background: var(--color-red-dark);
    transform: translateY(-5px) scale(1.05);
}

.tag-md {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.6rem 1.4rem;
}

.tag-sm {
    font-size: 0.9rem;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 16px rgba(139, 35, 35, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

#backToTop:hover {
    background: var(--color-red-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 35, 35, 0.5);
}

/* 建筑体系页面样式 */
.structure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.structure-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 108, 0.1);
}

.structure-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-red);
}

.structure-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.structure-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(201, 168, 108, 0.2);
}

.structure-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--color-red);
}

.structure-card p {
    color: var(--color-gray);
    line-height: 1.6;
}

/* 屋顶等级对比 */
.roof-comparison {
    max-width: 900px;
    margin: 0 auto;
}

.roof-chart {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.roof-chart-header {
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.roof-chart-body {
    padding: 1rem;
}

.roof-row {
    display: grid;
    grid-template-columns: 120px 100px 1fr 150px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(201, 168, 108, 0.1);
    align-items: center;
    transition: background 0.3s ease;
}

.roof-row:last-child {
    border-bottom: none;
}

.roof-row:hover {
    background: rgba(201, 168, 108, 0.05);
}

.roof-name {
    font-weight: 600;
    color: var(--color-red);
    font-size: 1.1rem;
}

.level-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.level-最高 {
    background: var(--color-red);
    color: white;
}

.level-高 {
    background: var(--color-gold);
    color: white;
}

.level-中 {
    background: var(--color-bamboo);
    color: white;
}

.level-低 {
    background: var(--color-gray-light);
    color: white;
}

.roof-desc {
    color: var(--color-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

.roof-example {
    color: var(--color-gray-light);
    font-size: 0.85rem;
}

/* 斗拱部分 */
.dougong-section {
    max-width: 1000px;
    margin: 0 auto;
}

.dougong-intro {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-red);
}

.dougong-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-gray-dark);
}

.dougong-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dougong-type-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.dougong-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-gold);
}

.dougong-visual {
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.5rem;
}

.dougong-type-card h3 {
    font-size: 1.2rem;
    color: var(--color-red);
    margin-bottom: 0.8rem;
}

.dougong-type-card p {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.dougong-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-info h4 {
    color: var(--color-red);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.feature-info p {
    color: var(--color-gray);
    font-size: 0.85rem;
}

/* 典籍卡片 */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    text-align: center;
    border: 1px solid rgba(201, 168, 108, 0.15);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-gold);
}

.book-cover {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.book-card h3 {
    font-size: 1.3rem;
    color: var(--color-red);
    margin-bottom: 0.5rem;
}

.book-author {
    color: var(--color-gold);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.book-desc {
    color: var(--color-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
}

.book-meta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    color: var(--color-gray-light);
    font-size: 0.85rem;
    border-top: 1px solid rgba(201, 168, 108, 0.15);
    padding-top: 1rem;
}

/* 互动图 */
.interactive-diagram {
    max-width: 800px;
    margin: 0 auto;
}

.diagram-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.diagram-building {
    background: linear-gradient(180deg, #FAF8F3 0%, #F2EEE5 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid rgba(201, 168, 108, 0.2);
}

.diagram-section {
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.diagram-section:hover {
    transform: scale(1.02);
}

.roof-part {
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    color: white;
    min-height: 80px;
}

.dourgong-part {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: white;
    min-height: 60px;
}

.column-part {
    background: linear-gradient(135deg, #8B7355 0%, #6B5344 100%);
    color: white;
    min-height: 60px;
}

.beam-part {
    background: linear-gradient(135deg, var(--color-bamboo) 0%, var(--color-bamboo-light) 100%);
    color: white;
    min-height: 50px;
}

.base-part {
    background: linear-gradient(135deg, #696969 0%, #4A4A4A 100%);
    color: white;
    min-height: 70px;
}

.diagram-label {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.part-info {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    min-height: 200px;
}

.part-info h4 {
    color: var(--color-red);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.part-info p {
    color: var(--color-gray);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .diagram-container {
        grid-template-columns: 1fr;
    }
    
    .roof-row {
        grid-template-columns: 100px 80px;
        grid-template-rows: auto auto;
    }
    
    .roof-desc, .roof-example {
        grid-column: 1 / -1;
    }
}

/* 建筑剖视图样式 */
.cross-section-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.cross-section-svg {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(201, 168, 108, 0.2);
}

.svg-legend {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.svg-legend h4 {
    color: var(--color-red);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gold);
}

.svg-legend ul {
    list-style: none;
}

.svg-legend li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 木构架样式 */
.beam-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.beam-system-card {
    background: white;
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    text-align: center;
    border: 2px solid rgba(201, 168, 108, 0.15);
}

.beam-system-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-red);
}

.beam-svg {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-paper);
    border-radius: var(--radius-md);
}

.beam-system-card h3 {
    color: var(--color-red);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.beam-desc {
    color: var(--color-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.beam-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-tag,
.usage-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
    margin: 0.2rem 0;
}

.feature-tag {
    background: rgba(139, 35, 35, 0.1);
    color: var(--color-red);
}

.usage-tag {
    background: rgba(201, 168, 108, 0.15);
    color: var(--color-gold-dark);
}

/* 屋顶图解样式 */
.roof-diagrams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.roof-diagram-card {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(201, 168, 108, 0.1);
}

.roof-diagram-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-red);
}

.roof-diagram-card svg {
    margin-bottom: 0.8rem;
    background: linear-gradient(180deg, #f8f6f0 0%, #f2eee5 100%);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.roof-info h4 {
    color: var(--color-red);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.roof-level-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.roof-diagram-card p {
    color: var(--color-gray);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* 斗拱图解样式 */
.dougong-diagram {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.dougong-svg-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.dougong-svg-container svg {
    width: 100%;
    height: auto;
}

.dougong-legend {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.dougong-legend h4 {
    color: var(--color-red);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gold);
}

.dougong-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.dougong-table th {
    background: var(--color-red);
    color: white;
    padding: 0.5rem;
    text-align: left;
}

.dougong-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    color: var(--color-gray);
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.dougong-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.dougong-feature {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--color-gold);
}

.dougong-feature:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-red);
}

.feature-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
}

.feature-content h4 {
    color: var(--color-red);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--color-gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* 建筑等级样式 */
.grade-system {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.grade-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.grade-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.grade-header {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.grade-1 .grade-header {
    background: linear-gradient(135deg, #8B2323 0%, #6B1A1A 100%);
    color: white;
}

.grade-2 .grade-header {
    background: linear-gradient(135deg, #B8860B 0%, #8B6508 100%);
    color: white;
}

.grade-3 .grade-header {
    background: linear-gradient(135deg, #696969 0%, #4A4A4A 100%);
    color: white;
}

.grade-4 .grade-header {
    background: linear-gradient(135deg, #556B2F 0%, #3F5023 100%);
    color: white;
}

.grade-number {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.grade-header h3 {
    font-size: 1.2rem;
}

.grade-content {
    padding: 1.2rem;
}

.grade-content p {
    margin-bottom: 0.8rem;
    color: var(--color-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

.grade-color,
.grade-decoration,
.grade-example {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* 视图切换 */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.view-btn {
    padding: 0.6rem 1.5rem;
    background: white;
    border: 2px solid var(--color-gold);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-gray);
    transition: all 0.3s ease;
}

.view-btn:hover {
    border-color: var(--color-red);
    color: var(--color-red);
}

.view-btn.active {
    background: var(--color-red);
    color: white;
    border-color: var(--color-red);
}

/* 地图容器 */
#buildingMap {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-gold);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.map-legend {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.map-legend h4 {
    color: var(--color-red);
    margin-bottom: 1rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.legend-item {
    padding: 0.3rem 0.8rem;
    background: var(--bg-paper);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--color-gray);
}

.map-tip {
    color: var(--color-gold);
    font-size: 0.9rem;
    margin: 0;
}

/* 地图弹窗 */
.map-popup {
    padding: 0.5rem;
}

.map-popup h4 {
    color: var(--color-red);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.map-popup p {
    margin: 0.3rem 0;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.popup-link {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.4rem 1rem;
    background: var(--color-red);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.popup-link:hover {
    background: var(--color-red-dark);
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.leaflet-popup-content {
    margin: 1rem;
}

.leaflet-control-zoom a {
    background: white;
    color: var(--color-red);
    border-color: var(--color-gold);
}

.leaflet-control-zoom a:hover {
    background: var(--color-paper);
}

/* 响应式布局 */
@media (max-width: 900px) {
    .cross-section-container {
        grid-template-columns: 1fr;
    }
    
    .dougong-diagram {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .diagram-container {
        grid-template-columns: 1fr;
    }
    
    .roof-row {
        grid-template-columns: 100px 80px;
        grid-template-rows: auto auto;
    }
    
    .roof-desc, .roof-example {
        grid-column: 1 / -1;
    }
}

/* 响应式 */
@media (max-width: 1200px) {
    .nav-links {
        gap: 1.2rem;
    }
    
    .search-box input {
        width: 160px;
    }
}

@media (max-width: 1024px) {
    .categories,
    .building-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 4rem !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
    
    .hero h1 {
        font-size: 2.8rem;
        letter-spacing: 6px;
    }
    
    .hero p {
        font-size: 1rem;
        letter-spacing: 4px;
    }
}

@media (max-width: 768px) {
    .categories,
    .building-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        height: 20vh;
    }
    
    .hero h1 {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .hero p {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-box input {
        width: 140px;
    }
    
    .container {
        padding: 1rem 1.2rem;
    }
    
    .nav-container {
        padding: 0.6rem 1.2rem;
    }
    
    .category-card {
        padding: 2rem 1.5rem;
    }
    
    .building-card {
        border-radius: var(--radius-md);
    }
    
    .building-image {
        height: 180px;
    }
    
    .building-info {
        padding: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr !important;
    }
    .sidebar {
        order: -1;
    }
    .info-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .hero {
        height: 12vh !important;
    }
    .hero h1 {
        font-size: 1.5rem !important;
    }
    .content-module {
        padding: 1.5rem !important;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-item img {
        height: 140px;
    }
    #gallery-prev,
    #gallery-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    #gallery-prev {
        left: 10px;
    }
    #gallery-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    
    .hero p {
        font-size: 0.8rem;
    }
    
    .search-box input {
        width: 120px;
        padding: 0.5rem 0.8rem;
    }
    
    .search-box button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
    
    .category-card h3 {
        font-size: 1.1rem;
    }
    
    .building-image {
        height: 160px;
    }
    
    .building-info h3 {
        font-size: 1.1rem;
    }
    
    .building-meta {
        gap: 0.4rem;
    }
    
    .building-meta span {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .content-module {
        padding: 1.2rem;
    }

    footer {
        padding: 2rem 1.2rem;
    }

    footer .footer-links {
        gap: 1rem;
    }

    footer .footer-links a {
        font-size: 0.8rem;
    }

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

/* 动画 */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 建筑详情页样式 */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    cursor: zoom-in;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.info-card {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    padding: 1.3rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.text-content {
    line-height: 2;
    font-size: 1.05rem;
    color: #333;
    text-align: justify;
    background: var(--bg-paper);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.text-content strong {
    color: var(--color-red);
    font-weight: 600;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    background: var(--color-red);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 35, 35, 0.2);
}

.back-btn:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 35, 35, 0.3);
}

/* 画廊模态框 */
#gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
}

#gallery-lightbox span {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
}

#gallery-prev,
#gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s ease;
}

#gallery-prev:hover,
#gallery-next:hover {
    background: rgba(255,255,255,0.3);
}

#gallery-prev {
    left: 20px;
}

#gallery-next {
    right: 20px;
}

#gallery-lightbox-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

#gallery-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-paper);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-dark);
}
