/* 交易列表页面样式 */

/* 页面标题区域 */
.page-header {
    background: linear-gradient(135deg, #5D3FD3 0%, #8D71FF 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

.page-title h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-title p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* 内容布局 */
.content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.main-content {
    grid-column: 1;
}

.sidebar {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 筛选区域 */
.filter-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* 交易类型标签 */
.trade-type-tabs {
    display: flex;
    gap: 8px;
}

.trade-type-tab {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trade-type-tab:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

.trade-type-tab.active {
    background: var(--gradient-primary);
    border-color: var(--main-color);
    color: white;
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.3);
}

/* 排序下拉菜单 */
.sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 120px;
}

.sort-dropdown-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.15);
}

.sort-dropdown-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sort-dropdown-btn.active i {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.sort-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 交易列表区域 */
.trade-list-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.trade-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.list-title {
    font-size: 16px;
    color: #333;
}

.list-title strong {
    color: var(--main-color);
}

/* 视图切换按钮 */
.view-options {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

.view-btn.active {
    background: var(--main-color);
    border-color: var(--main-color);
    color: white;
}

/* 交易列表 */
.trade-list {
    margin-bottom: 30px;
}

.trade-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.trade-item:hover {
    background-color: #fafafa;
    margin: 0 -15px;
    padding: 20px 15px;
    border-radius: 12px;
}

.trade-item:last-child {
    border-bottom: none;
}

.trade-content {
    flex: 1;
    margin-right: 15px;
}

.trade-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.trade-title:hover {
    color: var(--main-color);
}

.trade-info {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.trade-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.trade-time, .trade-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trade-quantity {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
    min-width: 60px;
}

.trade-price {
    color: var(--main-color);
    font-weight: bold;
    font-size: 16px;
    text-align: right;
    min-width: 100px;
}

/* 分页区域 */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-info strong {
    color: var(--main-color);
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled) {
    border-color: var(--main-color);
    color: var(--main-color);
    background: var(--light-purple);
}

.page-btn.active {
    background: var(--main-color);
    border-color: var(--main-color);
    color: white;
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.3);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    border-color: #e9ecef;
    color: #666;
    background: white;
}

.page-ellipsis {
    color: #666;
    font-size: 14px;
    padding: 0 8px;
}

/* 右侧推荐交易区域 */
.recommended-trades-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.recommended-trades-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.recommended-trade-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recommended-trade-item:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.1);
    transform: translateY(-2px);
}

.recommended-trade-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--gradient-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(93, 63, 211, 0.3);
}

.recommended-trade-badge i {
    font-size: 8px;
}

.recommended-trade-content {
    flex: 1;
    margin-right: 60px;
}

.recommended-trade-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    cursor: pointer;
    transition: color 0.3s ease;
}

.recommended-trade-title:hover {
    color: var(--main-color);
}

.recommended-trade-info {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-trade-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #999;
}

.recommended-trade-time, .recommended-trade-location {
    display: flex;
    align-items: center;
    gap: 3px;
}

.recommended-trade-price {
    color: var(--main-color);
    font-weight: bold;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

/* 热门标签区域 */
.hot-tags-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.hot-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hot-tag {
    background: var(--light-purple);
    color: var(--main-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.hot-tag:hover {
    background: var(--main-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(93, 63, 211, 0.3);
    text-decoration: none;
}

/* 筛选通知样式 */
.filter-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--main-color);
}

.filter-notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.notification-content i {
    color: var(--main-color);
    font-size: 16px;
}

/* 商品分类标签按钮 */
.category-tabs {
    display: flex;
    gap: 8px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-tab:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.15);
}

.category-tab.active {
    background: var(--gradient-primary);
    border-color: var(--main-color);
    color: white;
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.3);
    transform: translateY(-1px);
}

.category-tab i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.category-tab:hover i {
    transform: scale(1.1);
}

.category-tab.active i {
    transform: scale(1.1);
}

.category-tab span {
    font-weight: 500;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .main-content {
        grid-column: 1;
    }
    
    .sidebar {
        grid-column: 1;
    }
    
    .filter-row {
        gap: 20px;
    }
    
    .filter-group {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .page-title h1 {
        font-size: 28px;
    }
    
    .page-title p {
        font-size: 14px;
    }
    
    .filter-section {
        padding: 20px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .category-tabs {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }
    
    .category-tab {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .category-tab i {
        font-size: 12px;
    }
    
    .trade-type-tabs {
        width: 100%;
        justify-content: space-between;
    }
    
    .trade-type-tab {
        flex: 1;
        text-align: center;
    }
    
    .trade-list-section {
        padding: 20px;
    }
    
    .trade-list-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .trade-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .trade-quantity, .trade-price {
        text-align: left;
        min-width: auto;
    }
    
    .pagination-section {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .recommended-trades-section,
    .hot-tags-section {
        padding: 20px;
    }
    
    .recommended-trade-item {
        padding: 12px;
    }
    
    .recommended-trade-content {
        margin-right: 50px;
    }
    
    .hot-tags-list {
        gap: 6px;
    }
    
    .hot-tag {
        padding: 5px 10px;
        font-size: 11px;
    }
} 