:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --background-color: #FFFFFF;
    --text-color-dark: #000000;
    --text-color-light: #FFFFFF;
    --header-top-bg: #26A9E0; /* Primary color for top bar */
    --main-nav-bg: #1a7fb3; /* Darker shade of primary for main nav */
    --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) */
    }
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--secondary-color); /* Fallback, specific sections define their own */
    transition: transform 0.3s ease-in-out;
    box-sizing: border-box;
}

.header-top {
    background-color: var(--header-top-bg);
    padding: 10px 0;
    color: var(--text-color-light);
    min-height: 60px; /* Ensures minimum height for content */
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

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

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

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

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: var(--text-color-light);
    border: none;
    cursor: pointer;
}

.btn-register {
    background: linear-gradient(to right, var(--primary-color), #40c0f0);
}

.btn-register:hover {
    background: linear-gradient(to right, #40c0f0, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

.btn-login:hover {
    background-color: #d16e06;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.main-nav {
    background-color: var(--main-nav-bg);
    padding: 10px 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 50px;
}

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

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

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1002;
    flex-shrink: 0;
    margin-right: 15px; /* Space between hamburger and logo */
}

.hamburger-menu .icon {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color-light);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu .icon::before,
.hamburger-menu .icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color-light);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-menu .icon::before {
    top: -10px;
}

.hamburger-menu .icon::after {
    top: 10px;
}

.hamburger-menu.active .icon {
    background-color: transparent;
}

.hamburger-menu.active .icon::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger-menu.active .icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
    background-color: var(--header-top-bg);
    padding: 10px 20px;
    box-sizing: border-box;
    min-height: 50px;
    align-items: center;
    justify-content: center;
}

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

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

.site-footer {
    background-color: var(--main-nav-bg);
    color: var(--text-color-light);
    padding: 40px 20px;
    text-align: center;
    box-sizing: border-box;
}

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

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

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

.site-footer .footer-description {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
}

.site-footer h3 {
    color: var(--text-color-light);
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.site-footer h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    margin-top: 10px;
}

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

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

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

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

.site-footer .footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .copyright {
    font-size: 13px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .header-top {
        padding: 10px 0;
        min-height: 50px;
    }
    .header-container {
        padding: 0 15px;
        justify-content: space-between;
        width: 100%;
        max-width: none; /* Ensure full width on mobile */
    }
    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        margin-left: -45px; /* Counteract hamburger menu space */
    }
    .desktop-nav-buttons {
        display: none;
    }
    .hamburger-menu {
        display: block;
    }
    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 70%;
        height: calc(100% - var(--header-offset));
        background-color: var(--main-nav-bg);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        padding: 20px 0;
        overflow-y: auto;
        box-sizing: border-box;
    }
    .main-nav.active {
        display: flex; /* Show when active */
        transform: translateX(0);
    }
    .main-nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px;
        max-width: none; /* Ensure full width on mobile */
        width: 100%;
    }
    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }
    .nav-link:last-child {
        border-bottom: none;
    }
    .mobile-nav-buttons {
        display: flex !important;
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding-left: 15px; padding-right: 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        min-height: 50px;
        justify-content: center;
    }
    .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;
    }
    .site-footer .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .site-footer .footer-column {
        min-width: unset;
    }
    .site-footer h3::after {
        margin: 10px auto 0;
    }
    .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;
  }
}
