/* === Reset and Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #e5e7eb;
    background-color: #0d0d0d;
}

/* === Keyframes === */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes heroBackgroundSlideshow {
    0%, 25% { opacity: 1; }
    30%, 100% { opacity: 0; }
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Utility Classes === */
.animate-fade-in-slide-up {
    animation: fadeInSlideUp 0.7s ease-out forwards;
    opacity: 0;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}

/* === Navigation Enhancements === */
nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

nav a {
    position: relative;
    transition: all 0.3s ease;
}

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

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

/* === Button Enhancements === */
button, .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

button:hover::before, .btn:hover::before {
    left: 100%;
}

/* === Form Enhancements === */
.form-input {
    position: relative;
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

/* === Card Hover Effects === */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-hover:hover::before {
    opacity: 1;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* === Text Gradient Effects === */
.gradient-text {
    background: linear-gradient(45deg, #8b5cf6, #ec4899, #6366f1);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: spookyGradient 6s ease-in-out infinite;
}

/* === Loading States === */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #8b5cf6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* === Mobile Optimizations === */
@media (max-width: 768px) {
    .mobile-padding {
        padding: 1rem;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem;
    }
    
    .mobile-grid-1 {
        grid-template-columns: 1fr;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* === Form Radio Button Styling === */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #6b7280;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

input[type="radio"]:checked {
    border-color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.2);
}

input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8b5cf6;
    transform: translate(-50%, -50%);
}

/* === Success Message Animation === */
.success-fade-in {
    animation: fadeInSlideUp 0.5s ease-out forwards;
}

/* === FAQ Toggle Styles === */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.active {
    max-height: 200px;
}

.faq-toggle.active i {
    transform: rotate(180deg);
}

/* === Responsive Design === */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Dark Mode Enhancements === */
.dark-card {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.dark-input {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    color: #f9fafb;
}

.dark-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 1px #8b5cf6;
}

.dark-input::placeholder {
    color: #9ca3af;
}

/* === Hero Background Carousel === */
.hero-background-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-bg-slide.active {
    opacity: 1;
}

.hero-bg-slide:nth-child(1) { animation: heroBackgroundSlideshow 16s infinite 0s; }
.hero-bg-slide:nth-child(2) { animation: heroBackgroundSlideshow 16s infinite 4s; }
.hero-bg-slide:nth-child(3) { animation: heroBackgroundSlideshow 16s infinite 8s; }
.hero-bg-slide:nth-child(4) { animation: heroBackgroundSlideshow 16s infinite 12s; }

/* === Enhanced Visual Effects === */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.neon-glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5),
                0 0 40px rgba(139, 92, 246, 0.3),
                0 0 60px rgba(139, 92, 246, 0.1);
}

/* === App Preview Enhancements === */
.app-preview-phone {
    position: relative;
    overflow: hidden;
}

.app-preview-phone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-preview-phone:hover::before {
    opacity: 1;
}

/* === Logo Animations === */
.logo-float {
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* === Background Image Optimizations === */
.bg-image-overlay {
    position: relative;
}

.bg-image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(1px) brightness(0.8);
    z-index: -1;
}

/* === Animation Delays === */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; } 