:root {
    --header-offset: 110px; /* Desktop: Calculated height of header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: Calculated height of header-top (60px) + mobile-buttons-container (50px) */
    }
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif; /* Using Poppins for a modern feel */
    color: #FFFFFF; /* Default text color for dark backgrounds */
    background-color: #FFFFFF; /* Default page background */
    padding-top: var(--header-offset);
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

/* Base styles for header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.header-top {
    background-color: #000000; /* Primary color */
    width: 100%;
    padding: 15px 0;
    min-height: 30px;
    display: flex;
    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 {
    color: #FCBC45; /* Contrast with black header-top */
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
    display: block; /* Ensure logo is always visible */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

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

.btn-register {
    background-color: #FFFFFF; /* Register color */
    color: #000000; /* Text color for register button */
    border: 1px solid #FCBC45;
}

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

.main-nav {
    background-color: #1a1a1a; /* Dark grey, contrasting with header-top */
    width: 100%;
    display: flex;
    padding: 10px 0;
    min-height: 30px;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: #FCBC45;
    transition: transform 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

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

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    margin: 5px 0;
    transition: all 0.3s ease;
}

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

.mobile-buttons-container {
    display: none; /* Hidden on desktop */
    background-color: #000000; /* Same as header-top */
    padding: 10px 20px;
    justify-content: center;
    gap: 10px;
    min-height: 30px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 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; /* Primary color */
    color: #FFFFFF;
    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-section {
    flex: 1;
    min-width: 180px;
}

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

.site-footer p {
    line-height: 1.6;
    color: #cccccc;
}

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

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

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

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

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

.site-footer .footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333333;
    color: #cccccc;
}

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

    .header-top {
        padding: 10px 0;
        min-height: 40px;
    }
    .header-container {
        padding: 0 15px;
        width: 100%;
        max-width: none;
    }
    .hamburger-menu {
        display: block;
    }
    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
    }
    .desktop-nav-buttons {
        display: none;
    }
    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 80%;
        max-width: 300px; /* Limit width for mobile menu */
        height: calc(100% - var(--header-offset));
        flex-direction: column;
        background-color: #000000; /* Menu background */
        transform: translateX(-100%); /* Slide out from left */
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    .main-nav.active {
        display: flex; /* Show when active */
        transform: translateX(0);
    }
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 15px;
        width: 100%;
        max-width: none;
    }
    .nav-link {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #333333;
        font-size: 16px;
    }
    .nav-link:last-child {
        border-bottom: none;
    }
    .nav-link::after {
        display: none;
    }

    .mobile-buttons-container {
        display: flex;
        width: 100%;
        max-width: none;
        padding: 10px 15px;
        justify-content: center;
        min-height: 30px;
    }
    .mobile-menu-overlay.active {
        display: block;
    }

    .site-footer .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    .site-footer .footer-section {
        min-width: unset;
        width: 100%;
    }
    .site-footer .footer-logo {
        text-align: center;
        margin-bottom: 20px;
    }
    .site-footer .about-section p {
        text-align: center;
    }
    .site-footer h3 {
        text-align: center;
        margin-top: 20px;
    }
    .site-footer .footer-nav {
        text-align: center;
    }
}

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