/* Base styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    perspective: 1000px;
}

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

/* Starry background */
#stars, #stars2, #stars3 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Hero section */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
    transform-style: preserve-3d;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: 
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.hero > * {
    transform: translateZ(50px);
}

/* Text animations */
.animate-title {
    animation: 
        glow 3s ease-in-out infinite,
        float 6s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(59, 130, 246, 0.5),
            0 0 40px rgba(59, 130, 246, 0.2);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(59, 130, 246, 0.8),
            0 0 60px rgba(59, 130, 246, 0.4);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Navigation */
nav a {
    position: relative;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover {
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

nav a:hover::after {
    width: 80%;
}

/* Feature cards */
.feature-card {
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    background: linear-gradient(145deg, rgba(55, 65, 81, 0.3), rgba(55, 65, 81, 0.1));
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.feature-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(59, 130, 246, 0.2),
        inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.feature-card i {
    transition: all 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.2) rotate(360deg);
    color: #60A5FA;
}

/* Buttons */
.rounded-full, .rounded-lg {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.rounded-full::before, .rounded-lg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    z-index: -1;
}

.rounded-full:hover::before, .rounded-lg:hover::before {
    width: 300%;
    height: 300%;
}

/* Social media icons */
.fab {
    transition: all 0.3s ease;
}

.fab:hover {
    transform: scale(1.2) rotate(360deg);
    color: #60A5FA;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 4px;
    border: 2px solid rgba(31, 41, 55, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Glassmorphism */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(31, 41, 55, 0.6));
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }

    .feature-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Loading animation */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s ease-out 1s forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
.group:hover .group-hover\:animate-bounce {
    animation: bounce 1s infinite;
}

.group:hover .group-hover\:animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); }
    50% { transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}
