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

html {
    scroll-behavior: smooth;
}

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

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

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

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
    flex-shrink: 0;
    order: 1;
}

.logo {
    flex-shrink: 0;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0;
    order: 2;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--secondary-color);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    order: 3;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

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

.desktop-nav-buttons {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    gap: 10px;
    order: 4;
}

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

.btn {
    background: var(--btn-gradient);
    color: #000000; /* Dark text for bright button */
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    border: none;
    cursor: pointer;
}

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

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

.footer-slot-anchor {
    margin-bottom: 20px;
    min-height: 1px; /* Ensure anchor takes up space if content is injected */
}

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

.footer-col h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

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

.footer-description {
    line-height: 1.8;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: rgba(255, 246, 214, 0.8);
}

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

.footer-nav li, .footer-links li {
    margin-bottom: 10px;
}

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

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

.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure anchor is renderable */
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: rgba(255, 246, 214, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (main-nav) */
    }

    .site-header {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .header-container {
        width: 100%;
        max-width: none; /* Important: remove max-width */
        padding: 10px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger-menu {
        display: block; /* Visible on mobile */
        order: 1;
        z-index: 1001;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        order: 2;
        font-size: 24px;
        padding: 0 10px;
        text-align: center; /* Fallback for text logo */
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Visible on mobile */
        gap: 8px;
        order: 3;
        flex-shrink: 0;
    }

    .btn {
        padding: 8px 15px;
        font-size: 14px;
        min-width: unset;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 250px;
        height: calc(100% - var(--header-offset));
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 998;
        align-items: flex-start;
        gap: 15px;
    }

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

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 997;
    }

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

    body.no-scroll {
        overflow: hidden;
    }

    /* Footer mobile layout */
    .footer-main-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding-bottom: 30px;
    }

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

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

    .footer-nav ul, .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 15px;
    }

    .footer-nav li, .footer-links li {
        margin-bottom: 0;
    }

    .footer-bottom {
        padding-top: 15px;
    }

    /* Mobile content overflow prevention */
    .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;
  }
}
