:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --text-color-dark: #000000;
    --text-color-light: #FFFFFF;
    --background-color: #FFFFFF;
    --header-offset: 100px; /* Desktop: header-top (60px) + main-nav (40px) */
}

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

/* Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    background-color: var(--background-color);
    color: var(--text-color-dark);
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Site 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);
    background-color: var(--secondary-color); /* Default header background */
}

.header-top {
    background-color: #1A7FB0; /* Darker variant of primary for contrast */
    color: var(--text-color-light);
    padding: 15px 0;
    min-height: 60px; /* Approx 30px content + 30px padding */
    display: flex;
    align-items: center;
}

.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(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    line-height: 1;
}

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

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

.btn-login {
    background-color: var(--login-button-color);
    color: var(--text-color-light);
    border: 2px solid var(--login-button-color);
}

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

.btn-register {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: 2px solid var(--primary-color);
}

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

.main-nav {
    background-color: var(--primary-color);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px; /* Approx 20px content + 20px padding */
}

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

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

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color-light);
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

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

.mobile-nav-buttons {
    display: none; /* Hidden by default on desktop */
    background-color: var(--secondary-color);
    padding: 10px 0;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Site Footer */
.site-footer {
    background-color: #222;
    color: #bbb;
    padding: 40px 20px 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #333;
}

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

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.footer-col h3 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
}

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

.footer-col p {
    line-height: 1.6;
}

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

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

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    text-align: center;
    padding-top: 20px;
}

.footer-bottom p {
    margin: 0;
    color: #999;
}

/* Mobile Styles */
@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;
    }

    .site-header {
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    }

    .header-top {
        padding: 10px 0;
        min-height: 50px;
    }

    .header-container {
        padding: 0 15px;
        justify-content: space-between;
        position: relative;
        width: 100%; /* Ensure container takes full width */
        max-width: none; /* Important: remove max-width on mobile */
    }

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

    .logo {
        order: 2;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
    }

    .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;
        justify-content: center; /* Center buttons if less than 2 */
        align-items: center;
    }

    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* For two buttons */
        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;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 250px;
        height: calc(100% - var(--header-offset));
        background-color: #222; /* Dark background for mobile menu */
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        align-items: flex-start; /* Align menu items to the left */
        padding-top: 20px; /* Add some padding at the top of the menu */
    }

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

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px;
        width: 100%; /* Ensure container takes full width */
        max-width: none; /* Important: remove max-width on mobile */
    }

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

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

    .footer-container {
        flex-direction: column;
        gap: 20px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .footer-col h3::after {
        margin-left: 0;
    }

    .footer-bottom {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* 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;
  }
}
