:root {
    --header-offset: 122px;
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --bg-color: #0A0A0A;
    --card-bg-color: #111111;
    --text-main-color: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-main-color);
    padding-top: var(--header-offset);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: var(--card-bg-color); /* Darker background for the fixed header */
    box-sizing: border-box;
}

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

.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: var(--primary-color);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.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 for desktop */
    min-height: 48px;
    width: 100%;
    background-color: var(--bg-color);
}

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

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

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav ul li a {
    color: var(--text-main-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    padding: 10px 0;
    display: block;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-color);
}

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

.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before, .hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    top: -7px;
}

.hamburger-icon::after {
    top: 7px;
}

.hamburger-menu.active .hamburger-icon {
    background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-7px) rotate(-45deg);
}

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

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

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

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

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

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

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.footer-nav li a {
    color: var(--text-main-color);
    text-decoration: none;
    font-size: 14px;
    line-height: 2.2;
    transition: color 0.3s ease;
}

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

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

.footer-bottom a { /* Ensure no links in footer-bottom */
    display: none !important;
}

/* Footer dynamic slots - ensure visibility */
.footer-slot-anchor-inner, .footer-slot-anchor-outer {
    min-height: 1px; /* Ensure they are not completely collapsed */
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px;
    }

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 15px; /* Smaller padding for mobile */
    }

    .header-container {
        max-width: none; /* No max-width on mobile */
        padding: 0; /* Handled by header-top */
        position: relative; /* For logo centering */
    }

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

    .logo img {
        max-height: 56px !important;
        max-width: 100%;
        height: auto;
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-color);
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        align-items: center;
        justify-content: center; /* Center buttons if less than 2 */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        border-top: 1px solid var(--border-color);
    }

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

    .main-nav {
        min-height: auto; /* Auto height for expanded menu */
        height: auto; /* Auto height for expanded menu */
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 75%; /* Slide-in menu width */
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: var(--card-bg-color); /* Menu background */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%); /* Slide out */
        transition: transform 0.3s ease;
        overflow-y: auto;
        border-top: none; /* Remove border from desktop */
    }

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

    .nav-container {
        max-width: none; /* No max-width on mobile */
        padding: 20px 15px;
        flex-direction: column;
        align-items: flex-start;
        height: auto; /* Allow content to dictate height */
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .main-nav ul li a {
        padding: 12px 10px;
        font-size: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav ul li:last-child a {
        border-bottom: none;
    }

    .site-header .header-top .header-container .logo {
        flex-grow: 1;
        text-align: center;
    }

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

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

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

    .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.no-scroll {
    overflow: 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;
}
