/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.base-container {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.base-header {
    background-color: #fff;
    color: #333;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    position: relative;
    z-index: 1000;
}

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

/* Left header area */
.header-left {
    display: flex;
    align-items: center;
}

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

.logo-name img {
    max-height: 60px;
    height: auto;
    width: auto;
    margin-right: 10px;
}

.logo-name h1 {
    margin: 0;
    font-size: 24px;
}

/* Right header area */
.header-right {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
}

/* User section styles */
.user-section {
    position: relative;
}

.login-link {
    text-decoration: none;
    color: #007bff;
    margin-right: 15px;
}

.user-dropdown {
    position: relative;
    cursor: pointer;
}

.username {
    color: #333;
    font-size: 16px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
}

.dropdown-content a {
    display: block;
    padding: 5px 0;
    color: #333;
    text-decoration: none;
}

.dropdown-content a:hover {
    background-color: #f0f0f0;
}

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

/* Mobile menu icon */
.menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.menu-icon span {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Footer styles */
.base-footer {
    background-color: #000;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

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

.footer-section {
    flex: 1;
    min-width: 200px;
    margin: 10px;
}

.footer-section h3 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 18px;
}

.footer-section p {
    color: #aaa;
}

.mambabit-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 10px;
    min-width: 200px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.mambabit-logo img {
    width: auto;
    max-width: 160px;
    height: auto;
}

.mambabit-logo h3 {
    margin-bottom: 5px;
    font-size: 18px;
    color: #fff;
}

/* WeChat QR code styles */
.wechat-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wechat-qr img {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin-bottom: 10px;
}

.wechat-qr p {
    font-size: 14px;
    color: #aaa;
}

.footer-links {
    flex: 1;
    margin: 0 20px 20px 20px;
    min-width: 200px;
}

.footer-links h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #fff;
}

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

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

.footer-links ul li a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-section a {
    color: #aaa;
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    color: #aaa;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
}

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

.base-content {
    flex: 1;
    padding: 0;
    background-color: #f9f9f9;
}

/* 响应式设计 - 移动端优化 */
@media screen and (max-width: 768px) {
    /* 优化导航菜单 */
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        margin: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        padding: 15px 20px;
        margin: 0;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    
    .menu-icon {
        display: flex;
    }
    
    /* 当菜单展开时的图标动画 */
    .nav-links.show + .user-section + .menu-icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-links.show + .user-section + .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-links.show + .user-section + .menu-icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* 优化底部区域 */
    .footer-content {
        flex-direction: column;
        padding: 0 15px;
    }
    
    .footer-section {
        width: 100%;
        margin: 15px 0;
        padding: 0;
    }
    
    .footer-links {
        width: 100%;
        margin: 15px 0;
    }
    
    .wechat-qr {
        margin-top: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
        width: 100%;
    }
    
    .footer-bottom {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid #333;
    }
    
    /* 确保登录链接在移动端也清晰可见 */
    .login-link {
        padding: 8px 15px;
        background-color: #0d6efd;
        color: white;
        border-radius: 4px;
        margin-right: 15px;
    }
    
    .user-dropdown {
        margin-right: 15px;
    }
    
    /* .user-dropdown a {
        padding: 8px 15px;
        background-color: #0d6efd;
        color: white !important;
        border-radius: 4px;
        display: inline-block;
        text-decoration: none;
    } */

    .user-dropdown a {
    background-color: transparent; /* 将背景色设置为透明 */
    padding: 0;                   /* 移除内边距 */
    /* 以下属性可以保留或根据需要调整 */
    display: inline-block;
    text-decoration: none;
    /* color 属性会被您在 base.html 中的内联样式覆盖，所以这里不需要改 */
    }
}

/* 针对更小屏幕的额外优化 */
@media screen and (max-width: 480px) {
    .base-container {
        width: 100%;
        padding: 0 10px;
    }
    
    .logo-name img {
        height: 35px;
    }
    
    .footer-section h3 {
        font-size: 16px;
    }
    
    .footer-section p, 
    .footer-links ul li a,
    .wechat-qr p,
    .footer-bottom p {
        font-size: 14px;
    }
}