/* Save Button Styles */
.save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gridc:hover .save-btn,
.save-btn.saved,
.single-post-save-button .save-btn {
    opacity: 1 !important;
}

.save-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.save-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.single-post-save-button .save-btn svg {
    width: 24px;
    height: 24px;
}

.save-btn .heart-icon {
    stroke: #333;
    fill: none;
    transition: all 0.3s ease;
}

.save-btn.saved .heart-icon {
    fill: #ff4757;
    stroke: #ff4757;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Single post save button */
.single-post-save-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.single-post-save-button .save-btn {
    position: relative;
    top: auto;
    right: auto;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.single-post-save-button .save-btn.saved {
    background: rgba(255, 71, 87, 0.95);
}

.single-post-save-button .save-btn.saved .heart-icon {
    stroke: #fff;
    fill: #fff;
}

/* Remove Button for Saved Page */
.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 77, 87, 0.95);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.gridc:hover .remove-btn {
    opacity: 1;
}

/* Card removing animation */
.gridc.removing {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

/* Toast notification */
.save-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    transition: bottom 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    text-align: center;
}

.save-toast.show {
    bottom: 30px;
}

.save-toast.error {
    background: #ff4757;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .save-btn {
        width: 36px;
        height: 36px;
    }
    
    .save-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .single-post-save-button .save-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .single-post-save-button .save-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .save-toast {
        font-size: 13px;
        padding: 10px 20px;
    }
}