/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    background-color: #d32f2f; /* 红色主题，适合火锅 */
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-links a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

section {
    margin-bottom: 3rem;
}

h1 {
    color: #d32f2f;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}

/* 汉堡菜单（手机端） */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
}

.hamburger span {
    background-color: white;
    height: 4px;
    width: 100%;
    border-radius: 2px;
}

/* 响应式设计：手机端（宽度 < 768px） */
@media (max-width: 767px) {
    .navbar {
        flex-wrap: wrap;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #d32f2f;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
    }

    .nav-links li {
        margin: 1rem 2rem;
        text-align: left;
    }

    .menu-toggle:checked + .hamburger + .nav-links {
        display: flex;
    }

    /* 汉堡图标动画 */
    .menu-toggle:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }

    .menu-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* 电脑端：默认顶部水平导航 */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .hamburger {
        display: none;
    }
}
