/* ========================================
   ANIMATIONS.CSS
   All @keyframes animations and animation-related CSS
   ======================================== */

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

/* Loading pulse animation for logo */
@keyframes loadingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.loading-logo {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Skeleton loading animation */
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* ========================================
   HERO SECTION ANIMATIONS
   ======================================== */

/* Grid movement animation */
@keyframes gridMove {
    0% {
        transform: translate(-30px, -30px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Floating shapes animations */
@keyframes float-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(100px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-50px, 50px) rotate(240deg);
    }
}

@keyframes float-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-100px, -100px) scale(1.2);
    }
}

@keyframes float-3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-50px, -50px) rotate(90deg);
    }
    50% {
        transform: translate(50px, -100px) rotate(180deg);
    }
    75% {
        transform: translate(100px, 50px) rotate(270deg);
    }
}

/* ========================================
   CARD & COMPONENT ANIMATIONS
   ======================================== */

/* Border rotation animation for upcoming pins */
@keyframes borderRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.upcoming-pin::before {
    animation: borderRotate 3s linear infinite;
}

/* Mystery box floating animation */
@keyframes mysteryFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.mystery-image img {
    animation: mysteryFloat 3s ease-in-out infinite;
}

.mystery-box:hover .mystery-image img {
    animation-duration: 1.5s;
}

/* ========================================
   COMMUNITY FEED ANIMATIONS
   ======================================== */

/* Pulse animation for live indicator */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.feed-title span::before {
    animation: pulse 2s ease-in-out infinite;
}

/* Feed item slide in animation */
@keyframes feedSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feed-item {
    animation: feedSlideIn 0.5s ease;
}

/* ========================================
   FOOTER ANIMATIONS
   ======================================== */

/* Footer line animation */
@keyframes footerLine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   NOTIFICATION ANIMATIONS
   ======================================== */

/* Slide in animation for notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide out animation for notifications */
@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Notification animation utility class */
.notification {
    animation: slideIn 0.5s ease;
}

/* ========================================
   BUTTON & INTERACTION ANIMATIONS
   ======================================== */

/* Spin animation for loading states */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Ripple effect animation for button clicks */
@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========================================
   TRANSITION EFFECTS
   ======================================== */

/* Loading bar transition */
.loading-progress {
    transition: width 0.3s ease;
}

/* Header scroll transition */
header {
    transition: all 0.3s ease;
}

/* Navigation link transitions */
.nav-links a {
    transition: opacity 0.2s;
}

.connect-btn {
    transition: opacity 0.2s;
}

.wallet-address {
    transition: all 0.2s;
}

/* CTA button transitions */
.cta-btn {
    transition: all 0.2s;
}

/* Pin card transitions */
.pin-card {
    transition: all 0.2s ease;
}

.pin-card img {
    transition: all 0.2s ease;
}

/* Buy button transitions */
.buy-btn {
    transition: all 0.2s ease;
}

/* Upcoming pin transitions */
.upcoming-pin {
    transition: all 0.5s ease;
}

.upcoming-pin img {
    transition: all 0.5s ease;
}

.tap-reveal {
    transition: all 0.5s ease;
}

/* Dashboard card transitions */
.dashboard-card {
    transition: all 0.3s ease;
}

/* Claim button transitions */
.claim-btn {
    transition: all 0.3s ease;
}

/* Mystery box transitions */
.mystery-box {
    transition: all 0.5s ease;
}

.mystery-box-overlay {
    transition: opacity 0.5s ease;
}

.mystery-btn {
    transition: all 0.3s ease;
}

/* Feed item transitions */
.feed-item {
    transition: all 0.3s ease;
}

/* Event item transitions */
.event-item {
    transition: all 0.3s ease;
}

/* Footer link transitions */
.footer-links a {
    transition: all 0.3s ease;
}

/* Social icon transitions */
.social-icon {
    transition: all 0.1s ease;
}

/* Mobile menu transitions */
.mobile-menu-toggle span {
    transition: all 0.3s ease;
}

.nav-links {
    transition: right 0.3s ease;
}

/* Stat pill transitions */
.stat-pill {
    transition: all 0.3s ease;
}

/* ========================================
   HOVER EFFECTS WITH TRANSITIONS
   ======================================== */

/* Pin card hover effects */
.pin-card:hover {
    transform: scale(1.02);
}

.pin-card:hover img {
    filter: grayscale(0%) contrast(1);
}

/* Upcoming pin hover effects */
.upcoming-pin:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Mystery button hover effects */
.mystery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(144, 54, 255, 0.4);
}

/* Feed item hover effects */
.feed-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

/* Event item hover effects */
.event-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Footer link hover effects */
.footer-links a:hover {
    color: var(--neon-pink);
    opacity: 1;
    padding-left: 10px;
}

/* Social icon hover effects */
.social-icon:hover {
    background: #000000;
    border-color: #000000;
    transform: translateY(-2px);
}

/* ========================================
   MOBILE MENU ANIMATIONS
   ======================================== */

/* Mobile menu toggle animations */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile navigation slide animation */
.nav-links.active {
    right: 0;
}
