* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

body {
    font-family: Gadugi, "Microsoft YaHei UI", sans-serif;
    padding-top: 76px;
    transition: background-color 0.35s ease, color 0.35s ease;
}

:root[data-theme="dark"] body {
    background-color: #161821;
    color: #e9e5dc;
}

.site-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="dark"] .site-navbar {
    background-color: #202330;
    border-bottom-color: #333849;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.site-title {
    font-size: 22px;
    font-weight: bold;
    color: #000000;
    transition: color 0.35s ease;
}

:root[data-theme="dark"] .site-title {
    color: #f5f1e8;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.theme-switch-wrap {
    display: flex;
    align-items: center;
    height: 36px;
    margin-right: -6px;
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
}

.nav-link {
    text-decoration: none;
    color: #555555;
    font-size: 15px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

:root[data-theme="dark"] .nav-link {
    color: #c7c1b8;
}

.nav-link:hover,
.nav-link.active {
    color: #000000;
    border-bottom-color: #000000;
}

:root[data-theme="dark"] .nav-link:hover,
:root[data-theme="dark"] .nav-link.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: transparent;
    border: 0;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 999px;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

:root[data-theme="dark"] .mobile-menu-btn span {
    background-color: #f5f1e8;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .site-navbar {
        padding: 12px 20px;
    }

    .navbar-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        padding: 15px 20px;
        border-bottom: 1px solid #e8e8e8;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        gap: 0;
    }

    :root[data-theme="dark"] .navbar-right {
        background-color: #202330;
        border-bottom-color: #333849;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    }

    .navbar-right.show {
        display: flex;
    }

    .theme-switch-wrap {
        height: 38px;
        margin: 0 0 8px;
    }

    .site-navbar > .theme-switch-wrap,
    .navbar > .theme-switch-wrap {
        height: 36px;
        margin: 0 8px 0 auto;
    }

    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    :root[data-theme="dark"] .nav-link {
        border-bottom-color: #333849;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (orientation: portrait) {
    .navbar-left {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 56px;
    }

    .site-navbar {
        padding: 10px 15px;
    }

    .logo-img {
        height: 35px;
    }

    .site-title {
        font-size: 18px;
    }
}

.site-footer {
    background-color: #f9f9f9;
    border-top: 1px solid #e8e8e8;
    padding: 30px 20px;
    text-align: center;
    margin-top: 0;
    color: #666666;
    width: 100%;
    position: static;
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

:root[data-theme="dark"] .site-footer {
    background-color: #202330;
    border-top-color: #333849;
    color: #b4aea5;
}

.site-footer .footer-content p {
    font-size: 14px;
    color: #666666;
    margin: 5px 0;
}

:root[data-theme="dark"] .site-footer .footer-content p {
    color: #b4aea5;
}

.site-footer .footer-content a {
    color: #666666;
    text-decoration: none;
}

:root[data-theme="dark"] .site-footer .footer-content a {
    color: #d9d3ca;
}

.police-beian-link {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.police-beian-icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    vertical-align: -0.15em;
}

@media (max-width: 700px) {
    .site-footer {
        padding: 10px 12px;
    }

    .site-footer .footer-content p {
        font-size: 12px;
        margin: 1px 0;
    }
}
