/* Basic Resets & Global Styles */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #FF4500; /* OrangeRed */
    --text-color: #333333;
    --light-text-color: #666666;
    --background-color: #F8F8F8;
    --dark-background: #1a1a1a;
    --footer-background: #222222;
    --border-color: #E0E0E0;
    --header-height: 80px;
    --topbar-height: 40px;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.main-header {
    background-color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.top-bar {
    background-color: var(--dark-background);
    color: #CCCCCC;
    font-size: 0.85em;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-left > *, .top-bar-right > * {
    margin-right: 20px;
}

.top-bar-left > *:last-child, .top-bar-right > *:last-child {
    margin-right: 0;
}

.top-bar a {
    color: #CCCCCC;
    display: flex;
    align-items: center;
}

.top-bar a:hover {
    color: var(--primary-color);
}

.top-bar img {
    width: 20px;
    height: auto;
    margin-right: 5px;
}

.top-bar .btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.top-bar .btn:hover {
    background-color: var(--primary-color);
    color: var(--dark-background);
}

.main-navbar {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.main-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust as needed */
    max-width: 100%;
}

.main-menu ul {
    display: flex;
}

.main-menu li {
    position: relative;
    margin: 0 15px;
}

.main-menu a {
    color: var(--text-color);
    font-weight: bold;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-menu a:hover {
    color: var(--primary-color);
}

.main-menu .has-submenu > a {
    padding-right: 20px;
}

.main-menu .has-submenu > a i {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.main-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    min-width: 180px;
    z-index: 10;
}

.main-menu .submenu li {
    margin: 0;
}

.main-menu .submenu a {
    padding: 10px 15px;
    white-space: nowrap;
    color: var(--text-color);
}

.main-menu .submenu a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.main-menu li:hover > .submenu {
    display: block;
}

.navbar-actions {
    display: flex;
    align-items: center;
}

.search-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    color: var(--text-color);
    cursor: pointer;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--primary-color);
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 30px;
    height: 20px;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

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

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

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

.mobile-menu-content {
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
    max-width: 80%;
    height: 100%;
    background-color: #FFF;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-mobile-menu {
    background: none;
    border: none;
    font-size: 2em;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    color: var(--text-color);
}

.mobile-nav ul {
    padding-top: 50px;
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-color);
}

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

.mobile-nav a {
    display: block;
    padding: 15px 0;
    color: var(--text-color);
    font-weight: bold;
    display: flex;
    align-items: center;
}

.mobile-nav a i {
    margin-right: 10px;
    color: var(--primary-color);
}

.mobile-nav .has-submenu > a {
    justify-content: space-between;
}

.mobile-nav .mobile-submenu {
    display: none; /* Hidden by default */
    padding-left: 20px;
    background-color: var(--background-color);
}

.mobile-nav .mobile-submenu.active {
    display: block;
}

.mobile-nav .mobile-submenu a {
    padding: 10px 0;
    font-weight: normal;
    color: var(--light-text-color);
}

.mobile-nav .btn-login-mobile,
.mobile-nav .btn-register-mobile,
.mobile-nav .btn-support-mobile {
    margin-top: 15px;
    background-color: var(--primary-color);
    color: var(--dark-background);
    text-align: center;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
}

.mobile-nav .btn-register-mobile {
    background-color: var(--secondary-color);
    color: #FFF;
}

/* Marquee Styles */
.marquee-section {
    background-color: #333333;
    color: #FFFFFF;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
    font-size: 0.9em;
}

.marquee-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.marquee-icon {
    flex-shrink: 0;
    margin-right: 10px;
}

.marquee-icon-emoji {
    font-size: 1.2em;
    color: var(--primary-color);
}

.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-content a {
    color: #FFFFFF;
    margin-right: 50px;
    white-space: nowrap;
    display: inline-block;
}

.marquee-content a:hover {
    color: var(--primary-color);
}

@keyframes marquee-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}


/* Footer Styles */
.main-footer {
    background-color: var(--footer-background);
    color: #CCCCCC;
    padding: 40px 0 20px;
    font-size: 0.9em;
}

.main-footer a {
    color: #CCCCCC;
}

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

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    padding-right: 20px;
}

.footer-col:last-child {
    padding-right: 0;
}

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
    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-logo img {
    max-height: 60px;
    margin-bottom: 15px;
}

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

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

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

.footer-col ul li a {
    display: block;
    padding: 2px 0;
}

.social-links {
    margin-top: 20px;
    display: flex;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 1.1em;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--dark-background);
}

.contact-info i {
    margin-right: 8px;
    color: var(--primary-color);
}

.payment-methods {
    margin-top: 20px;
}

.payment-methods h4 {
    color: #FFFFFF;
    margin-bottom: 10px;
}

.payment-methods img {
    height: 30px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    padding: 3px;
    background-color: #FFF;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 15px;
}

.licensing-badges img {
    height: 40px;
    margin: 0 10px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-menu {
        display: none;
    }
    .top-bar-right .btn-login,
    .top-bar-right .btn-register,
    .top-bar-right .btn-support {
        display: none; /* Hide desktop login/register on smaller screens */
    }
    .hamburger-menu {
        display: block;
    }
    .main-navbar .container {
        justify-content: space-between;
    }
    .navbar-actions {
        order: 3; /* Move actions to the end */
    }
    .logo {
        order: 1; /* Keep logo first */
    }
    .top-bar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar-left, .top-bar-right {
        margin-bottom: 10px;
    }
    .top-bar-right {
        width: 100%;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
    }
    .footer-col {
        min-width: unset;
        width: 100%;
        padding-right: 0;
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-links {
        justify-content: center;
    }
    .payment-methods {
        text-align: center;
    }
    .payment-methods img {
        margin: 5px;
    }
    .licensing-badges img {
        height: 30px;
    }
}

@media (max-width: 480px) {
    .top-bar-left > *, .top-bar-right > * {
        margin-right: 10px;
    }
    .top-bar .btn {
        padding: 5px 8px;
        font-size: 0.8em;
    }
    .logo img {
        height: 40px;
    }
    .marquee-content a {
        margin-right: 30px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
