:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --card-bg: #111111;
    --background-color: #0A0A0A;
    --text-main: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --header-offset: 122px; /* Desktop no marquee */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    padding-top: var(--header-offset); /* Header offset */
}

body.no-scroll {
    overflow: hidden;
}

/* Shared button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    color: #333; /* Darker text for gradient button */
    background: var(--button-gradient);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color);
}

/* Header styles */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-height: 60px; /* Minimum height for header */
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 15px 30px;
    box-sizing: border-box;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    flex-shrink: 0;
    display: block; /* Ensure logo is visible */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    z-index: 1001; /* Above mobile buttons */
}

.main-nav {
    flex: 1;
    display: flex; /* Desktop default: visible and row */
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

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

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

.desktop-nav-buttons {
    flex-shrink: 0;
    margin-left: auto;
    display: flex; /* Desktop default: visible */
    gap: 10px;
}

.mobile-nav-buttons {
    display: none !important; /* Hidden by default on desktop, !important to override */
}

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

.site-footer h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

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

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

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

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    text-align: center;
    padding-top: 20px; /* Add some padding above copyright */
    color: rgba(255, 246, 214, 0.7); /* Slightly muted text */
}

/* Dynamic slot anchor styles */
.footer-slot-anchor,
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure it takes up space even if empty */
    width: 100%;
}

/* Mobile styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile no marquee */
    }

    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

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

    .site-header {
        min-height: 50px;
    }

    .header-container {
        width: 100%;
        max-width: none; /* Remove max-width on mobile */
        padding: 10px 15px;
        justify-content: space-between; /* Space out items */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        flex-shrink: 0;
        margin-right: 10px;
    }

    .logo {
        flex: 1 !important; /* Crucial for centering */
        display: flex !important; /* Crucial for centering */
        justify-content: center !important; /* Crucial for centering */
        align-items: center !important; /* Crucial for centering */
        font-size: 24px;
        margin: 0; /* Reset margin for centering */
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Below fixed header */
        left: 0;
        width: 70%; /* Adjust as needed */
        max-width: 300px; /* Max width for mobile menu */
        height: calc(100vh - var(--header-offset)); /* Full height below header */
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.7);
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        z-index: 999; /* Below overlay, above content */
        overflow-y: auto; /* Enable scrolling for long menus */
    }

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

    .main-nav .nav-link {
        padding: 15px 10px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

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

    .mobile-nav-buttons {
        flex-shrink: 0;
        display: flex !important; /* Show mobile buttons on mobile */
        gap: 8px;
        margin-left: 10px; /* Space from logo */
    }

    .mobile-menu-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: 998; /* Below menu, above content */
    }

    .mobile-menu-overlay.active {
        display: block; /* Show when active */
    }

    .footer-content-wrapper {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .footer-col:first-child {
        order: -1; /* Move logo/description to top */
    }

    .footer-logo {
        text-align: center;
    }
    .footer-description {
        text-align: center;
    }
    .footer-nav {
        align-items: center; /* Center footer nav links */
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
