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

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: 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(--background-color); /* Fallback, specific sections define their own */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--border-color); /* Dark brown/gold for header top */
    width: 100%;
    padding: 0 20px; /* Default padding for 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;
}

.logo {
    color: var(--text-main);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    display: block;
    line-height: 1;
}

.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(--card-bg); /* Darker background for mobile buttons */
    padding: 10px 20px;
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--card-bg); /* Dark grey for main nav */
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.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;
    padding: 0 20px;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--button-gradient);
    color: #0A0A0A; /* Text color for buttons, contrast with gold */
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 15px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

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

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

.footer-col-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

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

.footer-description {
    color: rgba(255, 246, 214, 0.7);
    line-height: 1.8;
    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: rgba(255, 246, 214, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(58, 42, 18, 0.5);
    color: rgba(255, 246, 214, 0.6);
}

.footer-bottom p {
    margin: 0;
}

.footer-slot-anchor-inner {
    min-height: 10px; /* Ensure anchor is visible for inspection */
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
    }
    
    .header-top {
        min-height: 60px;
        height: 60px;
        padding: 0 15px;
        justify-content: flex-start; /* Align hamburger to start */
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0;
        position: relative; /* For logo absolute positioning */
    }

    .hamburger-menu {
        display: block;
        margin-right: auto; /* Push logo to center */
        flex-shrink: 0;
    }

    .logo {
        flex: 1; /* Take remaining space */
        display: flex !important; /* Force flex for centering */
        justify-content: center !important;
        align-items: center !important;
        position: absolute; /* Absolute positioning for better centering */
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Account for hamburger and potential right-side element */
    }

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

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

    .mobile-nav-buttons {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* 50% minus half of the gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
    }

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Below fixed header */
        left: 0;
        width: 100%;
        height: calc(100% - var(--header-offset));
        background-color: var(--background-color);
        overflow-y: auto;
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease;
        z-index: 999;
        padding: 20px 0;
        border-top: none;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        font-size: 18px;
        border-bottom: 1px solid rgba(58, 42, 18, 0.5);
    }

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

    .site-header .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 998;
    }
    
    .site-header .overlay.active {
        display: block;
    }

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

    .footer-col {
        text-align: center;
    }

    .footer-col-title {
        margin-bottom: 10px;
    }

    .footer-nav {
        margin-bottom: 20px;
    }

    .footer-nav li {
        display: inline-block;
        margin: 0 10px 5px 0;
    }

    .footer-nav a {
        font-size: 13px;
    }

    .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.no-scroll {
    overflow: 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;
  }
}
