/* Basic Reset & Body Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header Styles */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.main-header .logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

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

.main-nav li a {
    text-decoration: none;
    color: #555;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.main-nav li a:hover,
.main-nav li a.active {
    color: #007bff;
    background-color: #f0f8ff;
}

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

.search-box {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 8px 10px;
    outline: none;
    font-size: 0.9em;
}

.search-box button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1em;
}

.search-box button:hover {
    background-color: #0056b3;
}

.btn {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

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

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

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

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

.header-bottom {
    padding-top: 10px;
    text-align: center;
    border-top: 1px dashed #eee;
    margin-top: 10px;
}

.tagline {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.promo-banner {
    background-color: #ffe0b2;
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
    color: #333;
    font-weight: bold;
    font-size: 0.95em;
}

.promo-banner a {
    color: #e65100;
    text-decoration: none;
    font-weight: bold;
}

.promo-banner a:hover {
    text-decoration: underline;
}

/* Footer Styles */
.main-footer {
    background-color: #222;
    color: #eee;
    padding: 40px 0;
    font-size: 0.9em;
}

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

.footer-section h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2em;
    position: relative;
    padding-bottom: 5px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #007bff;
}

.footer-section p {
    margin-bottom: 10px;
    color: #bbb;
}

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

.footer-section a:hover {
    color: #66b3ff;
    text-decoration: underline;
}

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

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

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px 0 0 5px;
    background-color: #333;
    color: #fff;
    outline: none;
    font-size: 0.9em;
}

.newsletter-form .btn-subscribe {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

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

.social-media {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-media a {
    color: #fff;
    font-size: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-media a:hover {
    color: #007bff;
    transform: translateY(-3px);
}

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

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-nav {
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav {
        width: 100%;
        margin-top: 15px;
        margin-left: 0;
        display: none; /* Hidden by default on mobile, toggled by JS */
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav li {
        margin-bottom: 5px;
        border-bottom: 1px solid #eee;
    }
    .main-nav li:last-child {
        border-bottom: none;
    }
    .main-nav li a {
        padding: 12px 15px;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
    }
    .search-box {
        flex-grow: 1;
        margin-right: 10px;
    }
    .user-auth {
        display: flex;
        gap: 10px;
    }
    .menu-toggle {
        display: block; /* Show on mobile */
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-media {
        justify-content: 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;
  }
}
