:root {
    --header-offset: 104px; /* Desktop: Calculated based on header-top (60px) + main-nav (44px) */
}

@media (max-width: 768px) {
    :root {
        --header-offset: 116px; /* Mobile: Calculated based on header-top (60px) + mobile-nav-buttons (56px) */
    }
}

/* Global Styles & Desktop First */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: #FFFFFF;
    color: #333333;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: #000000; /* Default background for entire header */
}

.header-top {
    background-color: #000000; /* Distinct background for top section */
    width: 100%;
    padding: 15px 0;
    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 {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
}

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

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

.btn-login {
    background-color: #FCBC45;
    color: #000000;
}

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

.btn-register {
    background-color: #FFFFFF;
    color: #000000;
}

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

.main-nav {
    background-color: #1a1a1a; /* Distinct background for navigation section */
    width: 100%;
    padding: 12px 0;
    display: flex; /* Desktop default: flex */
    justify-content: center;
    align-items: center;
}

.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: #FFFFFF;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
    font-size: 16px;
}

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

.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
    display: none; /* Hidden on desktop */
}

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

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

.footer-col {
    flex: 1;
    min-width: 250px;
}

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

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

.footer-col p {
    line-height: 1.6;
    color: #CCCCCC;
}

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

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

.footer-link {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #FCBC45;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container,
    .main-nav .nav-container,
    .footer-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
    }

    .header-top {
        padding: 10px 0;
        position: relative;
        justify-content: center; /* Center logo by default */
    }

    .logo {
        flex: 1 !important; /* Forces logo to take available space for centering */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center; /* Fallback for text-based logo */
        margin: 0;
    }

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

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        cursor: pointer;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

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

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(9px) 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: flex;
        justify-content: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: #000000;
        border-top: 1px solid #333333;
    }

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

    .main-nav {
        display: none; /* Default hidden */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 80%;
        max-width: 300px; /* Limit sidebar width */
        height: calc(100vh - var(--header-offset));
        background-color: #333333;
        flex-direction: column;
        padding: 20px 0;
        transform: translateX(-100%); /* Off-screen to the left */
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    }

    .main-nav.active {
        display: flex; /* Must be flex to show */
        transform: translateX(0); /* Slide into view */
    }

    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0 15px;
    }

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #444444;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }

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

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

    .site-footer .footer-container {
        flex-direction: column;
        gap: 40px;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
        text-align: center;
    }

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

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

    /* Prevent content overflow */
    .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.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;
  }
}
