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

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    color: var(--text-main-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden; /* Added for mobile overflow protection */
}

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

/* Header Top Section */
.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Using primary for header top */
    width: 100%;
}

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

.logo {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--card-bg); /* White for contrast */
    text-decoration: none;
    white-space: nowrap;
}

.logo:hover {
    color: var(--secondary-color);
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--card-bg);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

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

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

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

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

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop, shown on mobile */
    min-height: 48px;
    background-color: var(--background-color); /* Different background for mobile buttons */
    width: 100%;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Main Navigation Section */
.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex; /* Desktop default: flex */
    align-items: center;
    overflow: hidden;
    background-color: var(--secondary-color); /* Using secondary for main nav */
    width: 100%;
}

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

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.nav-list a {
    color: var(--card-bg); /* White for contrast */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 0;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-list a:hover {
    color: var(--glow-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    color: var(--card-bg); /* White text for buttons */
    background: var(--button-gradient);
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* Overlay for mobile menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Footer */
.site-footer {
    background-color: var(--text-main-color); /* Dark background for footer */
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0 20px;
    font-size: 14px;
}

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

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

.footer-logo {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--card-bg); /* White for contrast */
    text-decoration: none;
    margin-bottom: 15px;
}

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

.footer-description {
    margin: 0;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-title {
    color: var(--card-bg); /* White title */
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.footer-bottom p {
    margin: 0;
}

/* Dynamic Slot Anchors */
.footer-slot-anchor-inner {
    /* Ensures visibility for injected content */
    min-height: 1px;
    min-width: 1px;
    margin-top: 10px; /* Some spacing if content is injected */
}

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

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

    /* Header adjustments */
    .header-top {
        min-height: 60px;
        height: 60px;
        padding: 0 15px;
        justify-content: space-between;
    }

    .header-container {
        padding: 0;
        flex-grow: 1; /* Allow container to grow */
    }

    .logo {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 24px;
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: -1; /* Place hamburger to the left */
        margin-right: auto; /* Push logo to center */
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        align-items: center;
        justify-content: center; /* Center buttons horizontally */
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Smaller padding for mobile */
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--background-color); /* Matches body background */
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* Account for gap */
        box-sizing: border-box;
        padding: 8px 12px; /* Smaller padding */
        font-size: 13px; /* Smaller font size */
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
    }

    .main-nav {
        position: fixed; /* Fixed position for mobile menu */
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        height: calc(100% - var(--header-offset));
        width: 250px;
        background-color: var(--text-main-color); /* Dark background for mobile menu */
        flex-direction: column; /* Vertical layout */
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 20px;
        transform: translateX(-100%); /* Hidden by default */
        transition: transform 0.3s ease;
        display: none; /* Hidden by default, toggled by JS */
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

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

    .nav-container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list a {
        padding: 15px 20px;
        display: block;
        color: var(--card-bg); /* White text */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-list a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Footer adjustments */
    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        padding: 0 15px;
    }

    /* Mobile overflow protection */
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
