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

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

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

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px; /* Base for main nav */
}

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

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

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

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

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

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

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

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

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: var(--button-gradient);
    color: #333;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.btn-login {
    color: var(--text-main-color); /* Adjusted for better contrast */
}

.btn-register {
    color: var(--text-main-color); /* Adjusted for better contrast */
}

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

.footer-main-content {
    padding: 20px 0;
}

.site-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

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

.footer-description {
    color: var(--text-main-color);
    line-height: 1.6;
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

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

.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure visibility for potential injected content */
    margin-top: 10px; /* Provide some spacing */
}

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

    .header-container {
        width: 100%;
        max-width: none; /* Crucial for mobile full width */
        padding: 0 15px;
        justify-content: space-between; /* Distribute items */
    }

    .hamburger-menu {
        display: block;
        order: 0; /* Leftmost */
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        order: 1; /* Center */
        padding: 0;
    }

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

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

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

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

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

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

    .mobile-nav-buttons {
        display: flex !important;
        order: 2; /* Rightmost */
        gap: 8px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .hamburger-menu.active .hamburger-icon:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .hamburger-icon:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .hamburger-icon:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

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

    body.no-scroll {
        overflow: hidden;
    }

    .site-footer .footer-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

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

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