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

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

/* Base styles for header */
.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);
    background-color: var(--card-bg);
}

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

.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 {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px var(--glow-color);
    height: 100%;
}

.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);
    border-bottom: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    color: var(--card-bg); /* Text color for buttons */
    background: var(--button-gradient);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--card-bg);
}

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

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

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    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); }

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

.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-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.nav-list a {
    display: block;
    padding: 10px 0;
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

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

.overlay.visible {
    display: block;
    opacity: 1;
}

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

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

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

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

.footer-description {
    color: #CCC;
    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: 8px;
}

.footer-nav a {
    color: #CCC;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    color: #AAA;
}

.footer-bottom p {
    margin: 0;
}

.footer-slot-anchor-inner {
    /* Ensures visibility for injected content */
    min-height: 1px; 
}

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

    body {
        overflow-x: hidden;
    }

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

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

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: space-between;
        position: relative; /* For logo centering */
    }

    .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 and potential right-side element */
        font-size: 24px;
    }

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        justify-content: center; /* Center buttons horizontally */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 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;
    }

    .hamburger-menu {
        display: block;
        order: -1; /* Place it to the left */
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 70%; /* Adjust as needed */
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: var(--card-bg);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        overflow-y: auto;
        min-height: 48px !important;
        height: auto; /* Allow height to adjust to content */
    }

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

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

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list a {
        padding: 15px 10px;
        font-size: 16px;
        width: 100%;
    }
    .nav-list a::after {
        bottom: 0;
    }

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

    .footer-col h3 {
        margin-top: 20px;
    }
    .footer-col:first-child h3 {
        margin-top: 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
