:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --card-bg: #111111;
    --site-bg: #0A0A0A;
    --text-main: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --header-offset: 122px;
}

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

/* Shared Header Styles */
.site-header {
    background-color: var(--site-bg);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    min-height: 60px; /* Ensure minimum height for content */
    display: flex;
    align-items: center;
}

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

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

.main-nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    color: var(--site-bg);
    background: var(--button-gradient);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(242, 193, 78, 0.6);
}

.login-btn {
    background: linear-gradient(180deg, #DDA11D 0%, #F2C14E 100%);
    color: #0A0A0A;
    box-shadow: 0 4px 10px rgba(221, 161, 29, 0.4);
}

.login-btn:hover {
    box-shadow: 0 6px 15px rgba(221, 161, 29, 0.6);
}

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

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

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

.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.7);
    z-index: 999;
}

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

.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 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 15px;
}

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

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

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

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: #BBB;
    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: #AAA;
}

.footer-bottom p {
    margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px;
    }

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

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

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

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

    .logo {
        order: 2;
        flex: 1;
        text-align: center;
        margin-right: 0; /* Adjust margin for centering */
        font-size: 24px;
    }

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

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

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 75%;
        max-width: 300px;
        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%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        align-items: flex-start;
    }

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

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

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

    .mobile-menu-overlay {
        display: none;
    }

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

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

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

    .footer-col:last-child {
        margin-bottom: 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
