:root {
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --card-bg: #111111;
    --bg-color: #0A0A0A;
    --text-main: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.site-header {
    background-color: var(--card-bg); /* Using card-bg for header background */
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-height: 68px; /* Adjusted based on typical top bar height */
    display: flex;
    align-items: center;
    padding: 10px 0; /* Vertical padding for header content */
}

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

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    flex-direction: column;
    gap: 4px;
}

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

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

.hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
}

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

.main-nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    position: static; /* Desktop default */
}

.main-nav .nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    border-bottom: 2px solid transparent;
}

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

.desktop-nav-buttons {
    display: flex; /* Always flex on desktop */
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent button text from wrapping */
    border: none;
    cursor: pointer;
    color: #000; /* Ensure text is visible on gradient */
}

.btn-login {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #111;
}

.btn-register {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #111;
}

.btn:hover {
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-2px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

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

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

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

.footer-description {
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 15px;
}

.footer-title {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
}

.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(--primary-color);
}

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

.footer-slot-anchor-inner {
    /* Ensures visibility for injected content */
    min-height: 1px; 
    min-width: 1px;
    display: block;
}

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

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

    .site-header {
        min-height: 60px;
        padding: 8px 0;
    }

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

    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
        order: 0;
    }

    .logo {
        flex: 1 !important; /* Allow logo to take available space */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        margin: 0 10px; /* Adjust margin for mobile */
    }

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

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

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

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        gap: 8px;
        order: 1;
        flex-shrink: 0;
    }

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

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

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

    .footer-logo {
        margin: 0 auto 15px auto;
    }

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

    .footer-nav {
        align-items: center;
    }

    .footer-nav li {
        text-align: center;
    }

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