.trades-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.trades-banner {
    background: linear-gradient(135deg, #18151c 0%, #2b2633 100%);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.trades-banner-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.trades-banner-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.trades-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: var(--accent-1);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #5b82c8;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #373142;
}

/* Filters */
.filters-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.filter-group {
    flex: 2;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.filter-group.currency-filter {
    flex: 1;
    min-width: 150px;
}

.filter-group h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.filter-input {
    width: 100%;
    background: #18151c;
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0;
    font-family: 'Inter', sans-serif;
}

/* Trade Card */
.trade-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.trade-header {
    background: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #40394a;
}

.user-details h4 {
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.user-details span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.trade-body {
    display: flex;
    padding: 1.5rem;
    gap: 2rem;
}

.trade-side {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
}

.trade-side h5 {
    color: var(--text-main);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.item-slot {
    aspect-ratio: 1;
    background: rgba(0,0,0,0.3);
    border: 1px dashed var(--card-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    position: relative;
}

.item-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-slot strong {
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: clamp(0.55rem, 2vw, 0.75rem) !important;
}

.trade-stats {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.trade-stats strong {
    color: var(--text-main);
}

.post-trade-btn {
    background: linear-gradient(135deg, #6a95e0 0%, #8a73cc 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(106, 149, 224, 0.3);
}

.post-trade-btn:hover {
    background: linear-gradient(135deg, #5b82c8 0%, #7962b8 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(106, 149, 224, 0.4);
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .trades-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .trades-banner-text p {
        margin-bottom: 1rem;
    }

    .filters-section {
        flex-direction: column;
        gap: 1rem;
    }

    .trade-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .user-info {
        flex: 1;
        min-width: 150px;
    }

    .trade-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
    
    .trade-actions a, .trade-actions button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .trade-body {
        flex-direction: row; /* Keep them side by side */
        padding: 1rem 0.5rem;
        gap: 0.5rem;
    }

    .items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2x2 grid on mobile, prevents text from stretching */
        gap: 0.4rem;
    }

    .trade-side h5 {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .trade-stats {
        font-size: 0.75rem;
    }
}
