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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
}

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

.index {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 - 科技深蓝风格 */
.navbar {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #38a169;
}

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

.nav-logo h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

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

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}




.nav-link:hover,
.nav-link.active {
    background-color: rgba(56, 161, 105, 0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

/* Banner样式 - 现代科技感 */
.banner {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(56, 161, 105, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(49, 130, 206, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner h1 {
    font-size: 3.8rem;
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner p {
    font-size: 1.4rem;
    margin-bottom: 15px;
    opacity: 0.9;
    font-weight: 500;
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 80px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-bottom: 3px solid #38a169;
}

.page-header h1 {
    font-size: 3rem;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-header p {
    font-size: 1.3rem;
    color: #4a5568;
    font-weight: 500;
}

/* 主要内容区域 */
.main-content {
    padding: 80px 0;
}

/* 特色商品区域 */
.featured-products {
    margin-bottom: 80px;
}

.featured-products h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 50px;
    color: #2d3748;
    font-weight: 700;
    position: relative;
}

.featured-products h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
    border-radius: 2px;
}

/* 分类卡片 */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.category-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 50px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

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

.category-card h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 700;
}

.category-card p {
    color: #4a5568;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* 商品网格布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 50px;
}

.product-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(56, 161, 105, 0.1) 50%, transparent 60%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 25px;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2d3748;
    line-height: 1.3;
    display:-webkit-box;
overflow:hidden;
text-overflow:ellipsis;
-webkit-line-clamp:1;
-webkit-box-orient:vertical;
}

.product-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #38a169;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-description {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1.1rem;
    display:-webkit-box;
overflow:hidden;
text-overflow:ellipsis;
-webkit-line-clamp:3;
-webkit-box-orient:vertical;
}

.product-seller {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #3182ce;
    font-weight: 600;
}

/* 商品详情页样式 */
.product-detail {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}




.detail-header {
    padding: 50px 40px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.detail-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 700;
}

.detail-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #38a169;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-images {
    padding: 50px 40px;
    border-bottom: 2px solid #e2e8f0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.gallery-image {
    width: 100%;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image:hover img {
    transform: scale(1.05);
}

.detail-info {
    padding: 50px 40px;
    border-bottom: 2px solid #e2e8f0;
}

.detail-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a5568;
    font-weight: 500;
}

.detail-seller {
    padding: 50px 40px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.seller-info h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
}

.seller-info img {
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.seller-contact {
    margin-bottom: 15px;
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

.seller-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.4);
}

/* 表单样式 */
.publish-form,
.auth-form {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
}

.auth-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
    border-radius: 2px;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

.form-group small {
    color: #718096;
    font-size: 0.95rem;
    margin-top: 5px;
    display: block;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input {
    width: auto;
    margin-right: 12px;
    transform: scale(1.2);
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
    padding: 15px 35px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    color: #2d3748;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-full {
    width: 100%;
}

/* 认证链接 */
.auth-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.auth-links a {
    color: #3182ce;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #38a169;
    text-decoration: underline;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: white;
    padding: 60px 0 40px;
    margin-top: 80px;
    border-top: 3px solid #38a169;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer p {
    margin-bottom: 15px;
    opacity: 0.9;
    font-size: 2.1rem;
}

.footer a {
	color: #FFFFFF;
    margin-bottom: 20px;
    opacity: 0.8;
    font-size: 20px;
    text-decoration: none;
    overflow: hidden;
    margin-right: 30px;
}


/* 加载状态 */
.loading {
    text-align: center;
    padding: 80px;
    font-size: 1.3rem;
    color: #4a5568;
    font-weight: 500;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* 成功消息样式 */
.success-message {
    background: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

/* 错误消息样式 */
.error-message {
    background: linear-gradient(135deg, #e53e3e 0%, #f56565 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #38a169 0%, #3182ce 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2f855a 0%, #2c5aa0 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    .nav-menu {
        margin-top: 20px;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .banner {
        padding: 80px 0;
    }

    .banner h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .banner p {
        font-size: 1.2rem;
    }

    .page-header {
        padding: 60px 0;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .main-content {
        padding: 60px 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .categories {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .category-card {
        padding: 30px 20px;
    }

    .publish-form,
    .auth-form {
        padding: 30px 20px;
        margin: 0 15px;
    }

    .detail-header,
    .detail-images,
    .detail-info,
    .detail-seller {
        padding: 30px 20px;
    }

    .detail-title {
        font-size: 2rem;
    }

    .detail-price {
        font-size: 2rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .banner h1 {
        font-size: 2rem;
    }

    .banner p {
        font-size: 1.1rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .featured-products h2 {
        font-size: 2.2rem;
    }

    .nav-logo h2 {
        font-size: 1.6rem;
    }

    .nav-link {
        padding: 10px 15px;
        font-size: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .product-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
    .detail-seller {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .banner h1 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}