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

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

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

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

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* --- 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);
    min-height: var(--header-offset);
}

.header-top {
    background-color: var(--header-top-bg);
    color: var(--secondary-color);
    padding: 10px 0;
    min-height: 60px; /* Desktop height */
    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;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure visibility */
}

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

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

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

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

.btn-login {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--primary-color);
}

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

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

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

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

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

.nav-link:hover {
    color: #E0E0E0;
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

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

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

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

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

.mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

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

/* --- Site Footer --- */
.site-footer {
    background-color: var(--text-color-dark);
    color: var(--secondary-color);
    padding: 40px 20px 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

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

.footer-description {
    color: #CCCCCC;
    line-height: 1.8;
}

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

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

.footer-nav .nav-link {
    color: #CCCCCC;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.copyright {
    color: #AAAAAA;
}

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

    .header-top {
        min-height: 55px; /* Mobile height */
        padding: 8px 0;
    }

    .header-container {
        padding: 0 15px;
        max-width: none;
        width: 100%;
        justify-content: space-between;
        position: relative;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 80px); /* Account for hamburger menu width */
    }

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

    .mobile-nav-buttons {
        display: flex !important;
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding: 8px 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);
        min-height: 50px; /* Mobile buttons height */
    }

    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* 50% minus half of gap */
        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 fixed header and buttons */
        left: 0;
        width: 75%; /* Adjust as needed */
        height: calc(100vh - var(--header-offset));
        background-color: var(--main-nav-bg);
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease;
        padding: 20px 0;
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex; /* Ensure it's displayed when active */
        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);
    }
    .nav-link:last-child {
        border-bottom: none;
    }

    .hamburger-menu {
        display: flex;
        z-index: 1001;
        position: relative; /* Keep it above other elements in header-top */
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-column h3 {
        margin-top: 20px;
    }
    .footer-column:first-child h3 {
        margin-top: 0;
    }

    .footer-nav li {
        display: inline-block;
        margin: 0 8px 10px;
    }
}

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