:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-color: #EA7C07;
    --background-color: #FFFFFF;
    --text-color-dark: #000000;
    --text-color-light: #FFFFFF;
    --header-top-bg: #000000;
    --main-nav-bg: var(--primary-color);
    --header-offset: 122px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--background-color);
    color: var(--text-color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.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(--text-color-light);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
}

.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(--main-nav-bg);
    width: 100%;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: var(--text-color-dark); /* Changed to black for AA contrast */
    border: none;
    line-height: 1.2;
}

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

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

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-light);
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

.nav-link {
    color: var(--text-color-dark); /* Changed to black for AA contrast on primary-color background */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #333333; /* Darker hover for black text */
}

.overlay {
    display: none;
    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-color-dark);
    color: var(--text-color-light);
    padding: 40px 20px 20px;
    font-size: 14px;
}

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

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

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

.footer-description {
    margin-bottom: 20px;
    color: #cccccc;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #888888;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 0;
}

.footer-slot-anchor-inner {
    /* Placeholder for dynamic content injection */
    min-height: 10px; /* Ensure visibility for debugging */
}

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

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

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        position: relative;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: flex-start; /* Adjust for hamburger menu */
    }

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

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        height: auto; /* Allow content to dictate height */
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 8px 15px; /* Adjust padding for mobile */
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
    }

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

    .hamburger-menu {
        display: block;
        order: -1; /* Place it at the beginning of flex container */
        margin-right: auto; /* Push logo to center */
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-nav {
        display: none; /* Default hidden for mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 75%; /* Adjust as needed */
        height: calc(100% - var(--header-offset));
        background-color: var(--text-color-dark); /* Dark background for mobile menu */
        flex-direction: column; /* Mobile default */
        justify-content: flex-start;
        align-items: flex-start;
        padding: 20px;
        box-sizing: border-box;
        transform: translateX(-100%); /* Off-screen */
        transition: transform 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #555;
        font-size: 17px;
        color: var(--text-color-light); /* Light text on dark mobile menu background */
    }

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

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

    .footer-top-grid {
        grid-template-columns: 1fr;
    }

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