:root {
    --primary-color: #003366;
    --secondary-color: #FFD700;
    --text-light: #FFFFFF;
    --text-dark: #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) */
    }
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color); /* Fallback, specific sections override */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
    background-color: var(--primary-color); /* Deep Blue */
    width: 100%;
    padding: 10px 0;
    height: 60px;
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color); /* Gold text on Deep Blue background */
    text-decoration: none;
    padding: 5px 0;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--text-light);
}

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

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

.btn-login {
    background-color: var(--secondary-color); /* Gold background */
    color: var(--primary-color); /* Deep Blue text */
}

.btn-login:hover {
    background-color: #e6c200; /* Darker gold */
    color: var(--primary-color);
}

.btn-register {
    background-color: var(--primary-color); /* Deep Blue background */
    color: var(--secondary-color); /* Gold text */
    border: 1px solid var(--secondary-color);
}

.btn-register:hover {
    background-color: #002a52; /* Darker deep blue */
    color: var(--secondary-color);
}

.main-nav {
    background-color: #1a1a1a; /* Dark background for nav bar, contrasting with header-top */
    width: 100%;
    padding: 10px 0;
    display: flex; /* Desktop: default flex */
    justify-content: center;
    height: 50px;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Desktop: horizontal */
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    width: 100%;
}

.nav-link {
    color: var(--secondary-color); /* Gold text on dark background */
    text-decoration: none;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover effect */
    border-radius: 4px;
}

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

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    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-nav-buttons {
    display: none; /* Hidden on desktop */
}

/* Footer Styles */
.site-footer {
    background-color: #1a1a1a; /* Dark background for footer */
    color: var(--text-light);
    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;
}

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

.footer-heading {
    font-size: 18px;
    color: var(--secondary-color); /* Gold heading */
    margin-bottom: 15px;
}

.footer-nav-list {
    list-style: none;
}

.footer-nav-list li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-nav-list li a:hover {
    color: var(--secondary-color);
}

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

.copyright {
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .site-header {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .header-top {
        padding: 0;
        height: 60px;
    }

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

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100% - 120px);
        font-size: 24px;
    }

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

    .hamburger-menu {
        display: block;
        order: -1; /* Place hamburger menu on the left */
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column; /* Vertical */
        position: fixed;
        top: var(--header-offset); /* Start below the fixed header */
        left: 0;
        width: 100%;
        height: calc(100% - var(--header-offset));
        background-color: rgba(0, 0, 0, 0.95); /* Dark overlay for menu */
        overflow-y: auto;
        transform: translateX(-100%); /* Slide out from left */
        transition: transform 0.3s ease-out;
        z-index: 999; /* Below hamburger menu */
        padding: 20px 0;
        align-items: flex-start;
    }

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

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

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 18px;
    }

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

    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
        background-color: var(--primary-color); /* Same as header-top */
        padding: 10px 15px;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 990; /* Below main-nav and hamburger */
        height: 50px;
    }

    .btn {
        flex: 1;
        text-align: center;
    }

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

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

    /* Prevent content overflow on mobile */
    .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;
  }
}
