/* Unit Card Component Styles */
.unit-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.unit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(162, 155, 254, 0.3);
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.unit-card:hover::before {
    opacity: 1;
}

/* Card Header */
.unit-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.unit-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.unit-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.unit-card:hover .unit-avatar::after {
    left: 100%;
}

.unit-info {
    flex: 1;
    min-width: 0;
}

.unit-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.unit-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rarity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rarity-badge.rare {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.rarity-badge.epic {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.rarity-badge.legendary {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.rarity-badge.mythic {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.rarity-badge.exclusive {
    background: rgba(162, 155, 254, 0.2);
    color: #a29bfe;
    border: 1px solid rgba(162, 155, 254, 0.3);
}

.element-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #a29bfe;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Card Body */
.unit-card-body {
    margin-bottom: 1rem;
}

.unit-description {
    color: #bbb;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.unit-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    color: #a29bfe;
    font-size: 0.9rem;
}

.stat-label {
    color: #bbb;
    font-size: 0.7rem;
    text-align: center;
}

.stat-value {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Card Footer */
.unit-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.unit-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a29bfe;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-details-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.view-details-btn i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.view-details-btn:hover i {
    transform: translateX(2px);
}

/* Selection State */
.unit-card.selected {
    border: 2px solid #a29bfe;
    box-shadow: 0 0 0 4px rgba(162, 155, 254, 0.2);
}

.unit-card.selected::before {
    opacity: 1;
}

/* List View Styles */
.unit-card.list-view {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
}

.unit-card.list-view .unit-card-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
}

.unit-card.list-view .unit-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

.unit-card.list-view .unit-card-body {
    margin-bottom: 0;
    flex: 2;
}

.unit-card.list-view .unit-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

.unit-card.list-view .unit-card-footer {
    flex-shrink: 0;
}

/* Loading State */
.unit-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.unit-card.loading .unit-avatar {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .unit-card {
        padding: 1rem;
    }
    
    .unit-card-header {
        gap: 0.75rem;
    }
    
    .unit-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .unit-name {
        font-size: 1rem;
    }
    
    .unit-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .unit-card.list-view {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .unit-card.list-view .unit-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .unit-card {
        padding: 0.75rem;
    }
    
    .unit-avatar {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .unit-name {
        font-size: 0.9rem;
    }
    
    .unit-meta {
        gap: 0.5rem;
    }
    
    .rarity-badge,
    .element-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .unit-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .unit-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .view-details-btn {
        justify-content: center;
    }
} 