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

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--site-bg);
    padding-top: var(--header-offset);
    overflow-x: hidden;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.header-top {
    box-sizing: border-box;
    height: 68px;
    min-height: 68px;
    background-color: var(--card-bg); /* Darker background for top bar */
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

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

.logo {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    display: block; /* Ensure it's not inline for flex behavior */
}

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

.btn {
    background: var(--button-gradient);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.main-nav {
    box-sizing: border-box;
    height: 52px;
    min-height: 52px;
    background-color: var(--primary-color); /* Lighter background for nav bar */
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

.nav-container {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    white-space: nowrap;
    font-size: 16px;
}

.nav-link:hover,
.nav-link.active {
    color: #FFFFFF;
    border-bottom: 2px solid #FFFFFF;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Above logo on mobile */
}

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

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    transition: opacity 0.3s ease;
    opacity: 0;
}

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

/* Footer Styles */
.site-footer {
    background-color: var(--site-bg);
    color: var(--text-main);
    padding: 40px 20px 20px;
    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 40px;
}

.footer-col {
    margin-bottom: 20px; /* For mobile stacking */
}

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

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

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    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 li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    display: block;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 30px;
}

.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure visibility for potential content injection */
}

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

    .header-top {
        height: 60px !important;
        min-height: 60px !important;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: flex-start; /* Align hamburger left */
        position: relative;
    }

    .hamburger-menu {
        display: flex;
        order: -1; /* Place to the left */
        margin-right: auto; /* Push logo to center */
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 70px); /* Account for hamburger width */
    }

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--card-bg);
        justify-content: center;
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px);
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 280px; /* Width of the slide-out menu */
        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%); /* Start off-screen */
        transition: transform 0.3s ease-out;
        z-index: 1001;
        overflow-y: auto;
        align-items: flex-start;
        gap: 15px;
    }

    .main-nav.active {
        display: flex; /* Show 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;
        height: auto;
    }

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

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

    .site-footer {
        padding: 30px 15px 15px;
    }

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

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