/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

nav.mobile-mode {
    padding: 0.5rem 1rem;
}

.logo a {
    color: #333;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #007bff;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease-in-out;
}

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

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

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

/* 主要内容区域 */
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
    padding: 2rem;
}

/* 页脚样式 */
footer {
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        padding: 0.5rem 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none !important;
    }

    .mobile-nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: #fff;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
        text-align: right;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .mobile-nav-links a {
        font-size: 1.2rem;
        padding: 0.8rem;
        position: relative;
        color: #333;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .mobile-nav-links a:hover {
        color: #007bff;
    }

    .mobile-nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0;
        height: 2px;
        background-color: #007bff;
        transition: all 0.3s ease;
    }

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

    main {
        margin-top: 60px;
        padding: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    margin: 1rem 0;
}