:root {
    --primary-color: #1A2A4E;
    --secondary-color: #FFD700;
    --text-light: #F0F0F0;
    --text-dark: #1A2A4E;
    --header-offset: 110px; /* Desktop: header-top (60px) + main-nav (50px) */
}

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

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

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

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-color); /* Default background for the entire fixed header */
}

.header-top {
    background-color: var(--primary-color);
    padding: 15px 0;
    min-height: 30px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    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;
    padding-right: 20px; /* Spacing from desktop buttons */
}

.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, color 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-login:hover {
    background-color: #e6c200;
}

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

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

.main-nav {
    background-color: #0E1A30; /* Darker shade of primary for contrast */
    padding: 10px 0;
    min-height: 30px;
    display: flex; /* Desktop default: visible */
    width: 100%;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 3px;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

.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-buttons-bar {
    display: none; /* Hidden on desktop */
    background-color: var(--primary-color);
    padding: 10px 0;
    min-height: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-buttons-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 15px;
}

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

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

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
}

.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 rgba(255, 255, 255, 0.1);
}

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

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

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-col p {
    color: #ccc;
}

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

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

.footer-col ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding-top: var(--header-offset);
    }

    .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 {
        padding: 10px 0;
    }

    .header-container {
        padding: 0 15px;
        justify-content: space-between;
    }

    .hamburger-menu {
        display: block;
        order: 1;
        margin-right: 15px;
    }

    .logo {
        order: 2;
        flex: 1;
        text-align: center;
        padding-right: 0;
        font-size: 24px;
    }

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

    .mobile-buttons-bar {
        display: block;
        width: 100%;
        position: relative;
        z-index: 100;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: fixed;
        top: var(--header-offset); /* Position below the visible header + button bar */
        left: 0;
        width: 250px;
        height: calc(100% - var(--header-offset));
        background-color: var(--primary-color);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding-top: 20px;
        z-index: 1000;
    }

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

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

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

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

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

    .footer-col {
        flex: 1 1 100%;
        min-width: unset;
        text-align: center;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

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