/* Basic Reset & Global Styles */
:root {
    --primary-color: #28a745; /* Vibrant Green */
    --secondary-color: #ffc107; /* Gold */
    --dark-bg: #1a1a1a;
    --light-text: #f8f9fa;
    --dark-text: #343a40;
    --border-color: #495057;
    --font-family-sans: 'Arial', sans-serif;
    --font-family-serif: 'Georgia', serif;
    --spacing-unit: 1rem;
}

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

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #f4f7f6;
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: none;
}

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

.btn-login:hover {
    background-color: darken(var(--secondary-color), 10%);
    color: var(--dark-text);
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-register:hover {
    background-color: darken(var(--primary-color), 10%);
    color: var(--light-text);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    color: var(--dark-text);
}

input[type="search"] {
    max-width: 200px;
}

/* Header Specific Styles */
.main-header {
    background-color: var(--dark-bg);
    color: var(--light-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-top-bar {
    background-color: #111;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
}

.top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.language-selector select {
    background-color: #333;
    color: var(--light-text);
    border: 1px solid #555;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
}

.auth-links .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.header-main-nav {
    padding: 1rem 0;
}

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

.navbar-brand .site-logo {
    height: 50px; /* Adjust as needed */
    width: auto;
}

.main-navigation {
    flex-grow: 1;
    text-align: center;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--light-text);
    font-weight: bold;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    color: var(--secondary-color);
}

.nav-menu li.menu-item-has-children {
    position: relative;
}

.nav-menu .sub-menu {
    display: none;
    position: absolute;
    background-color: var(--dark-bg);
    min-width: 200px;
    z-index: 1000;
    padding: 1rem 0;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu li.menu-item-has-children:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu li {
    padding: 0.5rem 1.5rem;
}

.nav-menu .sub-menu li a {
    color: var(--light-text);
    font-weight: normal;
    white-space: nowrap;
    display: block;
}

.nav-menu .sub-menu li a:hover {
    color: var(--primary-color);
    background-color: #333;
}

.menu-toggle {
    display: none; /* Hidden by default for desktop */
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--light-text);
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

.header-search {
    margin-left: auto;
}

.search-form {
    display: flex;
    border-radius: 5px;
    overflow: hidden;
}

.search-form input {
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    background-color: #333;
    color: var(--light-text);
    border-radius: 0;
}

.search-form input::placeholder {
    color: #bbb;
}

.search-form button {
    background-color: var(--primary-color);
    border: none;
    color: var(--light-text);
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    border-radius: 0;
}

.search-form button:hover {
    background-color: darken(var(--primary-color), 10%);
}

/* Marquee Section */
.marquee-section {
    background-color: var(--secondary-color);
    color: var(--dark-text);
    padding: 0.7rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.marquee-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: marquee 30s linear infinite; /* Adjust duration as needed */
}

.marquee-icon {
    font-size: 1.2rem;
    color: var(--dark-text);
    flex-shrink: 0;
}

.marquee-icon-emoji {
    animation: bounce 1s infinite alternate;
}

.marquee-wrapper {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 500;
}

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

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

/* Footer Specific Styles */
.main-footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 3rem 0 1.5rem;
    font-size: 0.9rem;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-col {
    flex: 1 1 200px; /* Allows columns to grow/shrink, with a base of 200px */
    margin-bottom: 1.5rem;
}

.footer-col h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
}

.footer-col h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    margin-top: 5px;
}

.footer-col p {
    margin-bottom: 0.8rem;
    color: #ccc;
}

.footer-col ul {
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

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

.footer-col ul li a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-col .social-media a {
    display: inline-block;
    margin-right: 10px;
    font-size: 1.5rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-col .social-media a:hover {
    color: var(--primary-color);
}

.payment-icons, .licenses {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.payment-icons img, .licenses img {
    height: 30px;
    width: auto;
    filter: grayscale(80%) brightness(1.2);
    transition: filter 0.3s ease;
}

.payment-icons img:hover, .licenses img:hover {
    filter: grayscale(0%) brightness(1);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    color: #aaa;
    font-size: 0.85rem;
}

.footer-bottom .copyright {
    margin-bottom: 0.5rem;
}

.footer-bottom .disclaimer {
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .nav-menu {
        gap: 1.5rem;
    }
    .header-search {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        text-align: center;
    }
    .search-form {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-main-nav .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .navbar-brand {
        flex-basis: auto;
    }
    .menu-toggle {
        display: block;
        order: 2;
    }
    .main-navigation {
        flex-basis: 100%;
        order: 3;
    }
    .nav-menu {
        flex-direction: column;
        display: none; /* Hidden by default on mobile */
        width: 100%;
        background-color: var(--dark-bg);
        padding: 1rem 0;
        text-align: left;
        border-top: 1px solid #333;
    }
    .nav-menu.active {
        display: flex; /* Show when active */
    }
    .nav-menu li {
        width: 100%;
    }
    .nav-menu li a {
        padding: 0.8rem 1rem;
        display: block;
        border-bottom: 1px solid #333;
    }
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    .nav-menu .sub-menu {
        position: static;
        display: block;
        background-color: #2a2a2a;
        width: 100%;
        transform: none;
        box-shadow: none;
        padding: 0;
        border-top: 1px solid #444;
    }
    .nav-menu .sub-menu li a {
        padding-left: 2.5rem;
        border-bottom: 1px solid #444;
    }
    .nav-menu .sub-menu li:last-child a {
        border-bottom: none;
    }
    .header-search {
        order: 4;
        width: 100%;
        margin-top: 1rem;
    }
    .top-bar-content {
        justify-content: center;
    }
    .footer-widgets {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-col {
        flex-basis: 100%;
        max-width: 400px;
    }
    .footer-col h3::after {
        margin-left: auto;
        margin-right: auto;
    }
    .social-media {
        display: flex;
        justify-content: center;
    }
    .payment-icons, .licenses {
        justify-content: center;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
