/* Shared CSS for Header and Footer */
:root {
    --primary-color: #F2C14E;
    --accent-color: #FFD36B;
    --card-bg: #111111;
    --body-bg: #0A0A0A;
    --text-main: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --header-offset: 122px;
}

html {
    scroll-behavior: smooth;
}

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

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-height: 60px; /* Base min-height for header */
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    width: 100%;
}

.logo {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
    display: block;
    padding: 5px 0;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    z-index: 2;
}

.main-nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--glow-color);
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

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

.btn {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #3A2A12;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

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

.footer-col h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    margin-top: 8px;
}

.footer-about .footer-logo {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    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: 10px;
}

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

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

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

.footer-slot-anchor-inner {
    min-height: 10px; /* Ensure anchor is visible for content injection */
    width: 100%;
}

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

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

    /* Mobile Header */
    .site-header {
        min-height: 50px;
    }

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

    .hamburger-menu {
        display: block;
        font-size: 24px;
        z-index: 1001;
        position: relative;
    }

    .hamburger-menu.active::before {
        content: '\2715'; /* 'X' icon */
    }

    .hamburger-menu.active {
        color: var(--accent-color);
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        padding: 0;
        max-width: calc(100% - 140px); /* Adjust based on button/hamburger width */
    }

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 75%;
        height: calc(100% - var(--header-offset));
        background-color: var(--card-bg);
        padding: 20px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        overflow-y: auto;
        align-items: flex-start;
    }

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

    .main-nav .nav-link {
        padding: 15px 20px;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

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

    .mobile-nav-buttons {
        display: flex !important;
        gap: 8px;
        flex-shrink: 0;
        z-index: 1000; /* Ensure buttons are above main-nav when main-nav is hidden */
    }

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

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    body.no-scroll {
        overflow: hidden;
    }

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

    .footer-col {
        text-align: center;
    }

    .footer-col h3::after {
        margin-left: auto;
        margin-right: auto;
    }

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