/* PC版主样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: nowrap;
}

.logo {
    margin-left: 20px;
    min-width: 200px;
}

.logo h1 {
    color: #ff5000;
    font-size: 30px;
    margin-bottom: 0;
    white-space: nowrap;
}

.logo p {
    font-size: 15px;
    color: #666;
    white-space: nowrap;
}

.search-bar {
    display: flex;
    width: 250px;
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 15px 0 0 15px;
    outline: none;
    font-size: 13px;
}

.search-bar button {
    padding: 6px 12px;
    background-color: #ff5000;
    color: white;
    border: none;
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    font-size: 13px;
}

.main-nav {
    flex: 1;
    margin: 0 15px;
    min-width: 0;
    /* 允许导航在空间不足时收缩 */
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: nowrap;
}

.main-nav li {
    margin: 0 8px;
}

.main-nav a {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    white-space: nowrap;
    display: block;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #fff5f0;
    color: #ff5000;
}

.user-actions {
    display: flex;
    gap: 6px;
    min-width: 150px;
    justify-content: flex-end;
}

.btn {
    padding: 6px 12px;
    margin-right: 10px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background-color: #ff5000;
    color: white;
}

.btn-primary:hover {
    background-color: #e04500;
}

.btn-secondary {
    background-color: #f1f1f1;
    color: #666;
}

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

.btn-large {
    padding: 10px 20px;
    font-size: 14px;
}

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

/* 轮播图 */
.banner {
    height: 400px;
    background: linear-gradient(135deg, #ff5000, #ff7043);
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    text-align: center;
    color: white;
    max-width: 600px;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* 分类导航 */
.categories {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.categories h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
}

.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

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

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 28px;
    color: white;
}

.category-item span {
    font-size: 14px;
    color: #666;
}

/* 求购区域 */
.hot-wants,
.new-wants {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    color: #333;
}

.more-link {
    text-decoration: none;
    color: #ff5000;
    font-size: 16px;
    font-weight: 500;
}

.wants-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.want-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
}

.want-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.want-image {
    width: 180px;
    height: 180px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.want-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.want-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.want-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex: 1;
}

.want-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.price {
    color: #ff5000;
    font-weight: bold;
    font-size: 20px;
}

.location {
    font-size: 14px;
    color: #999;
}

.want-user {
    display: flex;
    align-items: center;
}

.avatar-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    margin-right: 10px;
}

.want-user span {
    font-size: 14px;
    color: #999;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ff5000;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    text-decoration: none;
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ff5000;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
}

.footer-bottom p {
    color: #999;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .wants-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

    .search-bar {
        width: 100%;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
    }

    .banner {
        height: 300px;
    }

    .banner-content h2 {
        font-size: 28px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .want-card {
        flex-direction: column;
    }

    .want-image {
        width: 100%;
        height: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}