/* Cinematic & Productive Enhancements */

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    width: 0%;
    z-index: 2000;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
    animation: glow 2s ease-in-out infinite;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: backgroundShift 15s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        background: 
            radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 40% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    }
    50% {
        background: 
            radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 60% 40%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    }
}

/* Parallax Effect */
.hero {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

/* Enhanced Section Backgrounds */
section {
    position: relative;
    z-index: 10;
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Realistic Card Shadows */
.card-shadow {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-shadow:hover {
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Depth Effect */
.depth-effect {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.depth-effect:hover {
    transform: translateZ(20px) rotateX(2deg) rotateY(2deg);
}

/* Glassmorphism Enhanced */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Neon Glow Effect */
.neon-glow {
    text-shadow: 
        0 0 10px rgba(99, 102, 241, 0.5),
        0 0 20px rgba(99, 102, 241, 0.3),
        0 0 30px rgba(99, 102, 241, 0.2);
    animation: neonFlicker 3s ease-in-out infinite;
}

@keyframes neonFlicker {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(99, 102, 241, 0.5),
            0 0 20px rgba(99, 102, 241, 0.3),
            0 0 30px rgba(99, 102, 241, 0.2);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(99, 102, 241, 0.8),
            0 0 30px rgba(99, 102, 241, 0.5),
            0 0 40px rgba(99, 102, 241, 0.3);
    }
}

/* Realistic Blur Effect */
.blur-in {
    animation: blurIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Smooth Reveal */
.reveal {
    animation: reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* Staggered List Animation */
.stagger-list > * {
    animation: slideInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.stagger-list > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-list > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-list > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-list > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-list > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-list > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover Lift with Shadow */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Smooth Underline Animation */
.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.underline-animation:hover::after {
    width: 100%;
}

/* Realistic Loader */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Fade In On Scroll */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Realistic Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* Smooth Counter Animation */
.counter {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--primary);
}

/* Realistic Input Focus */
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 0 10px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* Smooth Transition for All */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disable transitions for animations */
.no-transition {
    transition: none !important;
}

/* Realistic Hover State */
a:hover,
button:hover {
    filter: brightness(1.1);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Realistic Backdrop */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
}

.backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth Transition Between Sections */
section {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced Focus Visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Realistic Hover Glow */
.glow-on-hover {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glow-on-hover:hover {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6));
}

/* Smooth Expand Animation */
.expand {
    animation: expand 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes expand {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Smooth Collapse Animation */
.collapse {
    animation: collapse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes collapse {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Realistic Gradient Border */
.gradient-border {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Smooth Text Shadow */
.text-shadow-glow {
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transition: text-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.text-shadow-glow:hover {
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

/* Responsive Cinematic Effects */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
