/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes glowPulse {
    0% {
        opacity: 0.1;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.1;
        transform: scale(0.95);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Cyber Grid Animation */
@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Particle Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(20px) rotate(5deg);
    }
    50% {
        transform: translateY(-35px) translateX(-20px) rotate(-5deg);
    }
    75% {
        transform: translateY(-20px) translateX(20px) rotate(5deg);
    }
}

@keyframes particleFade {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.8;
    }
}

/* Cyber Grid Styles */
.cyber-grid {
    background-image: 
        linear-gradient(to right, rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 15s linear infinite;
}

/* Particles Styles */
.particles-container {
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 240, 255, 0.5);
    border-radius: 50%;
    filter: blur(0.5px);
    animation: float 18s infinite ease-in-out, particleFade 6s infinite ease-in-out;
}

.particle:nth-child(2n) {
    background: rgba(112, 0, 255, 0.5);
    animation-delay: -2s;
    animation-duration: 24s;
}

.particle:nth-child(3n) {
    width: 6px;
    height: 6px;
    animation-delay: -4s;
    animation-duration: 30s;
    filter: blur(1px);
}

.particle:nth-child(4n) {
    width: 3px;
    height: 3px;
    animation-delay: -6s;
    animation-duration: 20s;
}

.particle:nth-child(5n) {
    background: rgba(0, 240, 255, 0.7);
    width: 5px;
    height: 5px;
    animation-delay: -8s;
    animation-duration: 22s;
    filter: blur(0.7px);
}

/* Position particles across the container */
.particle:nth-child(1) { top: 10%; left: 20%; }
.particle:nth-child(2) { top: 20%; left: 80%; }
.particle:nth-child(3) { top: 30%; left: 45%; }
.particle:nth-child(4) { top: 40%; left: 15%; }
.particle:nth-child(5) { top: 50%; left: 85%; }
.particle:nth-child(6) { top: 60%; left: 35%; }
.particle:nth-child(7) { top: 70%; left: 75%; }
.particle:nth-child(8) { top: 80%; left: 25%; }
.particle:nth-child(9) { top: 15%; left: 65%; }
.particle:nth-child(10) { top: 25%; left: 90%; }
.particle:nth-child(11) { top: 85%; left: 55%; }
.particle:nth-child(12) { top: 45%; left: 95%; }
.particle:nth-child(13) { top: 75%; left: 5%; }
.particle:nth-child(14) { top: 35%; left: 70%; }
.particle:nth-child(15) { top: 95%; left: 40%; }
.particle:nth-child(16) { top: 5%; left: 30%; }
.particle:nth-child(17) { top: 55%; left: 15%; }
.particle:nth-child(18) { top: 65%; left: 60%; }
.particle:nth-child(19) { top: 88%; left: 88%; }
.particle:nth-child(20) { top: 8%; left: 8%; }
.particle:nth-child(21) { top: 45%; left: 45%; }
.particle:nth-child(22) { top: 28%; left: 68%; }
.particle:nth-child(23) { top: 48%; left: 32%; }
.particle:nth-child(24) { top: 92%; left: 12%; }
.particle:nth-child(25) { top: 12%; left: 92%; }

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

/* Animated sections */
section {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Hero section gradient animation */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, rgba(0, 240, 255, 0.1), rgba(112, 0, 255, 0.1));
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
    z-index: 0;
}

/* Logo styles */
.logo-container {
    position: relative;
    padding: 2rem;
}

.logo-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 240, 255, 0.1), rgba(112, 0, 255, 0.1));
    animation: glowPulse 3s ease-in-out infinite;
    border-radius: 1rem;
}

/* Form focus effects */
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2);
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.2);
}

/* Smooth transitions */
button, a {
    transition: all 0.3s ease;
}

/* Footer styles */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    position: relative;
    display: inline-block;
}

footer p:first-child::after {
    content: '❤️';
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.8em;
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Galaxy Animations */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg);
    }
}

@keyframes nebulaPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.6;
    }
}

@keyframes shootingStar {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(200%) translateY(200%) rotate(45deg);
        opacity: 0;
    }
}

/* Galaxy Background */
.galaxy-background {
    background: radial-gradient(circle at center, rgba(112, 0, 255, 0.1), rgba(0, 240, 255, 0.05), transparent 70%);
}

/* Star Layer */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    filter: blur(0.5px);
    animation: twinkle var(--twinkle-duration, 4s) infinite ease-in-out;
}

.star:nth-child(2n) {
    width: 3px;
    height: 3px;
    background: rgba(0, 240, 255, 0.9);
}

.star:nth-child(3n) {
    width: 1px;
    height: 1px;
    background: rgba(112, 0, 255, 0.9);
}

/* Nebula Layer */
.nebula {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at center, 
        rgba(0, 240, 255, 0.2),
        rgba(112, 0, 255, 0.2),
        transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
    animation: nebulaPulse var(--nebula-duration, 15s) infinite ease-in-out;
}

/* Orbital Layer */
.orbital {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 240, 255, 0.8);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    filter: blur(1px);
    --orbit-radius: 150px;
    animation: orbit var(--orbit-duration, 20s) infinite linear;
}

.orbital:nth-child(2n) {
    background: rgba(112, 0, 255, 0.8);
    --orbit-radius: 200px;
    animation-duration: 25s;
    animation-direction: reverse;
}

.orbital:nth-child(3n) {
    background: white;
    --orbit-radius: 250px;
    animation-duration: 30s;
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 50px;
    height: 1px;
    background: linear-gradient(to right, transparent, white, transparent);
    filter: blur(1px);
    opacity: 0;
    animation: shootingStar var(--shooting-duration, 3s) infinite ease-out;
}

.shooting-star:nth-child(1) { --shooting-duration: 3s; animation-delay: 0s; top: 20%; left: 30%; }
.shooting-star:nth-child(2) { --shooting-duration: 4s; animation-delay: 1s; top: 40%; left: 60%; }
.shooting-star:nth-child(3) { --shooting-duration: 3.5s; animation-delay: 1.5s; top: 60%; left: 20%; }
.shooting-star:nth-child(4) { --shooting-duration: 4.5s; animation-delay: 2s; top: 80%; left: 50%; }
.shooting-star:nth-child(5) { --shooting-duration: 3.8s; animation-delay: 2.5s; top: 30%; left: 70%; }

/* Star Positions */
.star:nth-child(1) { --twinkle-duration: 4s; top: 10%; left: 20%; }
.star:nth-child(2) { --twinkle-duration: 5s; top: 20%; left: 80%; }
.star:nth-child(3) { --twinkle-duration: 4.5s; top: 30%; left: 45%; }
.star:nth-child(4) { --twinkle-duration: 3.5s; top: 40%; left: 15%; }
.star:nth-child(5) { --twinkle-duration: 5.5s; top: 50%; left: 85%; }
.star:nth-child(6) { --twinkle-duration: 4.2s; top: 60%; left: 35%; }
.star:nth-child(7) { --twinkle-duration: 3.8s; top: 70%; left: 75%; }
.star:nth-child(8) { --twinkle-duration: 4.8s; top: 80%; left: 25%; }
.star:nth-child(9) { --twinkle-duration: 5.2s; top: 15%; left: 65%; }
.star:nth-child(10) { --twinkle-duration: 3.6s; top: 25%; left: 90%; }
.star:nth-child(11) { --twinkle-duration: 4.4s; top: 85%; left: 55%; }
.star:nth-child(12) { --twinkle-duration: 5.4s; top: 45%; left: 95%; }
.star:nth-child(13) { --twinkle-duration: 3.9s; top: 75%; left: 5%; }
.star:nth-child(14) { --twinkle-duration: 4.7s; top: 35%; left: 70%; }
.star:nth-child(15) { --twinkle-duration: 5.1s; top: 95%; left: 40%; }

/* Nebula Positions */
.nebula:nth-child(1) { --nebula-duration: 15s; top: 20%; left: 30%; }
.nebula:nth-child(2) { --nebula-duration: 18s; top: 60%; left: 70%; }
.nebula:nth-child(3) { --nebula-duration: 20s; top: 40%; left: 50%; }
.nebula:nth-child(4) { --nebula-duration: 16s; top: 80%; left: 20%; }
.nebula:nth-child(5) { --nebula-duration: 22s; top: 30%; left: 80%; }

/* Orbital Positions */
.orbital:nth-child(1) { --orbit-duration: 20s; }
.orbital:nth-child(2) { --orbit-duration: 25s; }
.orbital:nth-child(3) { --orbit-duration: 30s; }
.orbital:nth-child(4) { --orbit-duration: 22s; }
.orbital:nth-child(5) { --orbit-duration: 28s; }
.orbital:nth-child(6) { --orbit-duration: 24s; }
.orbital:nth-child(7) { --orbit-duration: 32s; }
.orbital:nth-child(8) { --orbit-duration: 26s; }
.orbital:nth-child(9) { --orbit-duration: 21s; }
.orbital:nth-child(10) { --orbit-duration: 29s; }

/* Menu Button Styles */
.menu-button {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 60;
}

.menu-button-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease;
}

.menu-button:hover .menu-button-bg {
    transform: scale(1.1);
}

.menu-button-lines {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
}

.menu-button-lines span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-button:hover .menu-button-lines span {
    background: #00f0ff;
}

.menu-button.open .menu-button-lines span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-button.open .menu-button-lines span:nth-child(2) {
    opacity: 0;
}

.menu-button.open .menu-button-lines span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.menu-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
} 