/* 基础样式 */
:root {
    /* 字体定义 */
    --font-stack: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    
    /* 色板 */
    --primary: #2c3e50;
    --secondary: #3498db;
    --text: #333;
    --background: #f8f9fa;
}

body {
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    background: var(--background);
    margin: 0;
    padding: 0;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航容器 */
.navbar {

    top: 0;
    width: 100%;    
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 导航包装 */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* 品牌标识 */
.brand {
    font-size: 1.5rem;    
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* 汉堡菜单按钮 */
.hamburger {
    position: absolute;
    right: 1rem;
    top: 1rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    transition: transform 0.3s ease-in-out;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--background);
    background: var(--secondary);
}


header img {
    display: block;
    width: 100%;
    height: auto;
}

/* 主体内容 */
main {
    flex: 1;
    max-width: 1200px;
    width: 90%;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.left-side,
.right-side {
    flex: 1;
}

.module {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.module h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #00649a;
}

.module ul {
    padding-left: 1.5rem;
}

.module ul li {
    margin-bottom: 0.5rem;
}

.module a {
    color: #00649a;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.module a:hover {
    color: #3498db;
}

.tuchu {
    color: rgb(188, 41, 49);
    font-weight: bold;
    font-size: 20px;
}

footer {
    background-color: #00649a;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
}

footer p {
    margin: 0.5rem 0;
}


/* 移动端样式 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        gap: 2rem;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        padding: 2rem;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-menu a {
        font-size: 1.2rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
    }

    /* 汉堡菜单动画 */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    main {
        flex-direction: column;
    }

    .left-side,
    .right-side {
        flex: 100%;
    }
}
