.trait-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.trait-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.trait-card-header {
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    overflow: hidden;
    min-height: 60px;
}

.trait-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.trait-card-header > * {
    position: relative;
    z-index: 2;
}

.trait-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trait-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.card-title {
    font-weight: 600;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trait-card-body {
    padding: 15px;
    flex-grow: 1;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.effect-display {
    flex-grow: 1;
}

.effect-text {
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    line-height: 1.4;
}

.trait-card-footer {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.85rem;
    min-height: 45px;
}

.trait-type-badge {
    display: flex;
    gap: 5px;
}

.type-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: capitalize;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Trait type-specific badge colors */
.type-badge.type-battle {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #bd2130 100%);
}

.type-badge.type-economy {
    background: linear-gradient(135deg, #28a745 0%, #218838 50%, #1e7e34 100%);
}

.type-badge.type-misc {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 50%, #117a8b 100%);
}

.type-badge.type-others {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%);
}

/* Default header color for all traits */
.trait-card-header {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%);
}

/* Trait grid */
.trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .trait-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .trait-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Show all cards by default */
.trait-card {
    display: flex;
}

.trait-card.hide {
    display: none;
} 