.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.inventory-gift-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.4s ease-out;
}

.inventory-gift-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(99, 102, 241, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.inventory-gift-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
}

.inventory-gift-id {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
}

.inventory-info-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.inventory-info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.inventory-gift-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 160px;
    background: linear-gradient(135deg, #2a2a4a, #1e1e3f) !important;
}


.inventory-gift-card[data-rarity="legendary"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(245, 158, 11, 0.6),
        0 0 40px rgba(245, 158, 11, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.inventory-gift-card[data-rarity="epic"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(139, 92, 246, 0.6),
        0 0 35px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.inventory-gift-card[data-rarity="rare"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(59, 130, 246, 0.6),
        0 0 30px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.inventory-gift-card[data-rarity="common"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(107, 114, 128, 0.4);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.inventory-gift-card:hover[data-rarity="legendary"] {
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(245, 158, 11, 0.8),
        0 0 50px rgba(245, 158, 11, 0.4);
    transform: translateY(-6px) scale(1.02);
}

.inventory-gift-card:hover[data-rarity="epic"] {
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(139, 92, 246, 0.8),
        0 0 45px rgba(139, 92, 246, 0.4);
    transform: translateY(-6px) scale(1.02);
}

.inventory-gift-card:hover[data-rarity="rare"] {
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(59, 130, 246, 0.8),
        0 0 40px rgba(59, 130, 246, 0.4);
    transform: translateY(-6px) scale(1.02);
}

.inventory-gift-card:hover[data-rarity="common"] {
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(107, 114, 128, 0.6);
    transform: translateY(-6px) scale(1.02);
}


.inventory-gift-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.inventory-gift-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.inventory-gift-image img:hover {
    transform: scale(1.05);
}

.inventory-gift-name {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.inventory-withdraw-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.inventory-withdraw-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.inventory-withdraw-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.inventory-withdraw-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.inventory-withdraw-btn:active::before {
    width: 300px;
    height: 300px;
}

.withdraw-icon {
    font-size: 14px;
}

.withdraw-text {
    font-size: 14px;
    font-weight: 700;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.inventory-gift-card:nth-child(1) { animation-delay: 0s; }
.inventory-gift-card:nth-child(2) { animation-delay: 0.1s; }
.inventory-gift-card:nth-child(3) { animation-delay: 0.2s; }
.inventory-gift-card:nth-child(4) { animation-delay: 0.3s; }
.inventory-gift-card:nth-child(5) { animation-delay: 0.4s; }
.inventory-gift-card:nth-child(6) { animation-delay: 0.5s; }

.inventory-gift-card[data-rarity="legendary"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(245, 158, 11, 0.3);
}

.inventory-gift-card[data-rarity="epic"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(139, 92, 246, 0.3);
}

.inventory-gift-card[data-rarity="rare"] {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
    .inventory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .inventory-gift-card {
        border-radius: 12px;
    }

    .inventory-gift-content {
        height: 140px;
    }

    .inventory-gift-image {
        height: 100px;
    }

    .inventory-gift-name {
        font-size: 13px;
        padding: 10px 12px;
    }

    .inventory-withdraw-btn {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .inventory-grid {
        gap: 8px;
    }

    .inventory-gift-card {
        border-radius: 10px;
    }

    .inventory-gift-content {
        height: 120px;
    }

    .inventory-gift-image {
        height: 80px;
    }

    .inventory-gift-name {
        font-size: 12px;
        padding: 8px 10px;
    }

    .inventory-withdraw-btn {
        padding: 8px;
        font-size: 12px;
    }
}
