/* Global Reset & Box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif; /* Placeholder font, replace with actual */
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    padding-top: var(--header-offset); /* Critical for fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Color Variables */
:root {
    --site-primary: #11A84E;
    --site-secondary: #22C768;

    /* Custom colors */
    --btn-bg: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --bg-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;

    /* Neon specific colors derived from the theme, brighter/more saturated */
    --neon-primary: var(--glow-color); /* Use the specified Glow color for primary neon */
    --neon-secondary: #7FFF00; /* A slightly different vibrant green */
    --neon-accent: #ADFF2F; /* Another vibrant green/yellow */

    /* Header offset values */
    --header-offset: 166px; /* Desktop: 44 (marquee) + 68 (header-top) + 52 (main-nav) = 164px + 2px buffer */
}

/* Animations for Neon Effects */
@keyframes theme-colors {
    0%, 100% {
        border-color: var(--neon-primary);
        box-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary), inset 0 0 10px rgba(87, 227, 141, 0.3);
    }
    33% {
        border-color: var(--neon-secondary);
        box-shadow: 0 0 10px var(--neon-secondary), 0 0 20px var(--neon-secondary), inset 0 0 10px rgba(127, 255, 0, 0.3);
    }
    66% {
        border-color: var(--neon-accent);
        box-shadow: 0 0 10px var(--neon-accent), 0 0 20px var(--neon-accent), inset 0 0 10px rgba(173, 255, 47, 0.3);
    }
}

@keyframes text-glow-flow {
    0% {
        text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary), 0 0 15px var(--neon-primary);
        color: #ffffff;
    }
    50% {
        text-shadow: 0 0 5px var(--neon-secondary), 0 0 10px var(--neon-secondary), 0 0 15px var(--neon-secondary);
        color: #ffffff;
    }
    100% {
        text-shadow: 0 0 5px var(--neon-accent), 0 0 10px var(--neon-accent), 0 0 15px var(--neon-accent);
        color: #ffffff;
    }
}

/* Marquee Section */
.marquee-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 44px; /* Desktop height */
    box-sizing: border-box;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    color: #ffffff;
    overflow: hidden;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow: 
        0 0 10px var(--neon-primary),
        0 0 20px var(--neon-primary),
        0 0 30px var(--neon-primary),
        inset 0 0 20px rgba(87, 227, 141, 0.1); /* Use rgba for glow color */
    z-index: 1001; /* Ensure on top of header */
    display: flex; /* For icon alignment */
    align-items: center;
}

.marquee-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    box-sizing: border-box;
}

.marquee-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* Smaller icon on desktop */
    height: 24px;
    z-index: 2;
    position: relative;
    font-size: 20px; /* Base font size for emoji */
}

.marquee-icon-emoji {
    display: inline-block;
    animation: marquee-pulse 2s ease-in-out infinite, text-glow-flow 3s ease-in-out infinite alternate;
    text-shadow: 
        0 0 5px var(--neon-primary),
        0 0 10px var(--neon-primary),
        0 0 15px var(--neon-primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes marquee-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

.marquee-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: marquee-scroll 30s linear infinite;
    gap: 30px;
}

.marquee-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 
        0 0 5px var(--neon-primary),
        0 0 10px var(--neon-primary),
        0 0 15px var(--neon-primary);
    line-height: 1.5;
    display: inline-block;
    vertical-align: middle;
    animation: text-glow-flow 3s ease-in-out infinite alternate;
    cursor: pointer;
    transition: all 0.3s ease;
}

.marquee-text:hover {
    text-shadow: 
        0 0 10px var(--neon-primary),
        0 0 20px var(--neon-primary),
        0 0 30px var(--neon-primary),
        0 0 40px var(--neon-primary);
    transform: scale(1.05);
    color: #ffffff;
}

.marquee-separator {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 15px;
    text-shadow: 
        0 0 3px var(--neon-primary),
        0 0 6px var(--neon-primary);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Site Header */
.site-header {
    position: fixed;
    top: 44px; /* Below marquee on desktop */
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    color: var(--text-main);
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    box-shadow: 
        0 0 10px var(--neon-primary),
        0 0 20px var(--neon-primary),
        0 0 30px var(--neon-primary),
        inset 0 0 20px rgba(87, 227, 141, 0.1);
}

.header-top {
    box-sizing: border-box;
    min-height: 68px; /* Desktop height */
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 20px; /* Padding for the top bar */
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main); /* Regular color for logo */
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%; /* To center vertically within header-top */
    /* No neon effects for logo */
}

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

.desktop-nav-buttons {
    display: flex; /* Desktop display */
    gap: 10px;
    align-items: center;
}

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 20px; /* Padding for mobile button bar */
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
    border-top: 1px solid rgba(87, 227, 141, 0.3);
    border-bottom: 1px solid rgba(87, 227, 141, 0.3);
    overflow: hidden;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent wrapping */
}

.btn {
    position: relative;
    background: var(--btn-bg); /* Use custom button background */
    padding: 12px 30px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid;
    animation: theme-colors 4s ease-in-out infinite; /* Dynamic color border */
    text-shadow: 
        0 0 5px #ffffff,
        0 0 10px var(--neon-primary);
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
    animation-duration: 2s; /* Faster animation on hover */
    transform: translateY(-2px);
    box-shadow: 
        0 0 15px var(--neon-primary),
        0 0 30px var(--neon-primary),
        inset 0 0 15px rgba(87, 227, 141, 0.5);
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px; /* Desktop height */
    height: 52px;
    display: flex; /* Desktop display */
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); /* Different dark background */
    border-top: 2px solid;
    border-bottom: 2px solid;
    animation: theme-colors 4s ease-in-out infinite reverse; /* Different animation direction */
    box-shadow: 
        0 0 10px var(--neon-secondary),
        0 0 20px var(--neon-secondary),
        0 0 30px var(--neon-secondary),
        inset 0 0 20px rgba(127, 255, 0, 0.1);
}

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

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main); /* Regular color for nav links */
    padding: 5px 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover {
    color: var(--glow-color); /* Highlight on hover */
    text-shadow: 0 0 5px var(--glow-color);
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1002; /* Above logo and buttons */
    flex-shrink: 0;
    order: 1; /* Place hamburger first */
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 4px;
    width: 100%;
    background: var(--neon-primary); /* Neon color for lines */
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
    box-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary); /* Neon glow */
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

.hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

.mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above page content */
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

body.no-scroll {
    overflow: hidden;
}

/* Footer */
.site-footer {
    background-color: var(--bg-color); /* Use specified background color */
    color: var(--text-secondary); /* Use specified secondary text color */
    padding: 60px 20px 20px;
    font-size: 15px;
    border-top: 1px solid var(--divider-color); /* Use specified divider color */
}

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

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

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

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--border-color); /* Use specified border color */
}

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

.footer-about .footer-description {
    line-height: 1.8;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

.footer-nav a:hover {
    color: var(--site-primary); /* Highlight on hover */
}

.footer-slot-anchor-inner {
    min-height: 20px; /* Ensure visibility for injected content */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--divider-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-bottom a {
    /* No links allowed in footer-bottom */
    pointer-events: none;
    cursor: default;
    color: inherit;
}


/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-offset: 146px; /* Mobile: 36 (marquee) + 60 (header-top) + 48 (mobile-nav-buttons) = 144px + 2px buffer */
    }

    .marquee-section {
        height: 36px !important; /* Mobile height */
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .marquee-container {
        gap: 10px !important;
        padding: 0 12px !important;
        height: 100% !important;
    }
    .marquee-icon {
        width: 20px !important;
        height: 20px !important;
        font-size: 14px !important;
    }
    .marquee-icon-emoji {
        font-size: 14px !important;
    }
    .marquee-text {
        font-size: 14px !important;
    }
    .marquee-separator {
        font-size: 14px !important;
        margin: 0 10px !important;
    }
    .marquee-content {
        gap: 20px;
        animation: marquee-scroll 25s linear infinite;
    }

    .site-header {
        top: 36px; /* Below marquee on mobile */
    }

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

    .header-container {
        width: 100%;
        max-width: none; /* No max-width on mobile */
        padding: 0; /* Remove container padding as header-top has it */
        justify-content: space-between; /* Keep space-between for hamburger-logo-empty */
    }
    
    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        margin-right: 0; /* No right margin, handled by logo flex */
    }

    .logo {
        flex: 1 !important; /* Allow logo to take available space */
        display: flex !important;
        justify-content: center !important; /* Center logo */
        align-items: center !important;
        order: 2; /* Place logo second */
        font-size: 24px;
        margin-left: -30px; /* Offset to visually center, accounting for hamburger */
    }
    .logo img {
        max-height: 56px !important; /* Max height for mobile logo */
    }

    /* Empty div to balance the hamburger menu for logo centering */
    .header-container::after {
        content: '';
        display: block;
        width: 30px; /* Match hamburger width */
        order: 3; /* Place after logo */
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        padding: 8px 15px; /* Adjust padding */
        gap: 10px;
        justify-content: center;
        flex-wrap: nowrap; /* Ensure no wrapping */
    }
    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* Two buttons, each 50% - half gap */
        padding: 8px 12px; /* Smaller padding */
        font-size: 13px; /* Smaller font size */
        white-space: normal; /* Allow text to wrap */
        word-wrap: break-word;
        text-align: center;
    }

    .main-nav {
        display: none; /* Hidden by default, toggled by JS */
        position: fixed;
        top: var(--header-offset); /* Position below the entire fixed header */
        left: 0;
        width: 80%; /* Sidebar width */
        height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
        flex-direction: column; /* Vertical menu */
        justify-content: flex-start;
        align-items: flex-start;
        padding: 20px 15px;
        background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e); /* Dark background */
        border-right: 2px solid;
        animation: theme-colors 4s ease-in-out infinite;
        box-shadow: 
            0 0 10px var(--neon-primary),
            0 0 20px var(--neon-primary),
            inset 0 0 20px rgba(87, 227, 141, 0.1);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        z-index: 1000; /* Above overlay */
        overflow-y: auto; /* Enable scrolling for long menus */
    }

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

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

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--divider-color);
        font-size: 16px;
    }
    .nav-link:last-child {
        border-bottom: none;
    }

    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    .footer-col {
        padding: 15px 0;
    }

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