@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

/* 3D Perspective and Transform Styles */
body {
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow-x: hidden;
}

.container-3d {
    transform-style: preserve-3d;
    perspective: 2000px;
}

/* 3D Floating Elements */
.floating-3d {
    transform-style: preserve-3d;
    animation: float3d 6s ease-in-out infinite;
}

@keyframes float3d {
    0%, 100% { 
        transform: translateY(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% { 
        transform: translateY(-30px) rotateX(5deg) rotateY(10deg) rotateZ(2deg);
    }
    50% { 
        transform: translateY(-60px) rotateX(0deg) rotateY(20deg) rotateZ(0deg);
    }
    75% { 
        transform: translateY(-30px) rotateX(-5deg) rotateY(10deg) rotateZ(-2deg);
    }
}

/* 3D Construction Elements */
.construction-3d {
    position: fixed;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 1;
}

.construction-3d img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    animation: rotate3d 8s linear infinite;
}

@keyframes rotate3d {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    25% { transform: rotateX(90deg) rotateY(90deg) rotateZ(0deg); }
    50% { transform: rotateX(180deg) rotateY(180deg) rotateZ(90deg); }
    75% { transform: rotateX(270deg) rotateY(270deg) rotateZ(180deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* 3D Card Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.05),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.card-3d:hover {
    transform: translateY(-20px) rotateX(10deg) rotateY(5deg) scale(1.05);
    box-shadow: 
        0 40px 80px rgba(56, 189, 248, 0.2),
        0 0 0 1px rgba(56, 189, 248, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* 3D Text Effects */
.text-3d {
    transform-style: preserve-3d;
    text-shadow: 
        0 1px 0 #ccc,
        0 2px 0 #c9c9c9,
        0 3px 0 #bbb,
        0 4px 0 #b9b9b9,
        0 5px 0 #aaa,
        0 6px 1px rgba(0,0,0,.1),
        0 0 5px rgba(0,0,0,.1),
        0 1px 3px rgba(0,0,0,.3),
        0 3px 5px rgba(0,0,0,.2),
        0 5px 10px rgba(0,0,0,.25),
        0 10px 10px rgba(0,0,0,.2),
        0 20px 20px rgba(0,0,0,.15);
}

.text-3d-animated {
    animation: textFloat3d 4s ease-in-out infinite;
}

@keyframes textFloat3d {
    0%, 100% { 
        transform: translateY(0px) rotateX(0deg);
        text-shadow: 
            0 1px 0 #ccc,
            0 2px 0 #c9c9c9,
            0 3px 0 #bbb,
            0 4px 0 #b9b9b9,
            0 5px 0 #aaa,
            0 6px 1px rgba(0,0,0,.1),
            0 0 5px rgba(0,0,0,.1),
            0 1px 3px rgba(0,0,0,.3),
            0 3px 5px rgba(0,0,0,.2),
            0 5px 10px rgba(0,0,0,.25),
            0 10px 10px rgba(0,0,0,.2),
            0 20px 20px rgba(0,0,0,.15);
    }
    50% { 
        transform: translateY(-10px) rotateX(5deg);
        text-shadow: 
            0 1px 0 #ccc,
            0 2px 0 #c9c9c9,
            0 3px 0 #bbb,
            0 4px 0 #b9b9b9,
            0 5px 0 #aaa,
            0 6px 1px rgba(0,0,0,.1),
            0 0 5px rgba(0,0,0,.1),
            0 1px 3px rgba(0,0,0,.3),
            0 3px 5px rgba(0,0,0,.2),
            0 5px 10px rgba(0,0,0,.25),
            0 10px 10px rgba(0,0,0,.2),
            0 20px 20px rgba(0,0,0,.15),
            0 0 30px rgba(56, 189, 248, 0.3);
    }
}

/* 3D Button Effects */
.btn-3d {
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-3d:hover::before {
    left: 100%;
}

.btn-3d:hover {
    transform: translateY(-5px) rotateX(10deg) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(56, 189, 248, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-3d:active {
    transform: translateY(-2px) rotateX(5deg) scale(1.02);
}

/* 3D Parallax Layers */
.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform-style: preserve-3d;
}

.layer-1 { transform: translateZ(0px); }
.layer-2 { transform: translateZ(-100px); }
.layer-3 { transform: translateZ(-200px); }
.layer-4 { transform: translateZ(-300px); }

/* 3D Particle System */
.particle-3d {
    position: fixed;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 2;
}

.particle-3d::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: particle3d 3s ease-in-out infinite;
}

@keyframes particle3d {
    0% {
        transform: translateZ(0px) rotateX(0deg) rotateY(0deg);
        opacity: 1;
        scale: 1;
    }
    50% {
        transform: translateZ(100px) rotateX(180deg) rotateY(180deg);
        opacity: 0.7;
        scale: 1.2;
    }
    100% {
        transform: translateZ(0px) rotateX(360deg) rotateY(360deg);
        opacity: 0;
        scale: 0.5;
    }
}

/* 3D Construction Site Background */
.construction-site-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    z-index: 0;
    animation: sitePulse 8s ease-in-out infinite;
}

@keyframes sitePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* 3D Progress Bar */
.progress-3d {
    position: relative;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9, #06b6d4);
    border-radius: 10px;
    animation: progress3d 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

@keyframes progress3d {
    0% { width: 0%; transform: translateZ(0px); }
    50% { width: 75%; transform: translateZ(10px); }
    100% { width: 100%; transform: translateZ(0px); }
}

/* 3D Loading Spinner */
.spinner-3d {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(56, 189, 248, 0.1);
    border-top: 4px solid #38bdf8;
    border-radius: 50%;
    animation: spin3d 1s linear infinite;
    transform-style: preserve-3d;
}

@keyframes spin3d {
    0% { transform: rotate(0deg) rotateX(0deg) rotateY(0deg); }
    100% { transform: rotate(360deg) rotateX(360deg) rotateY(360deg); }
}

/* 3D Hover Effects for Icons */
.icon-3d {
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
}

.icon-3d:hover {
    transform: translateY(-10px) rotateX(15deg) rotateY(15deg) scale(1.1);
    filter: drop-shadow(0 20px 40px rgba(56, 189, 248, 0.3));
}

.icon-3d:active {
    transform: translateY(-5px) rotateX(10deg) rotateY(10deg) scale(1.05);
}

/* 3D Form Elements */
.form-3d {
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.form-3d input {
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(56, 189, 248, 0.2);
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.form-3d input:focus {
    transform: translateZ(10px);
    border-color: #38bdf8;
    box-shadow: 
        0 20px 40px rgba(56, 189, 248, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

/* 3D Responsive Design */
@media (max-width: 768px) {
    .card-3d:hover {
        transform: translateY(-10px) rotateX(5deg) scale(1.02);
    }
    
    .text-3d {
        text-shadow: 
            0 1px 0 #ccc,
            0 2px 0 #c9c9c9,
            0 3px 0 #bbb,
            0 4px 0 #b9b9b9,
            0 5px 0 #aaa,
            0 6px 1px rgba(0,0,0,.1),
            0 0 5px rgba(0,0,0,.1),
            0 1px 3px rgba(0,0,0,.3);
    }
    
    .construction-3d img {
        width: 40px;
        height: 40px;
    }
}

/* Custom animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.3); }
    50% { box-shadow: 0 0 30px rgba(56, 189, 248, 0.6); }
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce-click {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin-fast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes drift {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    25% { transform: translateX(10px) translateY(-5px); }
    50% { transform: translateX(-5px) translateY(10px); }
    75% { transform: translateX(-10px) translateY(-5px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Animation classes */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.slide-in-up {
    animation: slide-in-up 0.8s ease-out forwards;
}

.fade-in {
    animation: fade-in 1s ease-out forwards;
}

.bounce-in {
    animation: bounce-in 0.8s ease-out forwards;
}

.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

.bounce-click {
    animation: bounce-click 0.3s ease-in-out;
}

.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

.heartbeat {
    animation: heartbeat 1s ease-in-out infinite;
}

.spin-fast {
    animation: spin-fast 0.5s linear;
}

.shake {
    animation: shake 0.3s ease-in-out;
}

.sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

.drift {
    animation: drift 8s ease-in-out infinite;
}

.twinkle {
    animation: twinkle 3s ease-in-out infinite;
}

/* Delay classes */
.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }
.delay-1200 { animation-delay: 1.2s; }

/* Custom gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.sky-blue-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

/* Interactive SVG styles */
.interactive-svg {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.interactive-svg:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(56, 189, 248, 0.3));
}

.interactive-svg:active {
    transform: scale(0.9);
}

.mouse-follow {
    transition: transform 0.1s ease-out;
}

/* Background interactive icons */
.bg-icon {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
    transition: all 0.3s ease;
}

.bg-icon:hover {
    opacity: 0.3;
    transform: scale(1.2);
}

.bg-icon.clicked {
    animation: sparkle 0.6s ease-out;
}

.bg-icon.drift-icon {
    animation: drift 12s ease-in-out infinite;
}

.bg-icon.twinkle-icon {
    animation: twinkle 4s ease-in-out infinite;
}

.bg-icon.float-icon {
    animation: float 4s ease-in-out infinite;
}

.bg-icon.rotate-icon {
    animation: rotate-slow 15s linear infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0ea5e9;
}

/* Mouse Trail Effects */
.mouse-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    mix-blend-mode: screen;
}

.trail-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.8) 0%, rgba(14, 165, 233, 0.4) 50%, transparent 100%);
    animation: trail-fade 1s ease-out forwards;
}

.trail-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9997;
    width: 4px;
    height: 4px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 6px #38bdf8;
    animation: sparkle-trail 0.8s ease-out forwards;
}

@keyframes trail-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

@keyframes sparkle-trail {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.1) rotate(360deg);
    }
}

/* Cursor trail effect */
.cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.3) 0%, transparent 70%);
    animation: cursor-trail-fade 0.5s ease-out forwards;
}

@keyframes cursor-trail-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bg-icon {
        opacity: 0.05;
    }
    
    .bg-icon:hover {
        opacity: 0.15;
    }
    
    .trail-particle {
        animation-duration: 0.6s;
    }
    
    .trail-sparkle {
        width: 3px;
        height: 3px;
    }
}
