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

/* Body and Typography Defaults */
body {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Links */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    cursor: pointer;
}

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

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

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

.btn-secondary {
    color: #007bff;
    background-color: transparent;
    border-color: #007bff;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Forms */
.search-form {
    display: flex;
    gap: 5px;
}

.search-form input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    flex-grow: 1;
}

.search-form button {
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Header Specific Styles */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    padding: 10px 0;
}

.header-top-bar {
    background-color: #f0f0f0;
    padding: 5px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #e0e0e0;
}

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

.header-top-bar .top-nav ul {
    list-style: none;
    display: flex;
}

.header-top-bar .top-nav li {
    margin-left: 15px;
}

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

.logo-area {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.primary-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.primary-navigation li {
    position: relative;
}

.primary-navigation .submenu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 180px;
    z-index: 100;
    padding: 10px 0;
    border-radius: 4px;
}

.primary-navigation li:hover > .submenu {
    display: block;
}

.primary-navigation .submenu li {
    margin: 0;
}

.primary-navigation .submenu a {
    padding: 8px 15px;
    display: block;
    white-space: nowrap;
}

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

.menu-toggle {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.4s;
}

.header-bottom-banner {
    background-color: #ffe0b2; /* Light orange */
    padding: 10px 0;
    text-align: center;
    font-size: 0.95rem;
    color: #333;
}

.header-bottom-banner .promo-link {
    font-weight: bold;
    color: #e65100; /* Darker orange */
}

/* Footer Specific Styles */
.main-footer {
    background-color: #222;
    color: #bbb;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}

.footer-widgets .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

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

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

.footer-col a {
    color: #bbb;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

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

.social-icons a {
    color: #bbb;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #007bff;
}

.social-icons svg {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

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

.footer-bottom .powered-by {
    margin-left: 10px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .primary-navigation ul {
        gap: 15px;
    }
    .user-actions {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .header-top-bar .container {
        flex-direction: column;
        text-align: center;
    }
    .header-top-bar .welcome-message {
        margin-bottom: 5px;
    }
    .header-top-bar .top-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    .header-top-bar .top-nav li {
        margin: 0 10px 5px;
    }

    .header-main-content .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo-area {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }
    .primary-navigation {
        width: 100%;
        order: 3; /* Move navigation below search/user actions */
        margin-top: 15px;
    }
    .primary-navigation ul {
        flex-direction: column;
        display: none; /* Hidden by default for mobile toggle */
        width: 100%;
        text-align: center;
    }
    .primary-navigation ul.active {
        display: flex;
    }
    .primary-navigation li {
        width: 100%;
        border-top: 1px solid #eee;
    }
    .primary-navigation li:first-child {
        border-top: none;
    }
    .primary-navigation .submenu {
        position: static; /* Submenus stack vertically */
        box-shadow: none;
        background-color: #f9f9f9;
        padding: 5px 0;
        border-radius: 0;
    }
    .primary-navigation .submenu a {
        padding-left: 30px; /* Indent submenu items */
    }
    .menu-toggle {
        display: block; /* Show hamburger icon */
        order: 2; /* Position it correctly */
        margin-left: auto; /* Push to right */
    }
    .user-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        order: 2;
    }
    .search-form {
        width: 80%;
        max-width: 400px;
    }

    .footer-widgets .container {
        flex-direction: column;
        align-items: center;
    }
    .footer-col {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
    .footer-col ul {
        padding-left: 0;
    }
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: .25rem .5rem;
        font-size: 0.875rem;
    }
    .search-form input[type="search"] {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    .search-form button {
        padding: 6px 10px;
    }
    .site-logo {
        font-size: 1.2rem;
    }
    .site-logo img {
        height: 30px;
    }
    .header-bottom-banner p {
        font-size: 0.8rem;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
