:root {
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
    --primary-color: #2F6BFF;
    --accent-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --site-bg: #F4F7FB;
    --text-main: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
}

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

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px; /* Fixed height for desktop */
    display: flex;
    align-items: center;
    background-color: #2258E0; /* Darker blue, contrasting with main-nav */
    color: #FFFFFF;
    overflow: hidden;
}

.header-container {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative; /* Required for absolute positioning of logo on mobile */
}

.logo {
    color: #FFFFFF;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    display: flex; /* For potential img logo alignment */
    align-items: center;
}

.logo img {
    display: block;
    max-height: 60px; /* Matches 68px header-top height */
    height: auto;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.desktop-nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Mobile buttons are hidden by default on desktop */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop, shown via media query on mobile */
    min-height: 48px; /* Placeholder min-height if it were visible */
    background-color: var(--site-bg); /* Use a neutral background */
    padding: 0 20px;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px; /* Fixed height for desktop */
    display: flex; /* Desktop default: visible */
    align-items: center;
    background-color: var(--accent-color); /* Lighter blue, contrasting with header-top */
    color: #FFFFFF;
    overflow: hidden;
    width: 100%;
}

.nav-container {
    box-sizing: border-box;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Desktop default: horizontal */
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    flex-wrap: nowrap;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

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

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

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

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

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

.mobile-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Buttons */
.btn {
    background: var(--button-gradient);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 40px 0 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.footer-col-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.footer-about .footer-logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}

.footer-about .footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.footer-nav li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.footer-nav li a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 0;
}

/* Footer slot anchors - must be visible */
.footer-slot-anchor,
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure visibility for injection */
    display: block;
}

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

    body {
        overflow-x: hidden;
    }

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

    .header-top {
        min-height: 60px;
        height: 60px; /* Fixed height for mobile */
        padding: 0 15px; /* Adjust padding for mobile */
    }

    .header-container {
        width: 100%;
        max-width: none; /* Remove max-width for mobile */
        padding: 0;
        justify-content: space-between; /* Hamburger left, logo center, space right */
    }

    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: calc(100% - 100px); /* Account for hamburger width */
        font-size: 24px;
    }

    .logo img {
        max-height: 56px !important; /* Matches 60px header-top height */
    }

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

    .hamburger-menu {
        display: block; /* Show on mobile */
        order: -1; /* Place to the left */
        z-index: 1001;
        padding-left: 0;
    }
    .hamburger-menu .bar {
        background-color: #FFFFFF;
    }

    .mobile-nav-buttons {
        display: flex !important; /* Show on mobile */
        min-height: 48px;
        height: auto; /* Allow height to adjust if text wraps */
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 8px 15px; /* Reduced padding for mobile */
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--site-bg);
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* Two buttons with 10px gap */
        box-sizing: border-box;
        padding: 8px 12px; /* Smaller padding for mobile buttons */
        font-size: 13px; /* Smaller font for mobile buttons */
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        height: auto; /* Allow buttons to expand height for wrapped text */
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%; /* Adjust width for mobile menu */
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: var(--primary-color);
        flex-direction: column; /* Vertical menu */
        align-items: flex-start;
        padding: 20px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        z-index: 1001; /* Above overlay */
        overflow-y: auto;
    }

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

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px;
        width: 100%;
        max-width: none; /* Remove max-width for mobile */
    }

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

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

    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
    }

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

    .footer-col-title {
        margin-top: 20px;
    }

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

    .footer-nav li a {
        text-align: center;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
