:root {
    --header-offset: 100px; /* Desktop: header-top (50px) + main-nav (50px) */
}
@media (max-width: 768px) {
    :root {
        --header-offset: 100px; /* Mobile: header-top (50px) + mobile-nav-buttons (50px) */
    }
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: hidden;
    }
}

/* Base Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f8f8;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.header-top {
    background-color: #8B0000; /* Secondary color */
    padding: 5px 0;
    min-height: 40px; /* Base height for header-top */
    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 {
    color: #FFD700; /* Primary color for logo text */
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
    white-space: nowrap;
}

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

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

.login-btn {
    background-color: #FFD700; /* Primary color */
    color: #8B0000; /* Secondary color */
    border: 2px solid #FFD700;
}

.login-btn:hover {
    background-color: #ffd147; /* Slightly darker gold */
    border-color: #ffd147;
}

.register-btn {
    background-color: #8B0000; /* Secondary color */
    color: #FFD700; /* Primary color */
    border: 2px solid #FFD700;
}

.register-btn:hover {
    background-color: #7a0000; /* Slightly darker red */
    border-color: #7a0000;
}

.main-nav {
    background-color: #FFD700; /* Primary color */
    padding: 5px 0;
    min-height: 40px; /* Base height for main-nav */
    display: flex; /* Desktop default: flex */
    justify-content: center; /* Center menu items */
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center; /* Center menu items */
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-link {
    color: #8B0000; /* Secondary color for nav links */
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    transition: color 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
    border-radius: 3px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background-color: #8B0000; /* Secondary color */
    color: #FFD700; /* Primary color */
    border-radius: 5px;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 25px;
    justify-content: center;
    position: relative;
    z-index: 1002;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFD700; /* Primary color */
    transition: all 0.3s ease;
}

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

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

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

/* Footer Styles */
.site-footer {
    background-color: #333;
    color: #eee;
    padding: 40px 20px;
    text-align: center;
}

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

.footer-col {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-logo {
    color: #FFD700; /* Primary color for footer logo */
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 15px;
}

.site-footer p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.site-footer h3 {
    color: #FFD700; /* Primary color for footer headings */
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
}

.footer-nav a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #FFD700; /* Primary color on hover */
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-top {
        min-height: 50px; /* Mobile header-top height */
        padding: 5px 0;
    }
    .header-container {
        padding: 0 15px;
        width: 100%;
        max-width: none;
        justify-content: flex-start; /* Hamburger on left, logo centered */
        position: relative;
    }
    .hamburger-menu {
        display: flex;
        order: 0;
        margin-right: 15px;
    }
    .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);
    }
    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        padding: 0;
        order: 1;
    }
    .desktop-nav-buttons {
        display: none;
    }
    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        padding: 10px 20px;
        min-height: 50px; /* Mobile buttons height */
        background-color: #FFD700; /* Primary color */
    }
    .mobile-nav-buttons .header-container {
        padding: 0;
        max-width: none;
        width: 100%;
        justify-content: center;
    }
    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-offset));
        background-color: #FFD700; /* Primary color */
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        padding: 20px 0;
        align-items: flex-start;
        box-sizing: border-box;
        overflow-y: auto; /* Enable scrolling for long menus */
    }
    .main-nav.active {
        display: flex; /* Show when active */
        transform: translateX(0);
    }
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        gap: 10px;
        max-width: none;
        width: 100%;
    }
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 12px 15px;
    }

    .site-footer {
        padding: 30px 15px;
    }
    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    .footer-col {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
    .footer-logo {
        margin: 0 auto 15px auto;
    }
    .site-footer h3 {
        text-align: center;
    }
    .footer-nav a {
        text-align: center;
    }
}

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