:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --background-color: #0A0A0A;
    --card-bg-color: #111111;
    --text-main-color: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --header-offset: 122px; /* Desktop without marquee: 68px (top-bar) + 52px (main-nav) + 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;
}

body.no-scroll {
    overflow: hidden;
}

/* Shared container styles */
.header-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
    display: flex;
    align-items: center;
}

/* Header Styles */
.site-header {
    background-color: var(--background-color);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    min-height: 68px; /* Based on header-top height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-header .header-container {
    min-height: 52px; /* Based on main-nav height */
}

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

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

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #333;
    box-shadow: 0 4px 10px rgba(255, 211, 107, 0.4);
}

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

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

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

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

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
    order: 1;
}

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

.hamburger-icon::before, .hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main-color);
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.hamburger-menu.active .hamburger-icon {
    background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
    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.7);
    z-index: 998;
    transition: opacity 0.3s ease;
    opacity: 0;
}

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

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

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

.site-footer .footer-main-content {
    margin-bottom: 40px;
}

.site-footer .footer-container {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
    word-wrap: break-word;
}

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

.footer-description {
    color: var(--text-main-color);
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.site-footer .footer-nav .nav-link {
    color: var(--text-main-color);
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
}

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

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

.footer-bottom .footer-container {
    justify-content: center;
    padding: 0 30px;
}

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

    .header-container {
        width: 100%;
        max-width: none;
        padding-left: 15px;
        padding-right: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 60px; /* Adjusted for mobile header height */
    }

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

    .hamburger-menu {
        display: block;
        order: 1;
    }

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 280px;
        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%); /* Slide out of view */
        transition: transform 0.3s ease;
        z-index: 999;
        align-items: flex-start;
        overflow-y: auto;
        gap: 15px;
    }

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

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

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

    .site-footer .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 15px;
        gap: 40px;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }

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