:root {
    --header-offset: 126px; /* Desktop: Matches actual header height */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 126px; /* Mobile: Matches actual header height */
    }
    .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 {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #FFFFFF; /* Default text color for dark background elements */
    background-color: #FFFFFF; /* Default page background */
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Desktop: Header top and main nav are distinct */
    display: flex;
    flex-direction: column;
}

.header-top {
    background-color: #000000; /* Primary color */
    width: 100%;
    min-height: 50px;
    padding: 10px 0;
    display: flex; /* For desktop layout */
    align-items: center;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

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

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

.btn-login {
    background-color: #FCBC45; /* Custom color for Login */
    color: #000000; /* Contrasting text for login button */
}

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

.btn-register {
    background-color: #FFFFFF; /* Custom color for Register */
    color: #000000; /* Contrasting text for register button */
}

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

.main-nav-wrapper {
    background-color: #1a1a1a; /* Dark grey, contrasting with header-top */
    width: 100%;
    min-height: 40px;
    padding: 8px 0;
    display: flex; /* For desktop layout */
    align-items: center;
}

.main-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%; /* Ensure it takes full width of its container */
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    white-space: nowrap;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: #FCBC45;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Mobile specific styles (hidden by default on desktop) */
.mobile-header-bar,
.mobile-nav-buttons-wrapper,
.hamburger-menu {
    display: none;
}

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

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

/* Footer styles */
.site-footer {
    background-color: #000000;
    color: #FFFFFF;
    padding: 40px 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-section {
    flex: 1;
    min-width: 200px;
}

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

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

.site-footer p {
    line-height: 1.6;
    margin-bottom: 10px;
}

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

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

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

.site-footer .footer-nav a:hover {
    color: #FCBC45;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
    .header-top {
        display: none; /* Hide desktop header top bar */
    }

    .main-nav-wrapper {
        display: none; /* Hide desktop main nav */
    }

    .mobile-header-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #000000;
        padding: 10px 15px;
        min-height: 50px;
        width: 100%;
    }

    .mobile-logo {
        flex: 1;
        text-align: center;
        margin: 0;
        font-size: 24px;
        color: #FFFFFF;
    }

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

    .hamburger-menu .bar {
        width: 100%;
        height: 3px;
        background-color: #FFFFFF;
        transition: all 0.3s ease;
    }

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

    .main-nav {
        display: none; /* Hidden by default for mobile */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: #1a1a1a; /* Consistent with desktop main nav */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding: 20px 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    }

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

    .main-nav .nav-link {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: left;
    }
    
    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .mobile-nav-buttons-wrapper {
        display: flex;
        width: 100%;
        background-color: #000000; /* Consistent with header-top */
        padding: 8px 0;
        min-height: 40px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        width: 100%;
        padding: 0 15px;
    }

    .mobile-nav-buttons .btn {
        flex: 1;
        max-width: 150px;
    }

    .site-footer .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer .footer-section {
        min-width: unset;
        width: 100%;
    }
    .site-footer .footer-brand .footer-logo {
        margin-bottom: 10px;
    }
    .site-footer h3 {
        margin-top: 20px;
    }
}

/* 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;
  }
}
