/* ============================================
   ADVANCED ANIMATIONS & EFFECTS
   ============================================ */

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00de;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00de;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(17px, 9999px, 94px, 0); }
    10% { clip: rect(40px, 9999px, 66px, 0); }
    20% { clip: rect(73px, 9999px, 20px, 0); }
    30% { clip: rect(48px, 9999px, 89px, 0); }
    40% { clip: rect(5px, 9999px, 16px, 0); }
    50% { clip: rect(82px, 9999px, 61px, 0); }
    60% { clip: rect(28px, 9999px, 43px, 0); }
    70% { clip: rect(56px, 9999px, 98px, 0); }
    80% { clip: rect(11px, 9999px, 35px, 0); }
    90% { clip: rect(69px, 9999px, 7px, 0); }
    100% { clip: rect(44px, 9999px, 52px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    10% { clip: rect(22px, 9999px, 45px, 0); }
    20% { clip: rect(88px, 9999px, 33px, 0); }
    30% { clip: rect(14px, 9999px, 71px, 0); }
    40% { clip: rect(50px, 9999px, 8px, 0); }
    50% { clip: rect(77px, 9999px, 96px, 0); }
    60% { clip: rect(31px, 9999px, 54px, 0); }
    70% { clip: rect(92px, 9999px, 19px, 0); }
    80% { clip: rect(6px, 9999px, 62px, 0); }
    90% { clip: rect(41px, 9999px, 85px, 0); }
    100% { clip: rect(58px, 9999px, 27px, 0); }
}

/* Glow Effect - Subtle */
.glow {
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 
            0 0 5px rgba(251, 191, 36, 0.2),
            0 0 10px rgba(251, 191, 36, 0.1);
    }
    50% {
        text-shadow: 
            0 0 10px rgba(251, 191, 36, 0.3),
            0 0 15px rgba(251, 191, 36, 0.2);
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(251, 191, 36, 0.5);
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(5deg);
    }
    66% {
        transform: translateY(-10px) rotate(-5deg);
    }
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.icon-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 30%;
    left: -10%;
    animation-delay: 1s;
}

.icon-3 {
    bottom: 20%;
    right: -5%;
    animation-delay: 2s;
}

.icon-4 {
    bottom: 10%;
    left: -5%;
    animation-delay: 3s;
}

/* Animated Grid Background */
.animated-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(251, 191, 36, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251, 191, 36, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.5);
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
}

.floating-particles::before {
    left: 20%;
    animation-delay: 0s;
}

.floating-particles::after {
    left: 80%;
    animation-delay: 7s;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 13px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: rgba(251, 191, 36, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheel-scroll 2s ease-in-out infinite;
}

@keyframes wheel-scroll {
    0%, 100% {
        top: 8px;
        opacity: 1;
    }
    50% {
        top: 20px;
        opacity: 0;
    }
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid rgba(251, 191, 36, 0.5);
}

/* Tagline Animation */
.tagline-item {
    display: inline-block;
    animation: tagline-pop 3s ease-in-out infinite;
}

.tagline-item:nth-child(1) { animation-delay: 0s; }
.tagline-item:nth-child(3) { animation-delay: 0.5s; }
.tagline-item:nth-child(5) { animation-delay: 1s; }
.tagline-item:nth-child(7) { animation-delay: 1.5s; }

@keyframes tagline-pop {
    0%, 90%, 100% {
        transform: scale(1);
    }
    95% {
        transform: scale(1.2);
    }
}

/* Badge Animation */
.badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border: 2px solid rgba(251, 191, 36, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: badge-shine 3s ease-in-out infinite;
}

@keyframes badge-shine {
    0%, 100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    }
}

/* Phone Frame Enhancement */
.phone-frame {
    position: relative;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 15px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.phone-notch {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #000;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

.phone-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%
    );
    border-radius: 30px;
    pointer-events: none;
}

/* Feature Card Glow */
.feature-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent,
        rgba(251, 191, 36, 0.1),
        transparent
    );
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover .feature-glow {
    opacity: 1;
    animation: glow-rotate 3s linear infinite;
}

@keyframes glow-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Icon Badge */
.icon-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

.icon-badge.hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Feature Stats */
.feature-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    font-size: 0.85rem;
    color: var(--text-gray);
}

.feature-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Icon Emoji Enhancement */
.icon-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.3));
    animation: icon-bounce 2s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Stat Icon */
.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Responsive Animations */
@media (max-width: 768px) {
    .glitch::before,
    .glitch::after {
        display: none;
    }
    
    .floating-icon {
        display: none;
    }
    
    .animated-grid {
        opacity: 0.5;
    }
}

/* Tilt Effect (will be enhanced with JS) */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

[data-tilt]:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}
