:root {
    --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px (safety) */
    --primary-color: #C91F17;
    --secondary-color: #E53935;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
    --card-bg: #D32F2F;
    --background-color: #B71C1C;
    --text-main-color: #FFF5E1;
    --border-color: #F2B544;
    --glow-color: #FFCC66;
    --gold-color: #F4D34D;
    --deep-red-color: #7A0E0E;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.header-top {
    background-color: var(--deep-red-color); /* Contrasting with main-nav */
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px; /* Adjusted padding */
    height: 100%;
    box-sizing: border-box;
}

.logo {
    color: var(--text-main-color);
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    padding: 0;
    display: block; /* Ensure logo is block-level for consistent spacing */
}

.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(--primary-color); /* Match main nav or a complementary color */
    justify-content: center; /* Center buttons horizontally */
    align-items: center;
    padding: 0 15px;
}

.main-nav {
    background-color: var(--primary-color); /* Main navigation background */
    min-height: 52px;
    height: 52px;
    display: flex; /* Display flex by default for desktop */
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

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

.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: 8px 0;
    white-space: nowrap;
    transition: color 0.3s ease;
}

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

.btn {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: var(--button-gradient);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 10px var(--glow-color) inset;
    color: #333;
}

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

/* Hamburger menu for mobile */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    padding: 0;
    margin-right: 15px; /* Spacing from logo */
}

.hamburger-icon {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--text-main-color);
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
}

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

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

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

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

.hamburger-menu.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
    top: 0;
    transform: 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;
}

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

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

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

.footer-col ul li a {
    color: var(--text-main-color);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--gold-color);
}

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

.footer-description {
    margin-top: 10px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-bottom {
    text-align: center;
    padding: 20px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.footer-bottom p {
    margin: 0;
    color: var(--text-main-color);
}

/* Dynamic slot anchors - ensure they are visible for content injection */
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure visibility for layout purposes */
}

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

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

    .header-container {
        padding: 0 15px;
        justify-content: space-between; /* Keep space-between for hamburger and logo */
        position: relative; /* For logo centering */
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px; /* Adjust font size for mobile */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Leave space for hamburger */
    }

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

    .hamburger-menu {
        display: block; /* Show hamburger menu on mobile */
        order: -1; /* Place hamburger first */
        margin-right: 0; /* Remove right margin */
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        gap: 10px;
        flex-wrap: nowrap; /* Ensure buttons stay in one line */
        justify-content: center;
        align-items: center;
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* Account for gap */
        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 for mobile, controlled by JS */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: var(--primary-color);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-sizing: border-box;
    }

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

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

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

    .main-nav ul li a {
        font-size: 16px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

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

    .footer-top-grid {
        grid-template-columns: 1fr;
        padding: 0 15px 30px;
    }

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

    .footer-bottom {
        padding: 20px 15px 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;
}
