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

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--background-color);
    color: var(--text-main-color);
    line-height: 1.6;
    overflow-x: hidden; /* Global prevention for desktop as well */
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--background-color); /* Use specified background color */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
}

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

.main-nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 0 20px;
}

.nav-link {
    color: var(--text-main-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

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

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: var(--button-gradient);
    color: var(--border-color); /* Dark text for contrast on bright button */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

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

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

.footer-slot-anchor {
    margin-bottom: 20px;
}

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

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

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

.footer-description {
    color: #CCC;
    margin-top: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

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

.footer-slot-anchor-inner {
    /* Placeholder for content injection */
    min-height: 5px; /* Ensure visibility for debugging */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    color: #AAA;
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: 60px (top-bar) + 48px (main-nav) = 108px + 2px buffer */
    }

    .site-header {
        min-height: 50px;
    }

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

    .hamburger-menu {
        display: block;
        font-size: 24px;
        background: none;
        border: none;
        color: var(--text-main-color);
        cursor: pointer;
        padding: 5px;
        flex-shrink: 0;
        z-index: 1001;
        order: 1;
    }

    .logo {
        order: 2;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        padding: 0;
        margin: 0 10px;
    }
    .logo img {
      display: block !important;
      max-width: 100%;
      height: auto;
      max-height: 40px; /* Adjust as needed */
    }

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

    .main-nav.active {
        display: flex; /* Must be set to show menu */
        transform: translateX(0);
    }

    .nav-link {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

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

    .mobile-nav-buttons {
        order: 3;
        display: flex !important;
        flex-shrink: 0;
        gap: 8px;
        z-index: 1000;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 998;
    }

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

    body.no-scroll {
        overflow: hidden;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .footer-col h3 {
        margin-top: 15px;
    }

    /* 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;
  }
}
