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

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

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

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

.logo {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    flex-shrink: 0;
    display: block;
    text-shadow: 0 0 8px var(--glow-color);
}

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

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

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

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

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

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--button-gradient);
    color: #000000; /* Ensure high contrast for button text */
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

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

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

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

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

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

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

.footer-logo {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 15px;
    text-shadow: 0 0 8px var(--glow-color);
}

.footer-description {
    font-size: 0.9em;
    line-height: 1.6;
    color: #ccc;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 15px;
}

.footer-heading {
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

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

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

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    font-size: 0.85em;
    color: #888;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
}

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

    .site-header {
        min-height: 60px; /* Adjust for mobile header height */
    }

    .header-container {
        padding: 10px 15px;
        width: 100%;
        max-width: none; /* Crucial: Do not limit max-width on mobile */
        justify-content: space-between;
        position: relative; /* For absolute positioning of logo if needed */
    }

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

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

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        order: 1; /* Center */
        text-align: center; /* For text logo */
        font-size: 1.8em;
    }

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

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Start below the header */
        left: 0;
        width: 80%;
        height: calc(100% - var(--header-offset));
        background-color: #1a1a1a; /* Darker background for mobile menu */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        padding: 20px;
        transform: translateX(-100%); /* Slide out from left */
        transition: transform 0.3s ease;
        overflow-y: auto;
        align-items: flex-start;
        gap: 15px;
    }

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

    .main-nav .nav-link {
        font-size: 1.2em;
        padding: 10px 0;
        width: 100%;
        border-bottom: 1px solid #333;
    }

    .main-nav .nav-link::after {
        display: none;
    }

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

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

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 100%;
        height: calc(100% - var(--header-offset));
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 999;
        transition: opacity 0.3s ease;
        opacity: 0;
    }

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

    .footer-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .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;
  }
}
