/* shared_css: 基础样式和通用组件 */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

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

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

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

.main-header .logo img {
    height: 40px;
}

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

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

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: #007bff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 4px;
    padding: 10px 0;
}

.dropdown-content a {
    color: #333 !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: normal !important;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #007bff !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.user-actions .btn {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    margin-left: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 999;
    overflow-y: auto;
    padding-top: 80px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

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

.mobile-menu ul li {
    border-bottom: 1px solid #eee;
}

.mobile-menu ul li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.mobile-menu ul li a:hover {
    background-color: #f5f5f5;
}

.mobile-submenu {
    display: none;
    list-style: none;
    padding-left: 20px;
    background-color: #f9f9f9;
}

.mobile-submenu li a {
    padding-left: 30px;
    font-weight: normal;
    color: #555;
}

.arrow {
    border: solid black;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.arrow.down {
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
}

.arrow.up {
    transform: rotate(-135deg);
    -webkit-transform: rotate(-135deg);
}

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

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

.main-footer .footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    padding-right: 20px;
}

.main-footer h3, .main-footer h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.main-footer p, .main-footer ul li a {
    color: #bdc3c7;
    text-decoration: none;
}

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

.main-footer ul li {
    margin-bottom: 10px;
}

.main-footer ul li a:hover {
    color: #007bff;
}

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

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

.main-footer .social-icons img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

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

.main-footer .newsletter input[type="email"] {
    border: 1px solid #555;
    padding: 10px;
    border-radius: 4px 0 0 4px;
    background-color: #34495e;
    color: #ecf0f1;
    flex-grow: 1;
}

.main-footer .newsletter button {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.main-footer .newsletter button:hover {
    background-color: #0056b3;
}

.main-footer .footer-bottom {
    text-align: center;
    border-top: 1px solid #34495e;
    padding-top: 20px;
    margin-top: 20px;
}

.main-footer .footer-bottom p {
    margin: 5px 0;
    color: #bdc3c7;
}

.main-footer .footer-bottom a {
    color: #007bff;
    text-decoration: none;
}

.main-footer .footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    .user-actions {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .main-header .container {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .main-footer .footer-top {
        flex-direction: column;
    }
    .main-footer .footer-section {
        padding-right: 0;
        border-bottom: 1px solid #34495e;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .main-footer .footer-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .main-footer .newsletter form {
        flex-direction: column;
    }
    .main-footer .newsletter input[type="email"] {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    .main-footer .newsletter button {
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .main-header .logo img {
        height: 35px;
    }
    .main-header {
        padding: 10px 0;
    }
    .mobile-menu {
        padding-top: 60px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
