/* ═══════════════════════════════════════════════════════
   TSG Bookmarks Dashboard — Animations
   ═══════════════════════════════════════════════════════ */

/* ── Page Load Fade In ───────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-container { animation: fadeInUp 0.6s ease forwards; }

.bookmark-group {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.bookmark-group:nth-child(1) { animation-delay: 0.1s; }
.bookmark-group:nth-child(2) { animation-delay: 0.2s; }
.bookmark-group:nth-child(3) { animation-delay: 0.3s; }
.bookmark-group:nth-child(4) { animation-delay: 0.4s; }
.bookmark-group:nth-child(5) { animation-delay: 0.5s; }
.bookmark-group:nth-child(6) { animation-delay: 0.6s; }

/* ── Card Hover Glow ─────────────────────────────────── */
.bookmark-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity var(--transition-normal);
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(var(--accent-primary-rgb), 0.08) 0%,
        transparent 60%
    );
    pointer-events: none;
}
.bookmark-card:hover::after { opacity: 1; }

/* ── Pulse for Most Visited ──────────────────────────── */
@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0); }
    50% { box-shadow: 0 0 0 4px rgba(var(--accent-primary-rgb), 0.1); }
}
.most-visited-item:first-child { animation: subtlePulse 3s ease infinite; }

/* ── Weather Icon Bounce ─────────────────────────────── */
@keyframes weatherBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.weather-icon { animation: weatherBounce 4s ease-in-out infinite; }

/* ── Loading Skeleton ────────────────────────────────── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg,
        var(--surface-bg) 25%,
        var(--surface-bg-hover) 50%,
        var(--surface-bg) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

/* ── Button Press ────────────────────────────────────── */
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary:active { box-shadow: none; }

/* ── Modal Entrance ──────────────────────────────────── */
@keyframes modalIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-overlay.active .modal { animation: modalIn 0.35s ease forwards; }

/* ── Tag hover ───────────────────────────────────────── */
.bookmark-tag { transition: all var(--transition-fast); }
.bookmark-tag:hover {
    background: rgba(var(--accent-primary-rgb), 0.25);
    transform: scale(1.05);
}

/* ── Search Focus Glow ───────────────────────────────── */
.search-bar:focus {
    animation: searchGlow 2s ease infinite alternate;
}
@keyframes searchGlow {
    from { box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.1); }
    to { box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.2); }
}

/* ── Reduced Motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .ticker-track { animation: none !important; }
}
