:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --background-color: #FFFFFF;
    --text-color-dark: #000000;
    --header-top-bg: #1A7FB5; /* Darker blue */
    --main-nav-bg: #26A9E0; /* Primary light blue */
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

/* Global styles for body and typography */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    color: var(--text-color-dark);
    background-color: var(--background-color);
    overflow-x: hidden;
}

/* Site Header - Fixed Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--secondary-color); /* Fallback, specific sections have their own bg */
}

.header-top {
    background-color: var(--header-top-bg);
    padding: 10px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px; /* Desktop padding */
    width: 100%;
    box-sizing: border-box;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    order: 1;
}

.desktop-nav-buttons {
    display: flex;
    gap: 12px;
    margin-left: auto;
    order: 3;
}

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

.btn-register {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

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

.btn-login {
    background-color: var(--login-button-color);
    color: var(--secondary-color);
}

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

.main-nav {
    background-color: var(--main-nav-bg);
    padding: 10px 0;
    min-height: 30px;
    display: flex; /* Desktop default */
    align-items: center;
}

.main-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Desktop default */
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 8px 15px;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Hamburger menu for mobile */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
    order: 0;
    margin-right: auto; /* Push logo to center */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

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

.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;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Footer styles */
.site-footer {
    background-color: var(--header-top-bg);
    color: var(--secondary-color);
    padding: 40px 20px;
    text-align: center;
}

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

.footer-brand {
    flex: 1 1 300px;
    text-align: left;
}

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

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    flex: 1 1 200px;
    text-align: left;
}

.footer-links h3 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

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

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

.footer-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .header-container {
        padding: 0 15px;
        justify-content: center; /* Center logo by default */
        position: relative; /* For logo absolute positioning if needed */
        min-height: 50px;
    }

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

    .logo {
        font-size: 24px;
        flex: 1;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
        padding-right: 30px; /* Space for hamburger menu */
    }

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

    .mobile-nav-buttons {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--header-top-bg);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column; /* Vertical layout */
        position: fixed;
        top: var(--header-offset); /* Below the header and mobile buttons */
        left: 0;
        width: 100%;
        height: calc(100% - var(--header-offset));
        background-color: var(--main-nav-bg);
        transform: translateX(-100%); /* Off-screen to the left */
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        padding-bottom: 20px;
    }

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

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

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

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

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

    .footer-brand, .footer-links {
        flex: 1 1 100%;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 15px auto;
    }

    .footer-links h3 {
        margin-top: 25px;
    }

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