/* 通用样式 */
body {
    font-family: "微软雅黑", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

/* 顶部用户信息栏样式 */
.top-bar {
    background-color: #f8f8f8;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.top-bar > div {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

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

.top-bar .layui-col-md8 {
    flex: 2;
    min-width: 0;
}

.top-bar .layui-col-md4 {
    flex: 1;
    text-align: right;
    white-space: nowrap;
}

/* 移动端顶部栏优化 */
@media screen and (max-width: 768px) {
    .top-bar {
        padding: 6px 0;
        font-size: 13px;
    }
    
    .top-bar > div {
        padding: 0 15px;
    }
    
    .top-bar .separator {
        margin: 0 5px;
    }
}

@media screen and (max-width: 600px) {
    .top-bar {
        padding: 5px 0;
        font-size: 12px;
    }
    
    .top-bar > div {
        padding: 0 10px;
    }
    
    .top-bar .layui-row {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .top-bar .layui-col-md8,
    .top-bar .layui-col-md4 {
        flex: none;
        text-align: center;
        width: 100%;
    }
    
    .top-bar .layui-col-md4 {
        order: -1;
    }
    
    .top-bar .separator {
        margin: 0 3px;
    }
    
    .top-bar .quick-links {
        margin-top: 2px;
    }
}

.top-bar .user-info,
.top-bar .quick-links {
    display: inline-block;
}

.top-bar .separator {
    margin: 0 10px;
    color: #ccc;
}

.top-bar a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: #1E9FFF;
}

.top-bar .username-link {
    color: #1E9FFF;
    font-weight: bold;
}

/* 购物车角标样式 */
.cart-link {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #FF5722;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    padding: 0 4px;
    display: none;
    box-sizing: border-box;
}

.cart-badge.show {
    display: block;
}

/* 移动端优化 */
@media screen and (max-width: 600px) {
    .cart-badge {
        top: -6px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 11px;
        padding: 0 3px;
    }
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: relative;
}

.header-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav a:hover {
    color: #1E9FFF;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .nav a {
        font-size: 14px;
    }
}

@media screen and (max-width: 600px) {
    .header-content {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    /* 移动端菜单 */
    .mobile-menu-btn {
        display: block;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 1000;
    }
    
    .nav.show {
        max-height: 500px;
        padding: 10px 0;
    }
    
    .nav a {
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
        font-size: 16px;
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
}

/*  banner样式 */
.banner {
    background-color: #f5f5f5;
    padding: 60px 0;
    text-align: center;
}

.banner h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.banner p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.banner-btn {
    display: inline-block;
    padding: 10px 30px;
    background-color: #1E9FFF;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
}

.banner-btn:hover {
    background-color: #0081FF;
}

/* 内容区域 */
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

/* 表单样式 */
.form-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

/* 底部样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-column {
    flex: 1;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-column p {
    line-height: 1.6;
    font-size: 14px;
    color: #ccc;
}

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

/* 响应式设计 */
@media screen and (max-width: 1200px) {
    .header-content,
    .container,
    .footer-content {
        width: 90%;
    }
}

@media screen and (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .banner h1 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
}