/* Basic Reset & Body Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #212529;
    --font-family-sans: 'Arial', sans-serif;
    --border-radius: 5px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header Styles */
.site-header {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

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

.logo img {
    height: 40px;
    vertical-align: middle;
}

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

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

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

.nav-link {
    color: var(--light-color);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link:focus {
    color: var(--primary-color);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--dark-color);
    min-width: 160px;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    border-radius: var(--border-radius);
    left: 0; /* Align dropdown with parent link */
    top: 100%; /* Position below parent link */
}

.dropdown-item a {
    color: var(--light-color);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.dropdown-item a:hover {
    background-color: var(--primary-color);
}

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

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

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

.user-actions {
    margin-left: 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 10px;
}

.btn:hover {
    background-color: #0056b3;
}

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

.btn-login:hover {
    background-color: #5a6268;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://example.com/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 80px 0;
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
}

.hero-subtext {
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 0;
    margin-top: auto; /* Pushes footer to bottom */
}

.footer-container {
    display: flex;
    flex-direction: column;
}

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

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

.footer-col p, .footer-col ul {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.footer-col ul li a {
    color: var(--light-color);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

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

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

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

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    background-color: #fff;
    color: var(--dark-color);
}

.btn-subscribe {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-subscribe:hover {
    background-color: #0056b3;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.legal-links {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.legal-links li a {
    color: var(--light-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .nav-list {
        display: none; /* Hide nav list by default on smaller screens */
        flex-direction: column;
        width: 100%;
        background-color: var(--dark-color);
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        padding: 1rem 0;
        box-shadow: var(--box-shadow);
    }

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

    .nav-item {
        margin: 0;
        text-align: center;
        width: 100%;
    }

    .nav-link {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .menu-toggle {
        display: block; /* Show toggle button */
    }

    .user-actions {
        margin-left: auto; /* Push to the right */
        order: 3; /* Position after nav toggle */
    }

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

    .logo {
        order: 1;
    }

    .main-nav {
        order: 2;
        flex-grow: 0;
    }

    .dropdown-menu {
        position: static; /* Make dropdown static in mobile nav */
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        width: 100%;
        padding: 0;
        border-radius: 0;
    }

    .dropdown-menu li a {
        padding-left: 40px; /* Indent dropdown items */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col {
        margin-bottom: 2rem;
    }

    .social-links {
        margin-top: 1rem;
        justify-content: center;
        display: flex;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form input, .newsletter-form button {
        width: 80%;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .legal-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn-large {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

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

    .main-nav {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }

    .user-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
