:root {
    --primary-color: #E53935; /* Red */
    --secondary-color: #FF5A4F; /* Lighter Red/Orange */
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --background-color: #F5F7FA;
    --border-color: #E0E0E0;
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

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

body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg-color); /* Neutral background for the whole header before sections apply colors */
}

.header-top {
    box-sizing: border-box;
    height: 68px; /* Desktop fixed height */
    min-height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Distinct background for top area */
    width: 100%;
    padding: 0 20px; /* Default padding for desktop, adjusted by container */
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--card-bg-color); /* White text on primary background */
    text-transform: uppercase;
    display: block;
    padding: 0;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    color: var(--card-bg-color); /* White text for buttons */
    text-align: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.btn-login,
.btn-register {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border: 1px solid var(--primary-color);
}

.btn:hover {
    opacity: 0.9;
}

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

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--card-bg-color); /* White lines on primary background */
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

.main-nav {
    box-sizing: border-box;
    height: 52px; /* Desktop fixed height */
    min-height: 52px;
    display: flex; /* Desktop default: visible */
    align-items: center;
    overflow: hidden;
    background-color: var(--secondary-color); /* Distinct background for main nav */
    width: 100%;
    padding: 0 20px;
}

.nav-container {
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.nav-link {
    color: var(--card-bg-color); /* White text on secondary background */
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop, shown on mobile */
    min-height: 48px;
    background-color: var(--background-color); /* Neutral background */
    padding: 0 15px; /* Mobile specific padding */
}

.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; /* Below hamburger menu, above content */
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

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

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

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--card-bg-color);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

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

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

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

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

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner, .footer-slot-anchor-outer {
    min-height: 1px;
    width: 100%;
}

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

.footer-bottom p {
    margin: 0;
}

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

    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 Mobile Styles */
    .header-top {
        height: 60px !important;
        min-height: 60px !important;
        padding: 0 15px;
    }

    .header-container {
        max-width: none;
        padding: 0;
        justify-content: space-between;
    }

    .hamburger-menu {
        display: block;
        position: relative;
        z-index: 1001;
    }

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

    /* Mobile Logo Centering (Method 1 from prompt, applied to text logo for consistency) */
    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        color: var(--card-bg-color);
        text-transform: uppercase;
        font-weight: bold;
    }

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        height: 48px; /* Fixed height for mobile buttons */
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--background-color);
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 5px); /* 50% minus half of the gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Below fixed header and mobile buttons */
        left: 0;
        width: 70%;
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: var(--primary-color); /* Menu background */
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        padding: 20px 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        overflow-y: auto;
    }

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

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        gap: 15px;
        height: auto;
    }

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--card-bg-color);
    }

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

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

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

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