/**
 * Premium UI Enhancements
 * Advanced Visual Effects & Micro-interactions
 */

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Gradient Border Effect */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #1e40af, #f59e0b, #ef4444, #10b981);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Neumorphism Cards */
.neuro-card {
    background: #f8fafc;
    border-radius: 20px;
    box-shadow: 
        8px 8px 16px rgba(163, 177, 198, 0.6),
        -8px -8px 16px rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.neuro-card:hover {
    box-shadow: 
        12px 12px 24px rgba(163, 177, 198, 0.7),
        -12px -12px 24px rgba(255, 255, 255, 0.6);
}

/* Floating Labels Effect */
.floating-label {
    position: relative;
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 12px;
    color: #1e40af;
    background: white;
    padding: 0 8px;
}

.floating-label label {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    transition: all 0.3s;
    pointer-events: none;
}

/* Gradient Text Animation */
@keyframes gradient-text {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient-text {
    background: linear-gradient(270deg, #1e40af, #f59e0b, #ef4444, #10b981);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-text 5s ease infinite;
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Particle Background */
.particles-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-particle 20s infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) translateX(200px);
        opacity: 0;
    }
}

/* Glitch Effect (for special headlines) */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0.8;
}

.glitch::before {
    animation: glitch-1 0.3s infinite;
    color: #f59e0b;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.3s infinite;
    color: #1e40af;
    z-index: -2;
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(92% 0 1% 0); }
    40% { clip-path: inset(43% 0 1% 0); }
    60% { clip-path: inset(25% 0 58% 0); }
    80% { clip-path: inset(54% 0 7% 0); }
    100% { clip-path: inset(58% 0 43% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(10% 0 85% 0); }
    20% { clip-path: inset(54% 0 21% 0); }
    40% { clip-path: inset(76% 0 14% 0); }
    60% { clip-path: inset(21% 0 43% 0); }
    80% { clip-path: inset(91% 0 8% 0); }
    100% { clip-path: inset(65% 0 15% 0); }
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tilt Effect */
.tilt {
    transition: transform 0.3s ease-out;
}

.tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Neon Glow */
.neon-glow {
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px #1e40af,
        0 0 30px #1e40af,
        0 0 40px #1e40af;
}

/* Ink Spread Effect */
@keyframes ink-spread {
    from {
        clip-path: circle(0% at 50% 50%);
    }
    to {
        clip-path: circle(150% at 50% 50%);
    }
}

.ink-effect {
    position: relative;
    overflow: hidden;
}

.ink-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), transparent);
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.6s ease-out;
}

.ink-effect:hover::before {
    clip-path: circle(150% at 50% 50%);
}

/* Underline Animation */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #f59e0b);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-underline:hover::after {
    width: 100%;
}

/* Card Flip Effect */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Hover Lift Effect */
.lift-on-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lift-on-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Pulse Ring */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(30, 64, 175, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0);
    }
}

.pulse-ring {
    animation: pulse-ring 2s infinite;
}

/* Stagger Animation Utility */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Smooth Color Transition */
.smooth-color {
    transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}

/* Scale on Hover */
.scale-hover {
    transition: transform 0.3s;
}

.scale-hover:hover {
    transform: scale(1.05);
}

/* Rotate on Hover */
.rotate-hover {
    transition: transform 0.3s;
}

.rotate-hover:hover {
    transform: rotate(5deg);
}

/* Shadow Pulse */
@keyframes shadow-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(30, 64, 175, 0.5);
    }
}

.shadow-pulse {
    animation: shadow-pulse 2s infinite;
}
