﻿/* ==================== 全局变量 ==================== */
:root {
    --primary: #7a3e1f;
    --primary-light: #c2845c;
    --primary-dark: #5a2e15;
    --bg-light: #fbf7f0;
    --bg-white: #ffffff;
    --text-dark: #2c2418;
    --text-gray: #5a4a38;
    --border-light: #f0e6d8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 35px -12px rgba(60,40,20,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-light);
    font-family: 'Inter', 'Noto Serif SC', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #e8dfd3;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo a {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 2px;
}

.nav-logo a:hover {
    color: var(--primary-dark);
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    background: #f0e6d8;
    color: var(--primary);
}

.nav-link.active {
    background: #f0e6d8;
    color: var(--primary);
}

.register-btn {
    background: var(--primary);
    color: white;
}

.register-btn:hover {
    background: var(--primary-dark);
    color: white;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 150px;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 1001;
    border: 1px solid var(--border-light);
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-gray);
    transition: background 0.2s;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background: #f5ede4;
    color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 移动端按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-gray);
    margin: 3px 0;
    transition: 0.3s;
}

/* 移动端侧滑菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-white);
    box-shadow: -2px 0 20px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.close-menu {
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-menu:hover {
    color: var(--primary);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-menu-links a {
    padding: 14px 0;
    text-decoration: none;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-light);
    transition: color 0.2s;
}

.mobile-menu-links a:hover {
    color: var(--primary);
}

.mobile-menu-links a:last-child {
    border-bottom: none;
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}

.overlay.show {
    display: block;
}

/* ==================== 主要内容 ==================== */
.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 英雄区域 */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}

.avatar-wrapper {
    margin-bottom: 24px;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

.avatar:hover {
    transform: scale(1.02);
}

.site-title {
    font-size: 2.5rem;
    font-weight: 600;
    font-family: 'Noto Serif SC', serif;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.signature {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.bio {
    color: #8e735b;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.social-link:hover {
    color: var(--primary);
}

/* 功能区域 */
.features-section {
    padding: 40px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 500;
    font-family: 'Noto Serif SC', serif;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-light);
    margin: 12px auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, #9b5a33 100%);
    color: white;
}

.feature-card.highlight h3,
.feature-card.highlight p,
.feature-card.highlight .feature-link {
    color: white;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.feature-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    transition: transform 0.2s;
}

.feature-card:hover .feature-link {
    transform: translateX(5px);
}

/* 信息区域 */
.info-section {
    padding: 40px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.datetime {
    font-size: 1.1rem;
    color: var(--primary);
    font-family: monospace;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.footer-info p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.footer-info p:first-child {
    margin-bottom: 6px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
}

.footer-bottom p {
    color: #b0a088;
    font-size: 0.75rem;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main {
        padding: 0 16px;
    }
    
    .hero-section {
        padding: 40px 0 20px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .site-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .signature {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .features-grid {
        gap: 16px;
    }
    
    .feature-card {
        padding: 20px 16px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}