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

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

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

/* Header Styles */
.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); /* Default background, will be overridden by sections */
}

.header-top {
    background-color: var(--dark-blue-bg); /* Darker background for top bar */
    padding: 15px 0;
    min-height: 30px;
    display: flex;
    align-items: center;
    position: relative; /* For mobile logo centering */
}

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

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

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

.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.2s ease, box-shadow 0.3s ease;
    color: var(--secondary-color);
    white-space: nowrap;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

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

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

.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 4px 0;
    transition: 0.4s;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-nav-buttons {
    display: none; /* Hidden on desktop, shown on mobile */
    background-color: #f0f0f0; /* Light background for mobile buttons */
    padding: 10px 15px;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

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

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

.nav-link:hover {
    color: #E0F7FA; /* Lighter shade for hover */
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark-blue-bg);
    color: var(--secondary-color);
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.8;
}

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

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

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

.footer-column p {
    margin-bottom: 10px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        max-width: none;
        width: 100%;
        justify-content: space-between;
    }

    .hamburger-menu {
        display: flex;
        order: 0;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        order: 1;
        font-size: 24px;
        position: absolute; /* To truly center it regardless of hamburger/empty space */
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Account for hamburger width */
    }

    .desktop-nav-buttons {
        display: 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;
        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;
    }

    .main-nav {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below the fixed header + mobile buttons */
        left: 0;
        width: 250px;
        height: calc(100% - var(--header-offset));
        background-color: var(--dark-blue-bg); /* Dark background for mobile menu */
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        padding: 20px 0;
        box-sizing: border-box;
        overflow-y: auto;
        align-items: flex-start;
        justify-content: flex-start;
    }

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

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

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

    .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-header .header-container::after {
        content: '';
        width: 45px; /* Balance the hamburger menu space */
    }

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

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

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