/* Basic Resets & Global Styles */
:root {
    --primary-color: #007bff; /* Example blue */
    --secondary-color: #6c757d; /* Example gray */
    --accent-green: #28a745;
    --accent-gold: #ffc107;
    --text-color: #333;
    --background-light: #f8f9fa;
    --background-dark: #343a40;
    --border-color: #dee2e6;
    --header-height: 80px;
    --footer-height: auto;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

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

.btn-login {
    background-color: var(--accent-green);
    color: #fff;
}

.btn-login:hover {
    background-color: #218838; /* Darken green */
}

.btn-register {
    background-color: var(--accent-gold);
    color: #333;
}

.btn-register:hover {
    background-color: #e0a800; /* Darken gold */
}

/* Marquee Section */
.marquee-section {
    background-color: #fff3cd; /* Light yellow background */
    color: #856404; /* Dark yellow text */
    padding: 10px 0;
    border-bottom: 1px solid #ffeeba;
    font-size: 0.9em;
}

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

.marquee-icon {
    flex-shrink: 0;
    margin-right: 10px;
    font-size: 1.2em;
}

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

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

.marquee-content a {
    color: #856404;
    text-decoration: none;
    margin-right: 30px;
}

.marquee-content a:hover {
    text-decoration: underline;
}

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

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

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

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

.top-nav ul {
    display: flex;
}

.top-nav li {
    margin-right: 20px;
}

.top-nav a {
    color: #ccc;
    transition: color 0.3s ease;
}

.top-nav a:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

.top-auth {
    display: flex;
    align-items: center;
}

.top-auth .btn {
    margin-left: 10px;
    padding: 5px 12px;
    font-size: 0.9em;
}

.lang-selector {
    position: relative;
    margin-left: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #fff;
}

.lang-selector img {
    width: 20px;
    height: 15px;
    margin-right: 5px;
    border: 1px solid #555;
    vertical-align: middle;
}

.lang-selector .fas {
    margin-left: 5px;
    font-size: 0.8em;
    vertical-align: middle;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: #3e444a;
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
    display: none;
    padding: 5px 0;
    border-radius: 5px;
}

.lang-selector:hover .lang-dropdown, .lang-selector.active .lang-dropdown {
    display: block;
}

.lang-dropdown li {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    color: #fff;
}

.lang-dropdown li:hover {
    background-color: #555;
    cursor: pointer;
}

.lang-dropdown li img {
    margin-right: 8px;
}

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

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

.logo img {
    height: 50px; /* Adjust as needed */
}

.primary-nav ul {
    display: flex;
}

.primary-nav li {
    margin-left: 30px;
    position: relative;
}

.primary-nav a {
    color: #fff;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.primary-nav a:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

.primary-nav .has-dropdown:hover > a {
    color: var(--accent-gold);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #3e444a;
    min-width: 180px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 99;
    display: none;
    padding: 10px 0;
    border-radius: 5px;
}

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

.dropdown-menu a {
    color: #fff;
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
    font-weight: normal;
}

.dropdown-menu a:hover {
    background-color: #555;
    color: var(--accent-gold);
}

.mobile-menu-toggle {
    font-size: 1.8em;
    cursor: pointer;
    display: none; /* Hidden on desktop */
    color: #fff;
}

/* Footer Styles */
.main-footer {
    background-color: var(--background-dark);
    color: #ccc;
    padding: 40px 0 20px;
    font-size: 0.9em;
    border-top: 5px solid var(--accent-gold);
}

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

.footer-col h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
}

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

.footer-col ul {
    padding: 0;
}

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

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

.footer-col a:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

.social-links a {
    display: inline-block;
    font-size: 1.5em;
    margin-right: 15px;
    color: #fff;
    transition: color 0.3s ease;
}

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

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

.payment-icons img, .cert-icons img {
    height: 30px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.payment-icons img:hover, .cert-icons img:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #aaa;
}

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

.footer-bottom a {
    color: var(--accent-gold);
}

/* FontAwesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* Responsive adjustments */
@media (max-width: 992px) {
    .primary-nav {
        display: none; /* Hide main nav on smaller screens */
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: #3e444a;
        padding: 15px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        z-index: 98;
    }
    .primary-nav.active {
        display: flex;
    }
    .primary-nav li {
        margin: 0;
        border-bottom: 1px solid #555;
    }
    .primary-nav li:last-child {
        border-bottom: none;
    }
    .primary-nav a {
        padding: 12px 20px;
        display: block;
    }
    .primary-nav .has-dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: #4a5056;
        border-radius: 0;
        padding: 0;
        display: none;
    }
    .dropdown-menu.active {
        display: block;
    }
    .dropdown-menu a {
        padding-left: 40px;
    }
    .mobile-menu-toggle {
        display: block; /* Show mobile toggle */
    }
    .header-main-nav .container {
        justify-content: space-between;
    }
    .header-top-bar .top-nav {
        display: none; /* Hide top nav on smaller screens */
    }
    .header-top-bar .container {
        justify-content: center;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col {
        margin-bottom: 20px;
    }
    .footer-col ul {
        padding-left: 0;
    }
    .footer-col li {
        display: inline-block;
        margin: 0 10px;
    }
    .social-links, .payment-icons, .cert-icons {
        justify-content: center;
    }
    .top-auth {
        flex-direction: column;
        align-items: center;
    }
    .top-auth .btn {
        margin: 5px 0;
    }
    .lang-selector {
        margin-left: 0;
        margin-top: 10px;
    }
    .marquee-container {
        padding: 0 5px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
