/* Custom Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes float-delayed {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.15;
        filter: blur(50px);
    }

    50% {
        opacity: 0.3;
        filter: blur(70px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 8s infinite alternate;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .glass-panel {
        background: rgba(255, 255, 255, 0.05);
        /* Slightly more solid on mobile for readability */
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

.text-glow {
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-100 {
    transition-delay: 0.1s;
}

.reveal-delay-200 {
    transition-delay: 0.2s;
}

.reveal-delay-300 {
    transition-delay: 0.3s;
}

/* Spotlight Effect */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 0, 255, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.spotlight-card:hover::before {
    opacity: 1;
}

/* Magnetic Button */
.btn-magnetic {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Marquee Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: inline-flex;
    animation: scroll 30s linear infinite;
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* Chart Animation */
.chart-bar {
    transition: height 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Hide scrollbar for cleaner look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ROI Calculator Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ff00ff;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* 3D Tilt Container */
.perspective-container {
    perspective: 1000px;
}

/* Ensure the card preserves 3d */
.spotlight-card {
    transition: transform 0.1s ease-out;
    /* Smooth return, instant follow */
    transform-style: preserve-3d;
}

.spotlight-card-content {
    transform: translateZ(20px);
    /* Pop out content */
}

/* Custom Responsive Utilities */
@media (max-width: 640px) {
    .text-glow {
        text-shadow: 0 0 8px rgba(255, 0, 255, 0.4);
    }

    .hero-visual {
        transform: scale(0.9);
        /* Subtle scale down for smaller mobile screens */
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3rem) !important;
        line-height: 1.2 !important;
    }
}

@keyframes telegram-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 0, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 255, 0);
    }
}

.animate-telegram-pulse {
    animation: telegram-pulse 2s infinite;
}

/* Mask for Ticker */
.mask-linear-fade {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Lightbox Styles */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 110;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.expandable-trigger {
    cursor: zoom-in;
}

.expandable-trigger:hover img {
    transform: scale(1.03);
}

/* Ensure blurs are visible in lightbox if needed */
.lightbox-content .backdrop-blur-xl {
    backdrop-filter: blur(20px);
}