:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-btn-color: #C30808;
    --login-btn-color: #C30808;
    --btn-text-color: #FFFF00;
    --header-top-bg: var(--primary-color);
    --main-nav-bg: #F8F8F8; /* Light grey for contrast with dark text */
    --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    line-height: 1.6;
    color: #333;
    background-color: #FFFFFF;
    overflow-x: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: var(--secondary-color); /* Ensures a base color */
    box-sizing: border-box;
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--header-top-bg);
    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 25px;
}

.logo {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    display: block;
    line-height: 1;
}

.logo img {
    display: block;
    max-height: 60px;
    height: auto;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

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

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default for desktop */
    min-height: 48px;
    width: 100%;
    background-color: var(--header-top-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
    border: none;
}

.btn-register {
    background-color: var(--register-btn-color);
    color: var(--btn-text-color);
}

.btn-register:hover {
    background-color: #A00707;
    transform: translateY(-1px);
}

.btn-login {
    background-color: var(--login-btn-color);
    color: var(--btn-text-color);
}

.btn-login:hover {
    background-color: #A00707;
    transform: translateY(-1px);
}

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

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: 0.4s;
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--main-nav-bg);
    width: 100%;
}

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

.nav-link {
    color: #333333; /* Dark text for light background */
    text-decoration: none;
    padding: 10px 15px;
    font-weight: bold;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: #e0e0e0;
}

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

.site-footer {
    background-color: #333333; /* Dark footer background */
    color: #FFFFFF;
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.8;
    box-sizing: border-box;
}

.footer-top-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

.footer-col h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-col p {
    color: #CCCCCC;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-logo {
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 15px;
    display: block;
}

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

.footer-nav li a {
    color: #CCCCCC;
    text-decoration: none;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
    min-height: 1px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    text-align: center;
    border-top: 1px solid #555555;
    padding-top: 20px;
    color: #AAAAAA;
}

.footer-bottom p {
    margin: 0;
}

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

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        position: relative;
    }

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

    .logo img {
        max-height: 56px !important;
    }

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--header-top-bg);
    }

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

    .hamburger-menu {
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

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

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: var(--main-nav-bg);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        padding: 20px 0;
        box-sizing: border-box;
        z-index: 1000;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }

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

    .overlay.active {
        display: block;
    }

    .footer-cols {
        grid-template-columns: 1fr;
    }

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

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

    .footer-nav li a {
        display: inline-block;
        padding: 5px 10px;
    }

    .footer-bottom {
        padding-left: 15px;
        padding-right: 15px;
    }

    .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.no-scroll {
        overflow: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
