/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 导航栏样式 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #2c3e50;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
    padding: 10px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

/* Banner样式 */
.banner {
	margin-bottom: 50px;
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 按钮样式 */
.btn-primary {
    background: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    background: #2980b9;
}

/* 分区标题 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2c3e50;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-condition {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.product-seller {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* 分类网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.category-card {
    background: white;
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.category-card p {
    color: #7f8c8d;
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

/* 页面头部 */
.page-header {
    background: #2c3e50;
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* 详情页样式 */
.detail-container {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 40px 0;
}

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

.product-images img {
    object-fit: cover;
    border-radius: 10px;
}

.detail-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.detail-price {
    font-size: 2rem;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 20px;
}

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

.meta-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.meta-item strong {
    color: #2c3e50;
}

.detail-description {
    line-height: 1.8;
    margin-bottom: 30px;
}

.seller-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

/* 表单样式 */
.publish-section,
.auth-section {
    padding: 60px 0;
}

.auth-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.publish-form,
.auth-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 50px 0;
    margin-top: 50px;
}

.footer a{
    color: white;
    
}



/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav-menu {
        margin-top: 15px;
        gap: 15px;
    }
    
    .banner-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-container {
        padding: 20px;
        margin: 20px 0;
    }
    
    .auth-container {
        margin: 0 20px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    color: #7f8c8d;
}

/* 错误消息 */
.error-message {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* 成功消息 */
.success-message {
    background: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}