/* General styles and resets */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #FFF3E6; /* Text Main */
    background-color: #0D0E12; /* Background */
    padding-top: var(--header-offset);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #FFF3E6; /* Text Main */
}
a:hover {
    color: #FFA53A; /* Auxiliary */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
    color: #FFF3E6; /* Text Main */
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn:hover {
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background-color: #0D0E12; /* Background color for the whole header */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #17191F; /* Card BG - distinct from main-nav */
    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 {
    font-size: 28px;
    font-weight: bold;
    color: #FFA53A; /* Auxiliary color for logo text */
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}
.logo img {
    display: block;
    max-height: 60px; /* Desktop max height */
    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; /* Placeholder height, will be visible on mobile */
    background-color: #0D0E12; /* Background */
    width: 100%;
    padding: 0 20px; /* Default padding for desktop, but display:none */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex; /* Desktop default: visible, horizontal */
    align-items: center;
    overflow: hidden;
    background-color: #FF8C1A; /* Primary color - distinct from header-top */
    width: 100%;
    padding: 0 20px; /* Default padding for desktop */
}

.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;
    gap: 25px;
}

.nav-link {
    color: #FFF3E6; /* Text Main */
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}
.nav-link:hover {
    color: #0D0E12; /* Background color for contrast */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002; /* Above logo */
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFF3E6; /* Text Main */
    position: relative;
    transition: background-color 0.3s ease;
}
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFF3E6; /* Text Main */
    position: absolute;
    transition: transform 0.3s ease;
}
.hamburger-icon::before {
    top: -8px;
}
.hamburger-icon::after {
    top: 8px;
}
.hamburger-menu.active .hamburger-icon {
    background-color: transparent;
}
.hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Footer styles */
.site-footer {
    background-color: #17191F; /* Card BG */
    color: #FFF3E6; /* Text Main */
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
}

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

.footer-col h3 {
    color: #FFA53A; /* Auxiliary */
    font-size: 18px;
    margin-bottom: 15px;
}

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

.footer-description {
    color: #FFF3E6; /* Text Main */
    margin-bottom: 15px;
    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: #FFF3E6; /* Text Main */
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: #FF8C1A; /* Primary */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #A84F0C; /* Border */
    color: #FFF3E6; /* Text Main */
}
.footer-bottom p {
    margin: 0;
}

.footer-slot-anchor-inner {
    min-height: 1px;
    min-width: 1px;
}
.footer-dynamic-col > .footer-slot-anchor-inner {
    display: block;
}

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

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

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

    .header-top {
        min-height: 60px;
        height: 60px;
        padding: 0 15px;
        justify-content: space-between;
    }

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

    .hamburger-menu {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .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% - 100px); /* Account for hamburger width */
        height: 100%;
        pointer-events: none;
    }
    .logo a {
        pointer-events: auto;
    }
    .logo img {
        max-height: 56px !important; /* Mobile max height */
    }

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

    .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: #0D0E12; /* Background */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }
    .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, activated by JS */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 80%;
        height: calc(100% - var(--header-offset));
        background-color: #17191F; /* Card BG */
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 20px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
        box-sizing: border-box;
    }
    .main-nav.active {
        display: flex; /* Show menu when active */
        transform: translateX(0);
    }

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

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-link:last-child {
        border-bottom: none;
    }

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

    .footer-col {
        text-align: center;
        margin-bottom: 20px;
    }
    .footer-col:last-of-type {
        margin-bottom: 0;
    }
    .footer-col h3 {
        margin-top: 20px;
    }
    .footer-nav {
        text-align: center;
    }

    /* 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
