:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;

    /* Header offset for desktop (header-top 68px + main-nav 52px + 2px buffer) */
    --header-offset: 122px;
}

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

body.no-scroll {
    overflow: hidden;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background-color: var(--deep-green); /* Overall header background */
}

.header-top {
    box-sizing: border-box;
    height: 68px; /* Desktop fixed height */
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--card-bg); /* Distinct background for top bar */
    width: 100%;
    padding: 0 20px; /* Padding for small desktop screens */
}

.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: 28px;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    display: block; /* Ensure it's a block for flex alignment */
    line-height: 1; /* Adjust line height for better vertical alignment */
}

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

.desktop-nav-buttons {
    display: flex; /* Always flex for desktop */
    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(--deep-green); /* Match header-top or main-nav */
}

.main-nav {
    box-sizing: border-box;
    height: 52px; /* Desktop fixed height */
    display: flex; /* Always flex for desktop */
    align-items: center;
    overflow: hidden;
    background-color: var(--deep-green); /* Distinct background for main nav */
    width: 100%;
    padding: 0 20px; /* Padding for small desktop screens */
}

.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;
    width: 100%;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    white-space: nowrap;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Above header */
    position: relative;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Hamburger animation */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(-45deg);
}

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

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

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: bold;
    background: var(--button-gradient);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-color);
}

/* Footer Styles */
.site-footer {
    background-color: var(--background-color);
    color: var(--text-secondary);
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid var(--divider-color);
}

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

.footer-col {
    padding: 10px 0;
}

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

.footer-description {
    color: var(--text-secondary);
    margin-top: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-heading {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 15px;
    position: relative;
}

.footer-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--gold-color);
    margin-top: 5px;
}

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

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

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--divider-color);
    color: var(--text-secondary);
    font-size: 13px;
}

.copyright {
    margin: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    :root {
        /* Header offset for mobile (header-top 60px + mobile-nav-buttons 48px + 2px buffer) */
        --header-offset: 110px;
    }

    body {
        padding-top: var(--header-offset);
        overflow-x: hidden; /* Ensure body prevents horizontal scroll */
    }
    
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: hidden;
    }

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

    .header-container {
        max-width: none; /* No max-width on mobile */
        padding: 0; /* Handled by .header-top */
        justify-content: space-between; /* Hamburger left, Logo center, space right */
        position: relative; /* For absolute positioning of logo if needed */
    }

    .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); /* Leave space for hamburger and potential right element */
    }

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

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: -1; /* Place it to the far left */
        position: relative;
        z-index: 1001; /* Ensure it's clickable */
    }

    .desktop-nav-buttons {
        display: none !important; /* Hide desktop buttons on mobile */
    }

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap; /* Prevent buttons from wrapping */
        background-color: var(--deep-green); /* Match main nav or header top */
        justify-content: center;
    }

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

    .main-nav {
        height: auto; /* Auto height for expanded menu */
        min-height: 48px; /* Mobile fixed height when collapsed/as part of fixed header */
        display: none; /* Hidden by default, toggled by JS */
        flex-direction: column;
        position: fixed; /* Fixed position for mobile menu */
        top: var(--header-offset); /* Start below the fixed header */
        left: 0;
        width: 100%;
        max-width: 300px; /* Sidebar width */
        height: calc(100% - var(--header-offset)); /* Full height below header */
        background-color: var(--card-bg); /* Menu background */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        z-index: 1000; /* Same as header, or slightly lower than overlay if overlay is behind */
        padding: 20px 0;
        overflow-y: auto; /* Scroll if menu content is long */
    }

    .main-nav.active {
        display: flex; /* Show the menu */
        transform: translateX(0); /* Slide into view */
    }

    .nav-container {
        max-width: none; /* No max-width on mobile */
        padding: 0 15px; /* Adjust padding for mobile */
        flex-direction: column;
        align-items: flex-start; /* Align menu items to the left */
        width: 100%;
        height: auto;
    }

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid var(--divider-color);
        font-size: 15px;
        text-align: left;
    }
    .nav-link:last-child {
        border-bottom: none;
    }

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

    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 25px;
        margin-bottom: 20px;
    }

    .footer-col:last-of-type {
        margin-bottom: 0;
    }

    .footer-heading {
        font-size: 16px;
    }

    .footer-bottom {
        padding-top: 15px;
        font-size: 12px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
