/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Open+Sans:wght@400;600;700&display=swap');
/* Import Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: #28a745; /* Deep Green */
    color: #fff;
    border-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-secondary {
    background-color: #ffc107; /* Gold */
    color: #333;
    border-color: #ffc107;
}

.btn-secondary:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Marquee Section */
.marquee-section {
    background-color: #222;
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    font-size: 0.9em;
    border-bottom: 1px solid #333;
}

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

.marquee-icon {
    margin-right: 15px;
    font-size: 1.2em;
    color: #ffc107;
}

.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 25px; /* Ensure consistent height for scrolling */
}

.marquee-content {
    display: inline-block;
    padding-left: 100%; /* Start off-screen */
    animation: marquee-scroll 20s linear infinite;
}

.marquee-content a {
    color: #fff;
    margin-right: 50px;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.marquee-content a:hover {
    color: #ffc107;
}

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


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

.top-bar {
    background-color: #1a1a1a;
    color: #eee;
    padding: 8px 0;
    font-size: 0.85em;
    border-bottom: 1px solid #333;
}

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

.top-bar-left a,
.top-bar-right a {
    color: #eee;
    margin-right: 15px;
}

.top-bar-left a:hover,
.top-bar-right a:hover {
    color: #ffc107;
}

.top-bar-left .separator {
    margin: 0 10px;
    color: #555;
}

.language-selector {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.language-selector .dropdown-toggle {
    background: none;
    border: none;
    color: #eee;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.language-selector .dropdown-toggle:hover {
    background-color: #333;
}

.language-selector .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    min-width: 120px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.language-selector:hover .dropdown-menu,
.language-selector.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-selector .dropdown-menu li a {
    display: block;
    padding: 8px 15px;
    color: #eee;
    margin-right: 0; /* Override top-bar-right a */
}

.language-selector .dropdown-menu li a:hover {
    background-color: #3a3a3a;
    color: #ffc107;
}

.social-icons a {
    font-size: 1.1em;
    margin-left: 10px;
}

.main-header {
    padding: 15px 0;
}

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

.logo img {
    max-height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
}

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

.main-nav ul li a {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-nav ul li a:hover {
    color: #28a745;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

.main-nav .has-dropdown > a i {
    font-size: 0.7em;
    margin-left: 5px;
}

.main-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 200px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.main-nav .has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .dropdown-menu li a {
    padding: 10px 20px;
    color: #333;
    white-space: nowrap;
    display: block;
}

.main-nav .dropdown-menu li a:hover {
    background-color: #f0f0f0;
    color: #28a745;
}

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

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    margin-right: 15px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s ease;
}

.search-toggle:hover {
    color: #28a745;
}

.login-btn {
    margin-right: 10px;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    position: relative;
    width: 80%;
    max-width: 600px;
}

.search-container input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    outline: none;
}

.search-container .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 15px;
    border-radius: 3px;
    background-color: #28a745;
    color: #fff;
    border: none;
    cursor: pointer;
}

.search-container .search-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1002;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    width: 300px;
    background-color: #fff;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

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

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2em;
    color: #333;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

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

.mobile-nav ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.mobile-nav ul li a {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: 500;
}

.mobile-nav ul li a.btn {
    margin-top: 15px;
    display: block;
    text-align: center;
}

.mobile-nav .mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-nav .mobile-dropdown-menu {
    display: none; /* Hidden by default */
    padding-left: 20px;
    margin-top: 5px;
}

.mobile-nav .mobile-dropdown-menu.active {
    display: block;
}

.mobile-nav .mobile-dropdown-menu li {
    border-bottom: none;
    margin-bottom: 5px;
}

.mobile-nav .mobile-dropdown-menu li a {
    font-weight: 400;
    color: #555;
    padding: 5px 0;
}

.mobile-social-icons {
    margin-top: 30px;
    text-align: center;
}

.mobile-social-icons a {
    font-size: 1.5em;
    margin: 0 10px;
    color: #555;
}

/* Footer Styles */
.site-footer {
    background-color: #1a1a1a;
    color: #eee;
    padding: 50px 0 20px;
    font-size: 0.9em;
}

.site-footer a {
    color: #eee;
}

.site-footer a:hover {
    color: #ffc107;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: #ffc107;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background-color: #28a745;
}

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

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

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

.footer-logo img {
    max-height: 40px;
    margin-bottom: 15px;
}

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

.social-links a {
    font-size: 1.3em;
    margin-right: 15px;
    color: #eee;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffc107;
}

.contact-info p i {
    margin-right: 10px;
    color: #ffc107;
}

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

.payment-methods h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1em;
}

.payment-methods img {
    margin-right: 10px;
    margin-bottom: 5px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.payment-methods img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
}

.footer-bottom .license-info {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom .license-info p {
    margin: 0;
    font-size: 0.85em;
    color: #aaa;
}

.footer-bottom .license-info img {
    max-height: 40px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.footer-bottom .license-info img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.copyright, .age-restriction {
    font-size: 0.8em;
    color: #aaa;
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    .header-actions .login-btn,
    .header-actions .register-btn,
    .header-actions .search-toggle {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .top-bar .container {
        flex-direction: column;
        text-align: center;
    }
    .top-bar-left, .top-bar-right {
        margin-bottom: 10px;
    }
    .top-bar-left a, .top-bar-right a, .top-bar-right .language-selector {
        margin: 0 8px;
    }
    .marquee-content {
        animation-duration: 30s; /* Slower scroll for smaller screens */
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-logo {
        text-align: center;
    }
    .social-links {
        justify-content: center;
        display: flex;
    }
    .payment-methods {
        text-align: center;
    }
    .payment-methods img {
        margin: 5px;
    }
    .license-info {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-header .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo {
        margin-bottom: 15px;
    }
    .header-actions {
        width: 100%;
        justify-content: space-around;
    }
    .header-actions .btn {
        flex: 1;
        margin: 0 5px;
    }
    .mobile-menu-content {
        width: 100%;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
