:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --card-bg: #111111;
    --background-color: #0A0A0A;
    --text-main: #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;
    padding-top: var(--header-offset);
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--card-bg); /* Using card background for header for consistency */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px; /* Sufficient height for content */
}

.logo {
    font-family: 'Arial', sans-serif;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    flex-shrink: 0;
}

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

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

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

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

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

.mobile-nav-buttons {
    display: none !important; /* Hidden on desktop, important to override other rules */
}

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: var(--card-bg); /* Dark text on bright button */
    white-space: nowrap;
}

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

.btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 10px var(--glow-color);
}

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

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

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

.footer-col a {
    color: var(--text-main);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

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

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

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

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

/* Ensure footer slot anchors are visible and not hidden */
.footer-slot-anchor,
.footer-slot-anchor-inner {
    /* These elements are placeholders for dynamic content and should not be hidden by default */
    /* They will be populated by the system if needed */
    min-height: 1px; /* Ensure they take up at least some space if empty */
}

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

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

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

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

    .logo {
        flex: 1;
        text-align: center;
        font-size: 24px;
        display: block; /* Ensure logo is visible */
    }

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

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

    .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);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        padding: 20px;
        align-items: flex-start;
    }

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

    .main-nav .nav-link {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

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

    /* Prevent content overflow on mobile */
    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }
    body {
        overflow-x: hidden;
    }

    /* Footer Mobile Styles */
    .footer-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .footer-col a {
        display: inline-block;
        margin: 0 10px 8px;
    }

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

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