/* ==================== 全局样式 ==================== */

:root {
    --china-red: #c41e3a;
    --china-red-dark: #8b1528;
    --brown: #8b4513;
    --brown-dark: #5d2f0d;
    --gold: #c4a57b;
    --gold-light: #d4b896;
    --cream: #fdfbf7;
    --cream-dark: #f5f0e6;
    --text: #2c2c2c;
    --text-light: #666;
    --border: rgba(139, 69, 19, 0.2);
}

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

/* 全局平滑滚动 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
}

/* 传统纹样背景 */
.cloud-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 80c-15-20-10-40 10-45s40 5 45 25-5 35-25 40-40-5-30-20z' fill='%238b4513'/%3E%3Cpath d='M120 120c-15-20-10-40 10-45s40 5 45 25-5 35-25 40-40-5-30-20z' fill='%238b4513'/%3E%3C/svg%3E");
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--china-red) 0%, var(--china-red-dark) 100%);
    color: white;
    padding: 12px 0;
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 2px;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: white;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
}

/* 汉堡菜单按钮 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 移动端导航覆盖层 */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--china-red) 0%, var(--china-red-dark) 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-overlay.active {
    left: 0;
}

.mobile-nav-content {
    width: 100%;
    max-width: 400px;
    padding: 80px 20px 20px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(255,255,255,0.1);
}

.mobile-nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(8px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Titles */
.section-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 36px;
    color: var(--brown);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--china-red) 0%, var(--china-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(196, 30, 58, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cream-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--china-red) 0%, var(--china-red-dark) 100%);
    border-radius: 5px;
    border: 2px solid var(--cream-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--china-red-dark) 0%, var(--brown-dark) 100%);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--china-red) var(--cream-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    #desktopNav {
        display: none;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
}
