:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --dark-background: #1a202c;
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 100px; /* Mobile: header-top (50px) + mobile-nav-buttons (50px) */
    }
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container, .header-container, .nav-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.btn-register {
    background-color: var(--login-button-color);
    box-shadow: 0 4px 8px rgba(234, 124, 7, 0.3);
}

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

.btn-download {
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(38, 169, 224, 0.3);
}

.btn-download:hover {
    background-color: #208dbb;
    transform: translateY(-2px);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: var(--header-offset);
    background-color: var(--dark-background); /* Default background for entire header */
}

.header-top {
    background-color: var(--dark-background);
    padding: 10px 0;
    min-height: 60px; /* Desktop height for header-top */
    display: flex;
    align-items: center;
    position: relative;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.main-nav {
    background-color: var(--primary-color);
    padding: 10px 0;
    min-height: 50px; /* Desktop height for main-nav */
    display: flex; /* Desktop default: visible */
    align-items: center;
    justify-content: center;
}

.main-nav .nav-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.nav-link {
    color: var(--secondary-color);
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    position: absolute;
    left: 15px;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    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-menu-overlay {
    display: none; /* Hidden by default */
    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;
}

/* Footer */
.site-footer {
    background-color: var(--dark-background);
    color: var(--secondary-color);
    padding: 40px 0 20px;
    font-size: 14px;
}

.site-footer .footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

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

.footer-logo {
    font-size: 22px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.site-footer h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.site-footer p {
    color: #ccc;
    line-height: 1.8;
}

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

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

.footer-nav-list a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-nav-list a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: #ccc;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-top {
        padding: 5px 0;
        min-height: 50px; /* Mobile height for header-top */
    }

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

    .hamburger-menu {
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .logo {
        font-size: 20px;
        position: relative; /* For centering, if flex doesn't work perfectly with hamburger */
        left: 0;
        transform: none;
    }

    /* Image Logo Centering - Method 1 (Preferred for text logo, or if image logo is text-based) */
    .header-top .header-container .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-left: 40px; /* Offset for hamburger menu */
        margin-right: 40px; /* Balance for hamburger menu */
    }

    .header-top .header-container .logo img {
        display: block !important;
        max-width: 100%;
        height: auto;
        max-height: 40px; 
    }

    .desktop-nav-buttons {
        display: none; /* Hide desktop buttons on mobile */
    }

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: #222; /* Slightly different background for distinction */
        justify-content: center;
        min-height: 50px; /* Mobile height for mobile-nav-buttons */
    }

    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* Account for gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-nav {
        display: none; /* Hide by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 70%; /* Adjust as needed */
        height: calc(100% - var(--header-offset));
        background-color: var(--dark-background);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        z-index: 1001;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 10px 5px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--secondary-color);
    }
    .nav-link:last-child {
        border-bottom: none;
    }

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

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

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