/* =====================================================
   FAVORITES & BOOKMARK SYSTEM STYLES
   ===================================================== */

/* Header Favorites Link */
.favorites-nav-link:hover {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e !important;
}

.favorites-nav-link:hover i {
    transform: scale(1.1);
}

/* Bookmark Button on Card */
.bookmark-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.8);
}

.tool-card-v2:hover .bookmark-btn,
.bookmark-btn.active {
    opacity: 1;
    transform: scale(1);
}

.bookmark-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bookmark-btn.active {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
}

.bookmark-btn.active i {
    font-weight: 900;
}

.bookmark-btn.active:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}

/* Heart Animation */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.bookmark-btn.animating i {
    animation: heartBeat 0.6s ease-in-out;
}

/* =====================================================
   RECENTLY VIEWED SIDEBAR
   ===================================================== */

.recently-viewed-section {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border-color, #e5e7eb);
    margin-bottom: 1.5rem;
}

.recently-viewed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.recently-viewed-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recently-viewed-header h4 i {
    color: var(--color-primary, #7c3aed);
}

.recently-viewed-clear {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    transition: color 0.2s;
}

.recently-viewed-clear:hover {
    color: var(--color-primary, #7c3aed);
}

.recently-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recently-viewed-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary, #1f2937);
    transition: all 0.2s;
}

.recently-viewed-item:hover {
    background: var(--bg-secondary, #f3f4f6);
}

.recently-viewed-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-secondary, #f3f4f6);
}

.recently-viewed-item .item-info {
    flex: 1;
    min-width: 0;
}

.recently-viewed-item .item-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recently-viewed-item .item-time {
    font-size: 0.7rem;
    color: var(--text-muted, #6b7280);
}

.recently-viewed-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted, #6b7280);
    font-size: 0.85rem;
}

.recently-viewed-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.5;
}

/* =====================================================
   FAVORITES PAGE STYLES
   ===================================================== */

.favorites-hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(99, 102, 241, 0.05));
    border-radius: 20px;
    margin-bottom: 2rem;
}

.favorites-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.favorites-hero h1 i {
    color: #f43f5e;
}

.favorites-hero p {
    color: var(--text-muted, #6b7280);
    font-size: 1rem;
}

.favorites-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg, #fff);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
}

.favorites-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg, #fff);
    border-radius: 20px;
    border: 2px dashed var(--border-color, #e5e7eb);
}

.favorites-empty i {
    font-size: 4rem;
    color: #f43f5e;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.favorites-empty h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #1f2937);
}

.favorites-empty p {
    color: var(--text-muted, #6b7280);
    margin-bottom: 1.5rem;
}

/* =====================================================
   MICRO-ANIMATIONS
   ===================================================== */

/* Card Hover Effects */
.tool-card-v2 {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Image Zoom on Hover */
.tool-card-v2 .card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-v2:hover .card-image img {
    transform: scale(1.05);
}

/* Button Ripple Effect */
.btn-try,
.btn-details {
    position: relative;
    overflow: hidden;
}

.btn-try::after,
.btn-details::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-try:active::after,
.btn-details:active::after {
    width: 200px;
    height: 200px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card-v2 {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.tool-card-v2:nth-child(1) {
    animation-delay: 0.05s;
}

.tool-card-v2:nth-child(2) {
    animation-delay: 0.1s;
}

.tool-card-v2:nth-child(3) {
    animation-delay: 0.15s;
}

.tool-card-v2:nth-child(4) {
    animation-delay: 0.2s;
}

.tool-card-v2:nth-child(5) {
    animation-delay: 0.25s;
}

.tool-card-v2:nth-child(6) {
    animation-delay: 0.3s;
}