:root {
    --header-offset: 105px; /* Desktop: Sum of .header-top and .main-nav heights */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: Sum of .header-top and .mobile-nav-buttons heights */
    }
}

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

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

.header-top {
    background-color: #000000; /* Primary color */
    padding: 10px 0;
    height: 60px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

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

.logo {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 0;
}

.main-nav {
    background-color: #1a1a1a; /* Darker grey for contrast with header-top */
    padding: 10px 0;
    height: 45px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

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

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #FCBC45;
}

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

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

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

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

.btn-register {
    background-color: #FFFFFF; /* Register custom color */
    color: #000000;
}

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

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

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

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
}

.mobile-menu-overlay {
    display: none; /* Hidden by default on desktop */
}

/* Footer styles */
.site-footer {
    background-color: #000000;
    color: #FFFFFF;
    padding: 40px 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

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

.site-footer p {
    line-height: 1.6;
    margin: 0;
}

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

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

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

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

/* 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 {
        height: 60px;
        padding: 0;
    }

    .header-container {
        padding: 0 15px;
        width: 100%;
        max-width: none; /* Ensure full width on mobile */
        justify-content: flex-start;
    }

    .hamburger-menu {
        display: block;
        margin-right: auto; /* Push logo to center */
    }

    .logo {
        flex: 1;
        text-align: center;
        margin-right: 30px; /* Counteract hamburger pushing it slightly right */
    }

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

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 80%; /* Adjust as needed */
        max-width: 300px;
        height: calc(100vh - var(--header-offset)); /* Full height minus header */
        background-color: #000000;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-sizing: border-box;
    }

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

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 15px;
        width: 100%;
        max-width: none; /* Ensure full width on mobile */
    }

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

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

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
        background-color: #000000;
        padding: 10px 15px;
        width: 100%;
        height: 50px;
        box-sizing: border-box;
    }

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

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

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

    .footer-col {
        text-align: center;
    }

    .footer-nav {
        text-align: center;
    }

    .footer-nav li {
        display: inline-block;
        margin: 0 8px 10px 8px;
    }
    .footer-nav li a {
        font-size: 13px;
    }
    .footer-col h3 {
        margin-top: 25px;
    }
}

body.no-scroll {
    overflow: hidden;
}

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