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

/* Variables for colors and fonts */
:root {
    --primary-color: #4CAF50; /* Green */
    --secondary-color: #FFD700; /* Gold */
    --dark-bg: #1a1a1a;
    --light-text: #f0f0f0;
    --gray-text: #aaaaaa;
    --border-color: #333333;
    --font-family-sans: 'Roboto', sans-serif;
    --font-family-serif: 'Georgia', serif;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--light-text);
    background-color: var(--dark-bg);
}

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

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

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

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

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background-color: #66BB6A;
}

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

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

.btn-download {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    padding: 8px 15px;
    font-size: 0.9em;
}

.btn-download:hover {
    background-color: #FFEA00;
}

/* Header specific styles */
.site-header {
    background-color: #222;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: #111;
    padding: 10px 0;
    font-size: 0.85em;
    border-bottom: 1px solid #222;
}

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

.language-selector {
    margin-right: 20px;
}

.lang-option {
    color: var(--gray-text);
    margin-left: 10px;
    padding: 3px 5px;
}

.lang-option.active {
    color: var(--primary-color);
    font-weight: bold;
    border-bottom: 1px solid var(--primary-color);
}

.user-auth-links .btn {
    margin-left: 10px;
    padding: 8px 15px;
    font-size: 0.9em;
}

.header-main-nav {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand .site-logo {
    height: 40px; /* Adjust as needed */
    vertical-align: middle;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 25px;
    position: relative;
}

.nav-link {
    color: var(--light-text);
    font-weight: 500;
    padding: 5px 0;
    display: block;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    text-decoration: none;
}

.has-dropdown > .nav-link i {
    margin-left: 5px;
    font-size: 0.8em;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    list-style: none;
    padding: 10px 0;
    border-radius: 5px;
    display: none; /* Hidden by default */
}

.nav-item.has-dropdown:hover .dropdown-menu {
    display: block; /* Show on hover */
}

.dropdown-menu li a {
    color: var(--light-text);
    padding: 8px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 24px;
    cursor: pointer;
}

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

.header-bottom-info {
    background-color: #1a1a1a;
    padding: 10px 0;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    display: flex;
    flex-grow: 1;
    max-width: 300px;
    margin-right: 20px;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    background-color: #333;
    color: var(--light-text);
    font-size: 0.9em;
}

.search-input::placeholder {
    color: var(--gray-text);
}

.search-button {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    padding: 8px 12px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #66BB6A;
}

.notification-area {
    position: relative;
    cursor: pointer;
    font-size: 1.2em;
    color: var(--light-text);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #f44336; /* Red */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    line-height: 1;
}


/* Footer specific styles */
.site-footer {
    background-color: #222;
    color: var(--gray-text);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
}

.footer-top {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

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

.footer-heading {
    color: var(--primary-color);
    font-size: 1.1em;
    margin-bottom: 15px;
    text-transform: uppercase;
}

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

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

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

.footer-col ul li a {
    color: var(--gray-text);
}

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

.social-links a {
    color: var(--light-text);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

.payment-methods {
    text-align: center;
    margin-top: 30px;
}

.payment-icons img {
    height: 30px;
    margin: 0 10px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.8em;
    color: #777;
}

.copyright {
    margin-bottom: 5px;
}

.licensing-info {
    margin-top: 10px;
}

/* Marquee Section */
.marquee-section {
    background-color: #2a2a2a;
    color: var(--light-text);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

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

.marquee-icon {
    margin-right: 15px;
    font-size: 1.2em;
    color: var(--secondary-color);
}

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

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite; /* Adjust speed as needed */
}

.marquee-content a {
    color: var(--light-text);
    margin-right: 50px; /* Space between repeated content */
    white-space: nowrap;
}

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

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

/* Responsive adjustments */
@media (max-width: 992px) {
    .nav-list {
        display: none; /* Hide main nav on smaller screens */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Position below the main nav */
        left: 0;
        background-color: #2a2a2a;
        padding: 10px 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    }

    .nav-list.active {
        display: flex; /* Show when active */
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #333;
    }

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

    .nav-link {
        padding: 12px 20px;
    }

    .dropdown-menu {
        position: static; /* Make dropdowns flow within the menu */
        box-shadow: none;
        background-color: #3a3a3a;
        padding-left: 20px;
        border-radius: 0;
    }

    .nav-item.has-dropdown:hover .dropdown-menu {
        display: block;
    }

    .menu-toggle {
        display: block; /* Show hamburger icon */
        margin-left: auto; /* Push to the right */
    }

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

    .header-bottom-info .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-bar {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .top-bar-content {
        justify-content: center;
    }
    .user-auth-links {
        margin-left: 15px;
    }
    .language-selector {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .site-logo {
        height: 35px;
    }
    .user-auth-links .btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .social-links {
        text-align: center;
        margin-top: 15px;
    }
    .payment-icons img {
        height: 25px;
        margin: 0 5px;
    }
    .marquee-container {
        padding: 0 10px;
    }
    .marquee-icon {
        margin-right: 10px;
        font-size: 1em;
    }
}

/* Font Awesome for icons (assuming it's loaded elsewhere or via CDN) */
/* Example: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> */
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
