@import "header.css";
/* General Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

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

/* Forum Header Section */
.forum-header {
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.forum-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.categories ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
}

.categories ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

.categories ul li a:hover,
.categories ul li a.active {
    color: #ff7f50;
}

.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    width: 200px;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #ff7f50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #e6693e;
}

/* New Article Button Section - 样式已整合到 .forum-header-right 中 */

.new-post-button {
    padding: 10px 20px;
    background-color: #ff7f50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.new-post-button:hover {
    background-color: #f55219;
}

/* Main Forum Content Section */
.forum-main {
    display: flex;
    gap: 20px;
}

/* Left Column - Posts Section */
.left-column {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-item {
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.post-header h3 {
    font-size: 1.5em;
    margin: 0;
    color: #333;
}

.post-user {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

.post-content {
    margin: 15px 0;
    color: #555;
}

.post-footer {
    font-size: 0.9em;
    color: #777;
    display: flex;
    justify-content: space-between;
}

/* Right Column - Additional Info Section */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-posts, .active-users {
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.popular-posts h2, .active-users h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.popular-posts ul, .active-users ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts ul li, .active-users ul li {
    margin-bottom: 10px;
}

.popular-posts ul li a, .active-users ul li a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.popular-posts ul li a:hover, .active-users ul li a:hover {
    color: #ff7f50;
}

/* 热门帖子样式 */
.popular-post-item {
    display: block;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
}

.popular-post-item:hover {
    background-color: #fff7ed;
    border-color: #ff7f50;
    transform: translateX(2px);
    text-decoration: none;
    color: inherit;
}

.popular-post-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.popular-post-category {
    background: #f0f0f0;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.no-popular-posts {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* 帖子列表样式 */
.post-item {
    background: #fff;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    border-left: 4px solid #ff7f50;
}

/* 紧凑型帖子样式 */
.post-item-compact {
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid #ff7f50;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-item-compact:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-header h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.4;
}

.post-header h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-header h3 a:hover {
    color: #ff7f50;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.post-meta i {
    color: #ff7f50;
}

.post-content {
    margin: 15px 0;
    color: #555;
    line-height: 1.6;
}

.post-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
    margin: 10px 0;
}

.post-location {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.post-footer {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.post-footer span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-footer i {
    color: #ff7f50;
}

/* 紧凑型帖子头部样式 */
.post-header-compact h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
}

.post-header-compact h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-header-compact h3 a:hover {
    color: #ff7f50;
}

.post-meta-compact {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.post-meta-compact span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 12px;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.post-meta-compact .post-user {
    background: #e3f2fd;
    color: #1976d2;
}

.post-meta-compact .post-category {
    background: #fff3e0;
    color: #f57c00;
}

.post-meta-compact .post-time {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* 紧凑型帖子内容样式 */
.post-content-compact {
    margin: 0;
    color: #555;
    line-height: 1.4;
}

.post-content-compact p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #666;
}

.post-details-compact {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.post-details-compact span {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.post-price-compact {
    background: #ffebee;
    color: #c62828;
    font-weight: 600;
}

.post-location-compact {
    background: #e8f5e8;
    color: #2e7d32;
}

.post-views-compact {
    background: #f5f5f5;
    color: #666;
}

.post-views-compact i {
    color: #ff7f50;
    font-size: 10px;
}

/* 无帖子状态 */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 20px 0;
}

.no-posts i {
    font-size: 80px;
    color: #ff7f50;
    margin-bottom: 24px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

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

.no-posts h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
}

.no-posts p {
    color: #666;
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 1.6;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e66b40, #d55a2b);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 127, 80, 0.4);
}

.btn-primary::before {
    content: "✍️";
    font-size: 18px;
}

/* 分页样式 */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.page-item {
    display: flex;
}

.page-link {
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    min-width: 40px;
    justify-content: center;
}

.page-link:hover {
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    color: white;
    border-color: #ff7f50;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 127, 80, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    color: white;
    border-color: #ff7f50;
    box-shadow: 0 2px 4px rgba(255, 127, 80, 0.3);
}

.page-item.disabled .page-link {
    color: #999;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background-color: #f8f9fa;
    color: #999;
    transform: none;
    box-shadow: none;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    text-align: center;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-container {
        padding: 0;
        margin: 0;
        background: #f8f9fa;
        min-height: 100vh;
    }
    
    .forum-header {
        background: linear-gradient(135deg, #ff7f50, #ff6b35);
        padding: 20px 16px;
        margin: 0;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .forum-header-right {
        flex-direction: column;
        gap: 16px;
        margin-top: 16px;
    }
    
    .search-bar {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 12px;
        background: rgba(255, 255, 255, 0.15);
        padding: 8px;
        border-radius: 25px;
        backdrop-filter: blur(10px);
    }
    
    .search-bar input[type="text"] {
        flex: 1;
        padding: 12px 16px;
        font-size: 16px;
        border: none;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 20px;
        outline: none;
        color: #333;
    }
    
    .search-bar input[type="text"]::placeholder {
        color: #666;
    }
    
    .search-bar button {
        padding: 12px 20px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
        border-radius: 20px;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .search-bar button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }
    
    .categories {
        margin-bottom: 16px;
    }
    
    .categories ul {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .categories ul::-webkit-scrollbar {
        display: none;
    }
    
    .categories ul li {
        flex-shrink: 0;
    }
    
    .categories ul li a {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 25px;
        background-color: rgba(255, 255, 255, 0.15);
        color: white;
        font-weight: 500;
        white-space: nowrap;
        transition: all 0.3s ease;
        border: 2px solid transparent;
    }
    
    .categories ul li a:hover {
        background-color: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .categories ul li a.active {
        background-color: rgba(255, 255, 255, 0.9);
        color: #ff7f50;
        border-color: rgba(255, 255, 255, 0.3);
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .new-post-button {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.9);
        color: #ff7f50;
        border: 2px solid rgba(255, 255, 255, 0.3);
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .new-post-button:hover {
        background: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }
    
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .forum-main {
        flex-direction: column;
        gap: 0;
        padding: 16px;
    }
    
    .left-column {
        order: 1;
        background: white;
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        margin-bottom: 16px;
    }
    
    .right-column {
        order: 2;
        gap: 16px;
        display: none; /* 在移动端隐藏右侧栏，节省空间 */
    }
    
    .popular-posts, .active-users {
        padding: 20px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        margin-bottom: 16px;
    }
    
    .popular-posts h2, .active-users h2 {
        font-size: 1.4em;
        margin-bottom: 16px;
        color: #333;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .popular-posts h2::before, .active-users h2::before {
        content: "🔥";
        font-size: 1.2em;
    }
    
    /* 紧凑型帖子在移动端的响应式 */
    .post-item-compact {
        padding: 0;
        margin-bottom: 16px;
        border-radius: 0;
        box-shadow: none;
        border: none;
        background: transparent;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 16px;
    }
    
    .post-item-compact:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .post-header-compact h3 {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    .post-header-compact h3 a {
        color: #333;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .post-header-compact h3 a:hover {
        color: #ff7f50;
    }
    
    .post-meta-compact {
        gap: 8px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }
    
    .post-meta-compact span {
        font-size: 13px;
        padding: 4px 10px;
        border-radius: 15px;
        font-weight: 500;
        background: #f8f9fa;
        color: #666;
    }
    
    .post-meta-compact .post-user {
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        color: #1976d2;
    }
    
    .post-meta-compact .post-category {
        background: linear-gradient(135deg, #fff3e0, #ffe0b2);
        color: #f57c00;
    }
    
    .post-meta-compact .post-time {
        background: linear-gradient(135deg, #f3e5f5, #e1bee7);
        color: #7b1fa2;
    }
    
    .post-content-compact p {
        font-size: 15px;
        line-height: 1.6;
        color: #555;
        margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    }
    
    .post-details-compact {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .post-details-compact span {
        font-size: 13px;
        padding: 4px 10px;
        border-radius: 15px;
        font-weight: 500;
    }
    
    .post-price-compact {
        background: linear-gradient(135deg, #ffebee, #ffcdd2);
        color: #c62828;
        font-weight: 600;
        font-size: 14px;
    }
    
    .post-location-compact {
        background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
        color: #2e7d32;
    }
    
    .post-views-compact {
        background: #f5f5f5;
        color: #666;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .post-views-compact i {
        color: #ff7f50;
        font-size: 12px;
    }
    
    /* 热门帖子在移动端的响应式 */
    .popular-post-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 8px;
        border: 1px solid #f0f0f0;
    }
    
    .popular-post-title {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    .popular-post-meta {
        font-size: 12px;
    }
    
    .popular-post-category {
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 10px;
    }
    
    /* 分页在移动端的优化 */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 36px;
    }
    
    .pagination-info {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 更小屏幕的优化 */
@media (max-width: 480px) {
    .content-container {
        padding: 0;
        margin: 0;
    }
    
    .forum-header {
        padding: 16px 12px;
        gap: 16px;
    }
    
    .categories ul {
        gap: 6px;
        padding: 6px 0;
    }
    
    .categories ul li a {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .search-bar {
        padding: 6px;
        gap: 8px;
    }
    
    .search-bar input[type="text"] {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .search-bar button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .new-post-button {
        padding: 14px;
        font-size: 16px;
    }
    
    .forum-main {
        padding: 12px;
    }
    
    .left-column {
        padding: 16px;
        border-radius: 12px;
    }
    
    .post-item-compact {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .post-header-compact h3 {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .post-meta-compact {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .post-meta-compact span {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .post-content-compact p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .post-details-compact {
        gap: 6px;
    }
    
    .post-details-compact span {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .popular-posts, .active-users {
        padding: 16px;
        border-radius: 12px;
    }
    
    .popular-posts h2, .active-users h2 {
        font-size: 1.3em;
        margin-bottom: 14px;
    }
    
    .popular-post-item {
        padding: 10px;
        margin-bottom: 6px;
        border-radius: 8px;
    }
    
    .popular-post-title {
        font-size: 13px;
    }
    
    .no-posts {
        padding: 60px 16px;
        margin: 16px 0;
    }
    
    .no-posts i {
        font-size: 60px;
        margin-bottom: 20px;
    }
    
    .no-posts h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .no-posts p {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .btn-primary {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .pagination-info {
        font-size: 12px;
        padding: 6px 12px;
    }
}

