/* Active Trade Cards - Simplified */
.active-trades {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

/* Trade Card */
.trade-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 1rem;
    transition: transform 0.2s ease;
}

.trade-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Trader Info Section */
.trader-info {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 
        "avatar name message"
        "avatar timer message";
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
    margin-bottom: 1rem;
}

.trader-avatar {
    grid-area: avatar;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}




.trader-name {
    grid-area: name;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    margin-top: 1px;
}

/* Timer moved under username */
.trade-timer {
    grid-area: timer;
    margin: 0;
    margin-top: -12px;
    font-size: 0.2rem;
}

.timer-bar {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.timer-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress);
    background: #fff;
    border-radius: 4px;
}

.time-remaining {
    color: #999;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* Message Button */
.message-trader-btn {
    grid-area: message;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.message-trader-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.message-trader-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message-trader-btn i {
    font-size: 1.1rem;
}

/* Trade Items Section */
.trade-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;

}

.trade-item{
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.offering-items,
.wanting-items {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
}

.trade-section-header {
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.trade-section-header h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Items Display - 1 row, 4 columns */
.items-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    padding: 0.5rem;
}

/* Individual Trade Item - Square */
.trade-item {
    position: relative;
    border-radius: 19px;
    padding: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 30, 0.6);
    aspect-ratio: 1/1;

}




/* Item Image Container */
.item-image-container {
    position: relative;
    width: 100%;
    height: 80px; /* Increased from 64px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: #99999900 !important;
    box-shadow: none;
    border-color: transparent;

}


.item-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.item-image-container .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-align: center;
}

/* Item Weight */
.item-weight {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0);
    border-radius: 4px;
    font-size: 0.7em;
    color: #fff;
    margin: 0 auto;
    width: fit-content;
}

.item-weight::before {
    content: "⚖️";
    margin-right: 4px;
    font-size: 0.9em;
}

/* No Trades Message */
.no-trades {
    text-align: center;
    padding: 3rem;
    background: #1a1a1a;
    border: 1px dashed #333;
    border-radius: 10px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 992px) {
    .items-display {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .trader-info {
        grid-template-columns: auto 1fr;
        grid-template-areas: 
            "avatar name"
            "avatar timer"
            "message message";
    }
    
    .message-trader-btn {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .trade-items {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .items-display {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .trader-avatar {
        width: 40px;
        height: 40px;
    }
    
    .trader-name {
        font-size: 1rem;
    }
}
