.item-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: 250px;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.item-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;
}

.item-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;
}

.item-card-header > * {
    position: relative;
    z-index: 2;
}

.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.item-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

.item-icon-fallback {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.8);
}

.card-title {
    font-weight: 600;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-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;
}

.info-display {
    margin-top: 15px;
}

.info-text {
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-top: 10px;
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
    line-height: 1.4;
}

.item-card-footer {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    min-height: 45px;
}

.toggle-upgrade-btn {
    display: flex;
    align-items: center;
}

.toggle-upgrade {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.toggle-upgrade:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    color: #000;
}

.item-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;
}

/* Category-specific header colors */
.item-card-header[data-type="battle item"] {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%);
}

.item-card-header[data-type="consumable"] {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
}

.item-card-header[data-type="on demand item"] {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 50%, #DC143C 100%);
}

.item-card-header[data-type="artifact"] {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
}

.item-card-header[data-type="others"] {
    background: linear-gradient(135deg, #28a745 0%, #218838 50%, #1e7e34 100%);
}



/* Category sections */
.category-section {
    margin-bottom: 3rem;
}

.category-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.category-header h2 {
    color: #495057;
    font-weight: 600;
}

/* Item grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .item-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .item-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}



/* Upgrade cards */
.upgrade-item-card {
    border: 2px solid #ffc107;
}

.upgraded-badge {
    display: flex;
    gap: 5px;
}

.upgraded-badge .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Show all cards by default */
.item-card {
    display: flex;
}

.item-card.hide {
    display: none;
}

/* Search functionality */
.category-section.hide {
    display: none;
}

/* Results count styling */
#resultsCount {
    font-size: 1.1rem;
    font-weight: 500;
    color: #495057;
}

#visibleCount {
    color: #007bff;
    font-weight: 600;
}

.item-badge-footer, .item-info-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.item-badge-footer .badge, .item-info-footer .badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
} 