:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --background-color: #F4F7FB;
    --text-main: #1F2D3D;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
    --header-offset: 122px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Darker color for top bar */
    width: 100%;
    padding: 0 20px;
}

.header-container {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    display: flex; /* For potential image logo alignment */
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px; /* Limit logo width */
}

.logo img {
    display: block;
    max-height: 60px;
    height: auto;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.desktop-nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px;
    background-color: var(--primary-color); /* Same as header-top for consistency */
    padding: 0 20px;
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--card-bg); /* Lighter color for main nav */
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.nav-container {
    box-sizing: border-box;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    gap: 25px;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    padding: 5px 0;
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 14px;
    background: var(--button-gradient);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-register {
    background: var(--button-gradient);
}

.btn-login {
    background: var(--button-gradient);
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001; /* Above logo */
}

.hamburger-icon {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.hamburger-menu.active .hamburger-icon {
    background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Footer Styles */
.site-footer {
    background-color: var(--text-main);
    color: #E0E0E0;
    padding: 40px 20px 20px;
    font-size: 14px;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    font-size: 22px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    margin-bottom: 15px;
    display: block;
}

.footer-description {
    margin-top: 0;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-heading {
    font-size: 16px;
    color: #FFFFFF;
    margin-top: 0;
    margin-bottom: 15px;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 8px;
}

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

.footer-nav a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #B0B0B0;
}

.footer-bottom a { /* Ensure no links in footer-bottom */
    text-decoration: none;
    color: inherit;
    pointer-events: none;
}

/* Ensure dynamic slot anchors are visible for content injection */
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure it takes up space if empty */
    width: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px;
    }

    body {
        padding-top: var(--header-offset);
        overflow-x: hidden;
    }

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 15px;
    }

    .header-container {
        max-width: none;
        padding: 0;
        justify-content: space-between;
        position: relative; /* For absolute logo positioning */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        margin-right: auto; /* Push logo to center */
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        max-width: calc(100% - 60px); /* Adjust max-width to not overlap hamburger */
        font-size: 20px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo img {
        max-height: 56px !important;
    }

    .desktop-nav-buttons {
        display: none !important;
    }

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--primary-color);
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px);
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-nav {
        display: none; /* Hidden by default, shown with JS */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 280px; /* Adjust as needed */
        height: calc(100% - var(--header-offset));
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        border-top: none;
    }

    .main-nav.active {
        display: flex; /* Show when active */
        transform: translateX(0); /* Slide in */
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        max-width: none;
        width: 100%;
        padding: 0 15px;
        gap: 10px;
    }

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .site-footer {
        padding: 30px 15px;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .footer-col {
        align-items: center;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 10px;
    }

    .footer-heading {
        margin-bottom: 10px;
    }

    .footer-nav li {
        margin-bottom: 5px;
    }
    .footer-nav {
        width: 100%;
    }
    .footer-nav a {
        display: block;
        padding: 5px 0;
    }

    .footer-bottom {
        margin-top: 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
