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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #FFF6D6; /* Text Main */
    background-color: #0A0A0A; /* Background */
    padding-top: var(--header-offset); /* Important for fixed header */
    overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
    color: #F2C14E; /* Primary color for links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Header Offset */
:root {
    --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px safety */
}

/* Site Header - Fixed Navigation */
.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: transparent; /* Background for entire header, individual sections will have solid colors */
    overflow-x: hidden; /* Prevent header overflow on mobile */
}

/* Header Top Section */
.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    background-color: #1A1A1A; /* Darker background */
    width: 100%;
    position: relative; /* For mobile hamburger/logo positioning */
    padding-left: 15px; /* Default padding for mobile, overridden by container on desktop */
    padding-right: 15px; /* Default padding for mobile, overridden by container on desktop */
}

.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; /* Desktop padding */
}

/* Logo Styling */
.logo {
    font-size: 28px;
    font-weight: bold;
    color: #F2C14E; /* Primary color for logo text */
    text-transform: uppercase;
    text-decoration: none;
    display: block; /* Ensure it's block-level for sizing/alignment */
    white-space: nowrap; /* Prevent logo text from wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px; /* Limit logo width on desktop */
}
.logo:hover {
    text-decoration: none;
    color: #FFD36B; /* Accent color on hover */
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1002; /* Above logo and buttons */
    padding: 0;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFF6D6; /* Text Main */
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

/* Hamburger active state (X icon) */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
    display: flex; /* Visible on desktop */
    gap: 12px;
    align-items: center;
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px; /* Fixed height for mobile */
    background-color: #2A2A2A; /* Same as main-nav for consistency */
    width: 100%;
    padding: 10px 15px; /* Mobile padding */
    justify-content: center; /* Center buttons */
    align-items: center;
    overflow: hidden; /* Prevent button overflow */
}

/* Main Navigation */
.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex; /* Visible on desktop */
    align-items: center;
    background-color: #2A2A2A; /* Slightly lighter dark background */
    width: 100%;
    transition: transform 0.3s ease; /* For mobile slide-in/out */
}

.nav-container {
    box-sizing: border-box;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center; /* Center nav links */
    align-items: center;
    padding: 0 20px;
    flex-wrap: nowrap; /* Prevent nav items from wrapping on desktop */
}

.nav-link {
    color: #FFF6D6; /* Text Main */
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap; /* Prevent nav links from wrapping */
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.nav-link:hover, .nav-link.active {
    color: #1A1A1A; /* Dark text on hover */
    background-color: #F2C14E; /* Primary color background on hover */
    text-decoration: none;
}

/* General Button Styling */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    color: #1A1A1A; /* Dark text for buttons */
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4); /* Glow effect */
}

.btn:hover {
    background: linear-gradient(180deg, #FFD36B 0%, #F2C14E 100%); /* Slightly brighter on hover */
    box-shadow: 0 6px 15px rgba(242, 193, 78, 0.6);
    text-decoration: none;
}

/* 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;
}

/* Footer Styling */
.site-footer {
    background-color: #111111; /* Card BG */
    color: #FFF6D6; /* Text Main */
    padding: 40px 20px 20px;
    font-size: 14px;
    border-top: 1px solid #3A2A12; /* Border */
}

.site-footer a {
    color: #F2C14E; /* Primary color for footer links */
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

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

.footer-col {
    padding: 10px 0;
    position: relative; /* For slot anchors */
}

.footer-col h3 {
    font-size: 18px;
    color: #FFD36B; /* Accent color for headings */
    margin-bottom: 15px;
    white-space: nowrap;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #F2C14E; /* Primary color for logo text */
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

.footer-description {
    line-height: 1.8;
    color: #FFF6D6; /* Text Main */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.footer-nav a {
    display: block;
    color: #FFF6D6; /* Text Main */
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #F2C14E; /* Primary color on hover */
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #3A2A12; /* Border */
    padding-top: 20px;
    margin-top: 20px;
    color: #FFF6D6; /* Text Main */
}

.footer-bottom p {
    margin: 0;
}

/* Footer Slot Anchors - ensure they don't affect layout */
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure it takes up minimal space */
    display: block;
}

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

    body {
        overflow-x: hidden;
    }

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

    /* Header Top Mobile */
    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 15px; /* Adjust padding for mobile */
        display: flex; /* Ensure flex for alignment */
        justify-content: space-between; /* Hamburger left, Logo center, space right */
        align-items: center;
    }

    .header-container {
        width: 100%;
        max-width: none; /* Remove max-width for mobile */
        padding: 0; /* Remove internal padding, handled by header-top */
        position: relative; /* For absolute logo positioning */
        justify-content: flex-start; /* Adjust to allow hamburger on left */
    }

    .hamburger-menu {
        display: block; /* Show hamburger menu on mobile */
        order: 0; /* Place hamburger first */
        margin-right: 15px; /* Space between hamburger and logo */
    }

    .logo {
        flex: 1 !important; /* Take remaining space */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        order: 1; /* Place logo second */
        font-size: 24px; /* Adjust logo size */
        max-width: calc(100% - 90px); /* Adjust max-width to leave space for hamburger and potential right-side element */
        margin: 0; /* Reset margin */
        position: absolute; /* Absolute positioning for better centering */
        left: 50%;
        transform: translateX(-50%);
        height: 100%; /* Ensure logo div takes full height for vertical centering */
    }

    /* Placeholder for right side to balance logo if needed */
    .header-container::after {
        content: '';
        width: 30px; /* Match hamburger width for visual balance */
        order: 2;
    }

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

    /* Mobile Navigation Buttons */
    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        background-color: #2A2A2A; /* Same as main-nav */
        padding: 8px 15px; /* Adjusted padding */
        gap: 10px;
        flex-wrap: nowrap; /* Prevent wrapping */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

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

    /* Main Navigation Mobile */
    .main-nav {
        display: none; /* Hidden by default, shown with JS active class */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 75%; /* Slide-in width */
        max-width: 300px; /* Max width for slide-in menu */
        height: calc(100% - var(--header-offset)); /* Full height below header */
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        background-color: #111111; /* Card BG for mobile menu */
        transform: translateX(-100%); /* Start off-screen */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        overflow-y: auto; /* Scroll for long menus */
        z-index: 1001; /* Above overlay */
        padding-top: 20px;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid #3A2A12; /* Border */
        margin-bottom: 0; /* Reset margin */
        font-size: 16px;
    }

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

    /* Footer Mobile */
    .site-footer {
        padding: 30px 15px 15px;
    }

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

    .footer-col h3 {
        margin-top: 15px;
        margin-bottom: 10px;
    }

    .footer-col:first-child h3 {
        margin-top: 0;
    }

    .footer-bottom {
        padding-top: 15px;
        margin-top: 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
