:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-color: #EA7C07;
    --background-color: #FFFFFF;
    --text-color-dark: #000000;
    --header-top-bg: #1A7BB8; /* Darker variant of primary */
    --main-nav-bg: var(--primary-color);
    --header-offset: 120px; /* Desktop: header-top (70px) + main-nav (50px) */
}

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

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

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

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px 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: 15px 0;
    color: var(--secondary-color);
    min-height: 70px; /* Ensure consistent height */
    display: flex;
    align-items: center;
}

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

.logo {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    display: block;
    flex-shrink: 0;
}

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

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

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

.btn-primary:hover {
    background-color: #1e8bc3; /* Slightly darker primary */
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #d86c06; /* Slightly darker login color */
    transform: translateY(-2px);
}

.main-nav {
    background-color: var(--main-nav-bg);
    padding: 10px 0;
    width: 100%;
    display: flex; /* Desktop default: flex */
    justify-content: center;
    align-items: center;
    min-height: 50px; /* Ensure consistent height */
}

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

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

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

/* Mobile specific elements (hidden by default on desktop) */
.hamburger-menu,
.mobile-nav-buttons,
.mobile-menu-overlay {
    display: none;
}

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

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

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

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

.site-footer p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.site-footer ul {
    list-style: none;
}

.site-footer ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    display: block;
}

.site-footer ul li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: #115F8C; /* Even darker blue */
    padding: 15px 0;
    margin-top: 30px;
    text-align: center;
}

.footer-bottom .copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        position: relative;
        min-height: 70px;
    }

    .nav-container {
        padding: 0 15px;
        max-width: none;
        width: 100%;
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        position: relative;
        z-index: 1001;
        flex-shrink: 0;
    }

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

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 20px;
        margin: 0 auto; /* Ensures text logo is centered */
    }

    .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); /* Match header-top background */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    }
    .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;
        text-align: center;
    }

    .main-nav {
        display: none; /* Default hidden for mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%; /* Sidebar width */
        height: calc(100vh - var(--header-offset));
        overflow-y: auto;
        flex-direction: column;
        align-items: flex-start;
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        background-color: #2c3e50; /* Dark background for mobile menu */
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    }

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

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        color: var(--secondary-color);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }

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

    body.no-scroll {
        overflow: hidden;
    }

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

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

    .site-footer ul {
        padding-left: 0;
    }

    .site-footer ul li a {
        text-align: center;
    }

    /* Mobile content overflow protection */
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: 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;
  }
}
