:root {
    --primary-color: #0A246A;
    --secondary-color: #F3C500;
    --dark-blue-bg: #071C4B;
    --text-light: #ffffff;
    --text-dark: #0A246A;
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: header-top (60px) + mobile-nav-buttons (50px) */
    }
    .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 {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color); /* Primary color for the whole header background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.header-top {
    background-color: var(--dark-blue-bg); /* Darker blue for top bar */
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 10px 0; /* Vertical padding */
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure logo is visible */
}

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

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

.btn-login {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border: 2px solid var(--secondary-color);
}

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

.btn-register {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-register:hover {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.main-nav {
    background-color: var(--primary-color); /* Primary color for main navigation */
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 10px 0; /* Vertical padding */
}

.main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 0 20px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

/* Mobile specific styles */
.hamburger-menu,
.mobile-nav-buttons {
    display: none;
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: center;
    }

    .header-top {
        min-height: 60px;
        padding: 10px 0;
        width: 100%;
        justify-content: space-between; /* Adjusted for mobile */
    }

    .header-container {
        padding: 0 15px;
        max-width: none; /* Mobile container fills width */
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001; /* Above logo and buttons */
    }

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: var(--secondary-color);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

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

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

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

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        order: 2; /* Center the logo */
    }

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

    .mobile-nav-buttons {
        display: flex;
        width: 100%;
        background-color: var(--primary-color);
        min-height: 50px;
        padding: 10px 0;
        justify-content: center;
        align-items: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 999; /* Below hamburger menu */
    }

    .mobile-nav-buttons .header-container {
        max-width: none;
        padding: 0 15px;
        justify-content: center;
        gap: 10px;
    }

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

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

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

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

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

    .nav-link::after {
        display: none; /* Hide underline for mobile links */
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 997;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    body.no-scroll {
        overflow: hidden;
    }
}

/* Footer styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 40px 20px 20px;
    font-size: 14px;
}

.site-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.site-footer .footer-column {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.site-footer h3 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

.site-footer p,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.site-footer ul.footer-nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .site-footer .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer .footer-column {
        max-width: 100%;
        min-width: unset;
        width: 100%;
    }

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

    .site-footer ul.footer-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }

    .site-footer ul.footer-nav li {
        margin-bottom: 0;
        flex-basis: calc(50% - 10px); /* Two columns */
    }
}

/* Payment Methods 图标容器样式 */
.payment-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.payment-icons img,
.payment-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Game Providers 图标容器样式 */
.game-providers-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.game-providers-icons img,
.game-provider-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Social Media 图标容器样式 */
.social-media-icons {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.social-media-icons img,
.social-media-icon {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
