:root { --header-offset: 122px; --color-primary: #26A9E0; --color-accent: #FFFFFF; --color-login: #EA7C07; --color-dark-blue: #0A2342; }

body { padding-top: var(--header-offset); margin: 0; font-family: Arial, sans-serif; line-height: 1.6; color: #333; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--color-dark-blue); /* Fallback, specific parts will override */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-dark-blue);
    width: 100%;
    color: var(--color-accent);
}

.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;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    display: block;
    height: 100%;
    display: flex;
    align-items: center;
}

.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(--color-primary);
    padding: 0 20px;
    color: var(--color-accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: var(--color-accent);
    border: none;
}

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

.btn-register {
    background-color: var(--color-primary);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-primary);
    width: 100%;
}

.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;
}

.nav-link {
    color: var(--color-accent);
    text-decoration: none;
    padding: 0 15px;
    font-weight: bold;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

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

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

.hamburger-menu.active .bar:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Overlay for mobile menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Site Footer */
.site-footer {
    background-color: #1A1A1A; /* Dark background for footer */
    color: #CCCCCC;
    padding: 40px 20px 20px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.footer-col h3 {
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-description {
    margin-bottom: 15px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #999;
}

.footer-bottom p {
    margin: 0;
}

/* Footer Slot Anchors - ensure they are visible and don't hide content */
.footer-slot-anchor, .footer-slot-anchor-inner {
    min-height: 1px; /* Ensure visibility for injection */
}

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

    body { overflow-x: hidden; }

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 15px; /* Adjust padding for mobile */
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Leave space for hamburger */
    }

    .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: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .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;
    }

    .hamburger-menu {
        display: block;
        position: relative;
        z-index: 1001;
        margin-left: -5px; /* Adjust to align with edge */
    }

    .main-nav {
        min-height: 48px !important;
        height: auto; /* Allow content to dictate height */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 280px; /* Sidebar width */
        height: calc(100% - var(--header-offset));
        background-color: var(--color-dark-blue); /* Darker background for mobile menu */
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        transform: translateX(-100%); /* Hidden by default */
        transition: transform 0.3s ease;
        display: none; /* Hidden by default */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateX(0); /* Visible when active */
        display: flex; /* Ensure it's displayed */
    }

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

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        color: var(--color-accent);
        justify-content: flex-start;
        background-color: transparent;
    }

    .nav-link:hover, .nav-link.active {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }
    body {
        overflow-x: hidden;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
