:root {
    --header-offset: 122px;
}

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

.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);
    box-sizing: border-box;
}

.header-top {
    background-color: #000000; /* Custom color for top bar */
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    display: block; /* Ensure it's a block for flex alignment */
    line-height: 1;
}

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

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

.btn-login {
    background-color: #EA7C07; /* Custom color for login */
    color: #FFFFFF;
    border: 1px solid #EA7C07;
}

.btn-login:hover {
    background-color: #d66c06;
}

.btn-register {
    background-color: #26A9E0; /* Primary color for register */
    color: #FFFFFF;
    border: 1px solid #26A9E0;
}

.btn-register:hover {
    background-color: #1e87c2;
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px;
    background-color: #000000; /* Match header-top background */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

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

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

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

.main-nav {
    background-color: #26A9E0; /* Primary color for main nav */
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

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

.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.1);
    border-radius: 3px;
}

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

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

.site-footer {
    background-color: #000000; /* Custom color for footer */
    color: #CCCCCC;
    padding: 40px 20px 20px;
    box-sizing: border-box;
}

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

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

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

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

.footer-col ul li a:hover {
    color: #26A9E0;
}

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

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333333;
    padding-top: 20px;
    font-size: 13px;
    color: #999999;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-slot-anchor-inner {
    /* Placeholder for dynamic content */
    min-height: 10px;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px;
    }

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

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

    .site-header {
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

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

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

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

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: #000000; /* Match header-top background */
    }

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

    .main-nav {
        min-height: 48px !important;
        height: calc(100% - var(--header-offset)); /* Adjust height for mobile */
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 80%;
        max-width: 300px; /* Max width for mobile menu */
        background-color: #26A9E0;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease-out;
        z-index: 1001;
        overflow-y: auto;
    }

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

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 15px;
        width: 100%;
        max-width: none;
        height: auto; /* Allow content to dictate height */
    }

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

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

    .footer-top-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
    }

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

    .footer-col:last-of-type {
        margin-bottom: 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
