/* Basic Reset & Body Styles */
:root {
    --primary-color: #008000; /* Green */
    --secondary-color: #FFD700; /* Gold */
    --accent-color: #FF4500; /* Orange for emphasis */
    --dark-bg: #1a1a1a;
    --light-text: #f0f0f0;
    --white: #ffffff;
    --gray-light: #cccccc;
    --gray-dark: #333333;
    --font-family-primary: 'Arial', sans-serif;
    --font-family-secondary: 'Verdana', sans-serif;
}

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

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

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

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

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

/* Header Styles */
.main-header {
    background-color: var(--gray-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.language-selector a {
    color: var(--gray-light);
    margin: 0 5px;
}

.language-selector a.active {
    color: var(--secondary-color);
    font-weight: bold;
}

.user-actions .btn-login,
.user-actions .btn-signup {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    margin-left: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.user-actions .btn-login {
    background-color: var(--primary-color);
    color: var(--white);
}

.user-actions .btn-login:hover {
    background-color: #006400; /* Darker green */
}

.user-actions .btn-signup {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
}

.user-actions .btn-signup:hover {
    background-color: #e6c200; /* Darker gold */
}

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

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

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

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

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

.nav-link {
    display: block;
    padding: 10px 0;
    color: var(--light-text);
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    background-color: var(--gray-dark);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
    z-index: 1;
    top: 100%;
    left: 0;
    padding: 10px 0;
    border-top: 3px solid var(--primary-color);
}

.nav-item:hover > .submenu {
    display: block;
}

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

.submenu li a:hover {
    background-color: #444;
    color: var(--secondary-color);
}

.arrow-down {
    margin-left: 5px;
    font-size: 0.8em;
}

.search-form {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.search-form input[type="search"] {
    border: 1px solid var(--primary-color);
    background-color: #222;
    color: var(--light-text);
    padding: 8px 10px;
    border-radius: 5px 0 0 5px;
    outline: none;
}

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

.search-form button:hover {
    background-color: #006400; /* Darker green */
}

/* Mobile Toggle */
.menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 20px;
}

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

/* Footer Styles */
.main-footer {
    background-color: #111;
    color: var(--gray-light);
    padding: 40px 0 20px;
    font-size: 0.9em;
    border-top: 3px solid var(--primary-color);
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 250px;
    margin: 0 15px 30px 0;
}

.footer-widget:last-child {
    margin-right: 0;
}

.footer-widget h3 {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

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

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

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

.footer-widget ul li a {
    color: var(--gray-light);
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
}

.social-icons a {
    display: inline-block;
    color: var(--light-text);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

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

.payment-methods h3 {
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.payment-icon {
    height: 30px;
    margin-right: 10px;
    filter: grayscale(100%) brightness(150%); /* Make icons fit dark theme */
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.copyright {
    margin-bottom: 10px;
    color: var(--gray-light);
}

.licensing {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.license-logo {
    height: 40px;
    margin-right: 15px;
    filter: brightness(0.8);
}

.licensing p {
    margin: 0;
    color: var(--gray-light);
    font-size: 0.85em;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--gray-dark);
        position: absolute;
        top: 100%;
        left: 0;
        text-align: left;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }

    .nav-menu.active {
        display: flex;
    }

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

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

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

    .nav-link::after {
        display: none;
    }

    .has-submenu:hover > .submenu {
        display: none; /* Hide on hover for mobile, JS will handle */
    }

    .submenu {
        position: static;
        box-shadow: none;
        border-top: none;
        background-color: #2a2a2a;
        padding-left: 20px;
    }

    .submenu li a {
        padding: 10px 30px;
    }

    .menu-toggle {
        display: block;
    }

    .header-main-nav .container {
        justify-content: space-between;
    }

    .navbar-brand {
        flex-grow: 1;
    }

    .search-item {
        display: none; /* Hide search on mobile menu, simplify */
    }
}

@media (max-width: 768px) {
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .language-selector, .user-actions {
        margin-bottom: 10px;
    }
    .user-actions .btn-login,
    .user-actions .btn-signup {
        margin: 0 5px;
    }

    .footer-widgets {
        flex-direction: column;
        align-items: center;
    }

    .footer-widget {
        min-width: unset;
        width: 90%;
        margin: 0 0 30px 0;
        text-align: center;
    }

    .footer-widget h3 {
        text-align: center;
    }

    .footer-widget ul {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
    .payment-methods {
        text-align: 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;
  }
}
