:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --text-color: #000000;
    --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
}

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

/* Header Styles */
.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.2);
    background-color: var(--secondary-color); /* Fallback, specific colors for sections below */
    box-sizing: border-box;
    overflow-x: hidden;
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Darker primary for top bar */
    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 {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    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: 10px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-register {
    background-color: var(--login-button-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(234, 124, 7, 0.4);
}

.btn-login {
    background-color: #4CAF50; /* A contrasting color for login */
    color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #1F8FC4; /* Slightly different shade of primary */
    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;
    overflow-x: auto; /* Allow horizontal scroll if many items */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.nav-container::-webkit-scrollbar { /* Chrome, Safari, Opera */
    display: none;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.hamburger-menu {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

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

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

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

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

.mobile-nav-buttons {
    display: none; /* Hidden by default, shown on mobile */
    box-sizing: border-box;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    background-color: #1A7FB0; /* Another shade for distinction */
    width: 100%;
    padding: 0 15px; /* Default padding for desktop if shown */
}

/* Footer Styles */
.site-footer {
    background-color: #333;
    color: #f0f0f0;
    padding: 40px 20px 20px;
    font-size: 14px;
}

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

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

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

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

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

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

.footer-nav a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-dynamic-col .footer-slot-anchor-inner {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
}

.footer-dynamic-row {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.footer-dynamic-row .footer-slot-anchor-inner {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

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

.footer-bottom p {
    margin: 0;
    color: #aaa;
}

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

    .site-header {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .header-top {
        min-height: 60px;
        height: 60px;
        padding-left: 15px; /* Add padding to accommodate hamburger */
    }

    .header-container {
        padding: 0 15px;
        justify-content: space-between;
        max-width: none;
        width: 100%;
        position: relative; /* For absolute logo centering */
    }

    .hamburger-menu {
        display: block;
        order: -1; /* Place it at the beginning of flex items */
        margin-right: auto; /* Push logo and buttons away */
    }

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

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        height: auto; /* Allow content to dictate height */
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 8px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap; /* Keep buttons in one line */
        justify-content: center; /* Center buttons if less than 2 */
    }

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

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        bottom: 0;
        width: 70%;
        max-width: 300px;
        background-color: #1F8FC4; /* Same as desktop main-nav */
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    }

    .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;
        width: 100%;
        max-width: none;
    }

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 16px;
    }

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

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

    .footer-col {
        margin-bottom: 30px;
    }

    .footer-dynamic-row {
        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%;
    }
    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;
  }
}
