/* Global Styles */
:root {
    --primary-color: #FF8C1A;
    --secondary-color: #FFA53A;
    --card-bg: #17191F;
    --site-bg: #0D0E12;
    --text-main: #FFF3E6;
    --border-color: #A84F0C;
    --glow-color: #FFB04D;
    --deep-orange: #D96800;
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
}

html {
    scroll-behavior: smooth;
}

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

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: var(--site-bg); /* Use site-bg for overall header background */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--site-bg);
}

.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: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block; /* Ensure logo is visible on desktop */
}

.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);
    width: 100%;
}

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

.hamburger-menu .bar {
    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 .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

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

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

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    color: var(--text-main);
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 165, 58, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 165, 58, 0.6);
}

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

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

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

.footer-col h3 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
}

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

.footer-description {
    line-height: 1.6;
    color: var(--text-main);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    color: var(--text-main);
}

.footer-bottom p {
    margin: 0;
}

/* Footer Slot Anchors - Must remain empty for system injection */
.footer-slot-anchor-inner {
    /* Intentionally left empty */
}

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

    body {
        padding-top: var(--header-offset);
        overflow-x: hidden;
    }

    /* Mobile Header */
    .header-top {
        min-height: 60px;
        height: 60px;
        background-color: var(--site-bg);
    }

    .header-container {
        padding: 0 15px;
        width: 100%;
        max-width: none;
        justify-content: space-between;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
    }

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

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        justify-content: 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);
    }

    .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 */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-offset));
        background-color: var(--card-bg);
        flex-direction: column; /* Vertical layout */
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1000; /* Same as header or slightly less than hamburger */
    }

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

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

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 17px;
    }

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

    /* Mobile Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-col:last-child {
        margin-bottom: 0;
    }

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