/* Advanced animations and effects */

/* Morphing background shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.1), rgba(255, 107, 107, 0.1));
    border-radius: 50%;
    animation: morphFloat 20s ease-in-out infinite;
}

.bg-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-shape:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.bg-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes morphFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        border-radius: 50%;
    }
    25% {
        transform: translateY(-20px) rotate(90deg) scale(1.1);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        transform: translateY(-40px) rotate(180deg) scale(0.9);
        border-radius: 50%;
    }
    75% {
        transform: translateY(-20px) rotate(270deg) scale(1.2);
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

/* Glitch effect for text */
.glitch {
    position: relative;
    display: inline-block;
}

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

.glitch::before {
    animation: glitch-anim-1 0.3s ease-in-out infinite alternate-reverse;
    color: #00d4ff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-anim-2 0.3s ease-in-out infinite alternate-reverse;
    color: #ff6b6b;
    z-index: -2;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.85deg);
    }
    5% {
        clip: rect(12px, 9999px, 59px, 0);
        transform: skew(0.40deg);
    }
    10% {
        clip: rect(48px, 9999px, 29px, 0);
        transform: skew(0.81deg);
    }
    15% {
        clip: rect(42px, 9999px, 73px, 0);
        transform: skew(0.92deg);
    }
    20% {
        clip: rect(63px, 9999px, 27px, 0);
        transform: skew(0.90deg);
    }
    25% {
        clip: rect(34px, 9999px, 55px, 0);
        transform: skew(0.70deg);
    }
    30% {
        clip: rect(86px, 9999px, 73px, 0);
        transform: skew(0.30deg);
    }
    35% {
        clip: rect(20px, 9999px, 20px, 0);
        transform: skew(0.50deg);
    }
    40% {
        clip: rect(26px, 9999px, 60px, 0);
        transform: skew(0.23deg);
    }
    45% {
        clip: rect(59px, 9999px, 99px, 0);
        transform: skew(0.38deg);
    }
    50% {
        clip: rect(67px, 9999px, 95px, 0);
        transform: skew(0.25deg);
    }
    55% {
        clip: rect(10px, 9999px, 85px, 0);
        transform: skew(0.75deg);
    }
    60% {
        clip: rect(78px, 9999px, 46px, 0);
        transform: skew(0.83deg);
    }
    65% {
        clip: rect(54px, 9999px, 84px, 0);
        transform: skew(0.19deg);
    }
    70% {
        clip: rect(63px, 9999px, 77px, 0);
        transform: skew(0.45deg);
    }
    75% {
        clip: rect(24px, 9999px, 49px, 0);
        transform: skew(0.74deg);
    }
    80% {
        clip: rect(45px, 9999px, 96px, 0);
        transform: skew(0.60deg);
    }
    85% {
        clip: rect(89px, 9999px, 90px, 0);
        transform: skew(0.32deg);
    }
    90% {
        clip: rect(79px, 9999px, 83px, 0);
        transform: skew(0.15deg);
    }
    95% {
        clip: rect(58px, 9999px, 88px, 0);
        transform: skew(0.05deg);
    }
    100% {
        clip: rect(96px, 9999px, 46px, 0);
        transform: skew(0.42deg);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(25px, 9999px, 99px, 0);
        transform: skew(0.02deg);
    }
    5% {
        clip: rect(4px, 9999px, 46px, 0);
        transform: skew(0.05deg);
    }
    10% {
        clip: rect(85px, 9999px, 11px, 0);
        transform: skew(0.18deg);
    }
    15% {
        clip: rect(91px, 9999px, 82px, 0);
        transform: skew(0.38deg);
    }
    20% {
        clip: rect(65px, 9999px, 90px, 0);
        transform: skew(0.55deg);
    }
    25% {
        clip: rect(28px, 9999px, 35px, 0);
        transform: skew(0.75deg);
    }
    30% {
        clip: rect(31px, 9999px, 14px, 0);
        transform: skew(0.22deg);
    }
    35% {
        clip: rect(68px, 9999px, 55px, 0);
        transform: skew(0.67deg);
    }
    40% {
        clip: rect(10px, 9999px, 83px, 0);
        transform: skew(0.84deg);
    }
    45% {
        clip: rect(90px, 9999px, 74px, 0);
        transform: skew(0.90deg);
    }
    50% {
        clip: rect(43px, 9999px, 69px, 0);
        transform: skew(0.15deg);
    }
    55% {
        clip: rect(70px, 9999px, 25px, 0);
        transform: skew(0.45deg);
    }
    60% {
        clip: rect(2px, 9999px, 98px, 0);
        transform: skew(0.33deg);
    }
    65% {
        clip: rect(88px, 9999px, 32px, 0);
        transform: skew(0.78deg);
    }
    70% {
        clip: rect(16px, 9999px, 56px, 0);
        transform: skew(0.12deg);
    }
    75% {
        clip: rect(53px, 9999px, 81px, 0);
        transform: skew(0.66deg);
    }
    80% {
        clip: rect(37px, 9999px, 47px, 0);
        transform: skew(0.41deg);
    }
    85% {
        clip: rect(71px, 9999px, 13px, 0);
        transform: skew(0.89deg);
    }
    90% {
        clip: rect(6px, 9999px, 75px, 0);
        transform: skew(0.07deg);
    }
    95% {
        clip: rect(52px, 9999px, 64px, 0);
        transform: skew(0.61deg);
    }
    100% {
        clip: rect(39px, 9999px, 18px, 0);
        transform: skew(0.26deg);
    }
}

/* Neon glow effects */
.neon {
    text-shadow: 
        0 0 5px #00d4ff,
        0 0 10px #00d4ff,
        0 0 15px #00d4ff,
        0 0 20px #00d4ff,
        0 0 35px #00d4ff,
        0 0 40px #00d4ff;
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        text-shadow: 
            0 0 5px #00d4ff,
            0 0 10px #00d4ff,
            0 0 15px #00d4ff,
            0 0 20px #00d4ff,
            0 0 35px #00d4ff,
            0 0 40px #00d4ff;
    }
    to {
        text-shadow: 
            0 0 2px #ff6b6b,
            0 0 8px #ff6b6b,
            0 0 12px #ff6b6b,
            0 0 18px #ff6b6b,
            0 0 25px #ff6b6b,
            0 0 30px #ff6b6b;
    }
}

/* Holographic effect */
.holographic {
    background: linear-gradient(45deg, #00d4ff, #ff6b6b, #4ecdc4, #ffe66d);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographicShift 3s ease-in-out infinite;
    position: relative;
}

.holographic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: holographicScan 2s ease-in-out infinite;
    z-index: 1;
}

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

@keyframes holographicScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Matrix rain effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.matrix-drop {
    position: absolute;
    color: #00d4ff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: matrixFall 3s linear infinite;
    opacity: 0.7;
}

@keyframes matrixFall {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Liquid blob animation */
.liquid-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    mix-blend-mode: screen;
    animation: blobMove 20s ease-in-out infinite;
}

.blob-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 70%);
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
    top: 60%;
    right: 20%;
    animation-delay: 5s;
}

.blob-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.3) 0%, transparent 70%);
    bottom: 20%;
    left: 60%;
    animation-delay: 10s;
}

@keyframes blobMove {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(100px, -50px) scale(1.2) rotate(90deg);
    }
    50% {
        transform: translate(-50px, 100px) scale(0.8) rotate(180deg);
    }
    75% {
        transform: translate(-100px, -100px) scale(1.1) rotate(270deg);
    }
}

/* Cyberpunk grid */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.02);
    }
}

/* Floating icons animation */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-icon {
    position: absolute;
    font-size: 20px;
    color: rgba(0, 212, 255, 0.3);
    animation: iconFloat 15s linear infinite;
}

.floating-icon:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-icon:nth-child(2) { left: 20%; animation-delay: 3s; }
.floating-icon:nth-child(3) { left: 30%; animation-delay: 6s; }
.floating-icon:nth-child(4) { left: 40%; animation-delay: 9s; }
.floating-icon:nth-child(5) { left: 50%; animation-delay: 12s; }
.floating-icon:nth-child(6) { left: 60%; animation-delay: 2s; }
.floating-icon:nth-child(7) { left: 70%; animation-delay: 5s; }
.floating-icon:nth-child(8) { left: 80%; animation-delay: 8s; }
.floating-icon:nth-child(9) { left: 90%; animation-delay: 11s; }

@keyframes iconFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 3D card hover effect */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.card-3d:hover {
    transform: rotateX(5deg) rotateY(5deg) translateZ(50px);
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    transform: translateZ(1px);
    pointer-events: none;
}

/* Electromagnetic pulse effect */
.pulse-ring {
    position: absolute;
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    animation: pulsePropagation 2s linear infinite;
}

@keyframes pulsePropagation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* DNA helix animation */
.dna-helix {
    position: relative;
    width: 20px;
    height: 100px;
    margin: 0 auto;
}

.dna-strand {
    position: absolute;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #00d4ff, #ff6b6b);
    border-radius: 2px;
    animation: dnaRotate 3s linear infinite;
}

.dna-strand:nth-child(2) {
    animation-delay: 1.5s;
    left: 16px;
}

@keyframes dnaRotate {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Quantum particle effect */
.quantum-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #00d4ff 0%, transparent 70%);
    border-radius: 50%;
    animation: quantumMotion 5s ease-in-out infinite;
}

@keyframes quantumMotion {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translate(100px, -50px) scale(0.5);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50px, 100px) scale(1.5);
        opacity: 0.8;
    }
    75% {
        transform: translate(-100px, -50px) scale(0.8);
        opacity: 0.3;
    }
}

/* Responsive animations */
@media (max-width: 768px) {
    .bg-shape {
        display: none;
    }
    
    .matrix-rain {
        display: none;
    }
    
    .floating-icons {
        display: none;
    }
    
    .cyber-grid {
        opacity: 0.05;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .animated-bg {
        background: #000000;
    }
    
    .particle {
        background: #ffffff;
    }
    
    .neon {
        text-shadow: none;
        color: #ffffff;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animated-bg {
        animation: none;
        background: linear-gradient(-45deg, #0a0a0a, #1a1a2e);
    }
    
    .particle,
    .floating-icon,
    .matrix-drop {
        display: none;
    }
}

/* Footer Styles - Modern Glass-morphism Design */
.footer {
    background: linear-gradient(135deg, 
        rgba(10, 10, 26, 0.95) 0%,
        rgba(16, 21, 62, 0.92) 25%,
        rgba(26, 26, 46, 0.90) 50%,
        rgba(15, 52, 96, 0.88) 100%);
    backdrop-filter: blur(30px) saturate(1.8);
    border-top: 1px solid rgba(0, 212, 255, 0.3);
    padding: 30px 0;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 -8px 32px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.03) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.footer:hover::before {
    opacity: 1;
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 212, 255, 0.6), 
        rgba(255, 107, 107, 0.6),
        transparent);
    animation: sweepGlow 3s ease-in-out infinite;
}

@keyframes sweepGlow {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.footer-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    display: inline-block;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 212, 255, 0.05);
}

/* Ensure perfect centering */
.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content:hover {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.3);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 212, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
}

.footer-content p {
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 50%, #ff6b6b 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 4s ease-in-out infinite;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

@keyframes textShimmer {
    0%, 100% { 
        background-position: 0% 50%; 
        filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
    }
    50% { 
        background-position: 100% 50%; 
        filter: drop-shadow(0 0 12px rgba(255, 107, 107, 0.4));
    }
}

/* Enhanced Navigation for Better Alignment */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.25rem;
    backdrop-filter: blur(10px);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(20px);
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .language-switcher {
        margin-top: 1rem;
        justify-content: center;
    }
}