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

/* Smooth scroll for the entire page */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior-y: contain;
}

/* Smooth transitions for all interactive elements */
* {
    scroll-behavior: smooth;
}

/* Prevent scroll anchoring jumps */
.hero, .features, .demo-section, footer {
    overflow-anchor: none;
}

/* AI-themed Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 20%, rgba(0, 255, 157, 0.1) 0%, transparent 30%),
        linear-gradient(135deg,
        transparent 0%,
        rgba(0, 212, 255, 0.05) 25%,
        transparent 50%,
        rgba(168, 85, 247, 0.05) 75%,
        transparent 100%
        );
    z-index: -3;
}

/* Animated Circuit Pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.02) 2px,
            rgba(0, 212, 255, 0.02) 4px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 2px,
            rgba(168, 85, 247, 0.02) 2px,
            rgba(168, 85, 247, 0.02) 4px
        );
    z-index: -2;
    animation: circuitPulse 10s ease-in-out infinite;
}

@keyframes circuitPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Neural Network Background Animation */
.neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    opacity: 0.7;
    will-change: transform;
    display: block;
}

.neural-node {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
    will-change: transform, opacity;
}

/* Different node types for variety */
.neural-node.primary {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(0, 212, 255, 1) 0%, transparent 70%);
    animation: pulsePrimary 3s infinite;
}

.neural-node.secondary {
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, transparent 70%);
    animation: pulseSecondary 4s infinite;
}

.neural-node.tertiary {
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.6) 0%, transparent 70%);
    animation: pulseTertiary 5s infinite;
}

@keyframes pulsePrimary {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.8);
        filter: blur(0px);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
        filter: blur(0.5px);
    }
}

@keyframes pulseSecondary {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes pulseTertiary {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Connection lines between nodes */
.neural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    pointer-events: none;
    opacity: 0;
    transform-origin: left center;
    animation: connectionPulse 3s infinite;
}

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
}

/* Floating movement for nodes */
@keyframes floatNode {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(10px, -10px);
    }
    66% {
        transform: translate(-10px, 5px);
    }
}

/* Apply floating to some nodes */
.neural-node:nth-child(3n) {
    animation: pulsePrimary 3s infinite, floatNode 10s infinite;
}

.neural-node:nth-child(3n+1) {
    animation: pulseSecondary 4s infinite, floatNode 12s infinite;
}

.neural-node:nth-child(3n+2) {
    animation: pulseTertiary 5s infinite, floatNode 15s infinite;
}

/* Back to top button */
.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    z-index: 99999 !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(0, 212, 255, 0.3) !important;
    transform: translateY(-3px) translateZ(0) !important;
    -webkit-transform: translateY(-3px) translateZ(0) !important;
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.back-to-top svg {
    width: 20px !important;
    height: 20px !important;
    fill: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 180px 20px 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.hero h2, .hero-subtitle, .hero-description, .cta-button {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix for closing artifacts - disable animations on unload */
.neural-bg, .neural-node {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Prevent artifacts from animated SVG icons */
.feature-icon svg, .feature-icon svg * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Page unload state - stops all animations */
body.unloading * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00d4ff, #ffffff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #b3b3b3;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-description {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 40px;
    line-height: 1.8;
}

.cta-button {
    background: linear-gradient(45deg, #00d4ff, #a855f7);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

/* Features Section */
.features {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

.features h3 {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00d4ff, #ffffff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.features-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(168, 85, 247, 0.06));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

/* Animated gradient border */
.feature-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.2), rgba(0, 212, 255, 0.2));
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
}

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

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow:
        0 12px 25px rgba(0, 212, 255, 0.08),
        0 6px 12px rgba(168, 85, 247, 0.04);
}

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

.feature-card:hover::after {
    opacity: 0.3;
}

/* Icon enhancements */
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    z-index: 2;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) translateY(-3px);
}

.feature-icon svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 212, 255, 0.2));
    transition: filter 0.4s ease;
}

.feature-card:hover .feature-icon svg {
    filter: drop-shadow(0 6px 12px rgba(0, 212, 255, 0.3));
}

/* Pulse effect on hover */
.feature-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease;
    z-index: -1;
}

.feature-card:hover .feature-icon::after {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
    animation: iconPulse 0.8s ease-out;
}

@keyframes iconPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffffff;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.feature-card:hover h4 {
    color: rgba(255, 255, 255, 1);
}

.feature-card p {
    color: #b3b3b3;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover p {
    color: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

/* Hover shine effect */
.feature-card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-200%);
    transition: transform 0.6s ease;
    z-index: 3;
    pointer-events: none;
}

.feature-card:hover .feature-card-shine {
    transform: rotate(45deg) translateX(200%);
}

/* Demo Section */
.demo-section {
    padding: 100px 20px;
    background: transparent;
    text-align: center;
}

.demo-content {
    max-width: 800px;
    margin: 0 auto;
}

.demo-section h3 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00d4ff, #ffffff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.demo-section p {
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Demo Form Styles */
.demo-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Enhanced focus states for accessibility */
.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 3px rgba(0, 212, 255, 0.2),
        0 0 20px rgba(0, 212, 255, 0.1);
}

/* Focus visible for keyboard navigation */
.form-group input:focus-visible,
.form-group textarea:focus-visible {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow:
        0 0 0 3px rgba(0, 212, 255, 0.3),
        0 0 30px rgba(0, 212, 255, 0.2);
}

/* Valid state */
.form-group input:valid:not(:placeholder-shown) {
    border-color: rgba(0, 255, 157, 0.3);
}

/* Invalid state with better visual feedback */
.form-group input:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 100, 100, 0.5);
    background: rgba(255, 100, 100, 0.05);
}

/* Laravel error state */
.form-group input.error,
.form-group textarea.error {
    border-color: rgba(255, 100, 100, 0.5);
    background: rgba(255, 100, 100, 0.05);
}

/* Error message improvements */
.error-message {
    display: block;
    position: absolute;
    bottom: -22px;
    left: 0;
    font-size: 0.85rem;
    color: #ff6464;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:invalid:not(:placeholder-shown):not(:focus) ~ .error-message {
    opacity: 1;
    transform: translateY(0);
}

/* Required field indicator */
.form-group label::after {
    content: ' *';
    color: rgba(255, 100, 100, 0.8);
    font-weight: 400;
}

.form-group:last-of-type label::after {
    content: '';
}

/* Visual feedback on interaction */
.form-group input:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

/* Disabled state */
.form-group input:disabled,
.form-group textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Textarea specific */
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit button alignment */
.demo-form .cta-button {
    margin-top: 30px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    border: none;
    position: relative;
    transition: all 0.3s ease;
}

/* Enhanced button focus state */
.demo-form .cta-button:focus {
    outline: none;
    box-shadow:
        0 10px 30px rgba(0, 212, 255, 0.4),
        0 0 0 3px rgba(0, 212, 255, 0.3);
}

.demo-form .cta-button:focus-visible {
    box-shadow:
        0 10px 30px rgba(0, 212, 255, 0.5),
        0 0 0 3px rgba(0, 212, 255, 0.4);
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Loading spinner and success message styles */
.form-submit-btn {
    position: relative;
    overflow: hidden;
}

.form-submit-btn .btn-text {
    transition: opacity 0.3s ease;
}

.form-submit-btn.loading .btn-text {
    opacity: 0;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.form-submit-btn.loading .loading-spinner {
    opacity: 1;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success message styles */
.form-success {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    margin-top: 40px;
}

.form-success.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    display: block;
}

.success-icon {
    margin-bottom: 20px;
    animation: successPulse 0.6s ease-out;
}

.success-icon svg {
    filter: drop-shadow(0 4px 20px rgba(0, 212, 255, 0.3));
}

.success-icon path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: checkmark 0.6s ease-out 0.3s forwards;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes checkmark {
    to { stroke-dashoffset: 0; }
}

.form-success h4 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 600;
}

.form-success p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Hide form when success is shown */
.demo-form.hidden {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
    position: absolute;
    visibility: hidden;
}

/* Mobile optimizations - heavily optimized for performance */
@media (max-width: 768px) {
    /* Enable hardware acceleration and optimize scrolling */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        position: relative;
        width: 100%;
        min-height: 100vh;
        background-attachment: scroll !important;
        /* Force hardware acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Drastically reduce animations on mobile for better performance */
    .neural-node {
        animation-duration: 8s !important;
        will-change: auto !important;
        /* Reduce blur effects that cause stuttering */
        filter: none !important;
    }

    .neural-connection {
        animation: none !important;
        opacity: 0.1 !important;
        /* Hide connections on very small screens */
    }

    /* Disable complex animations on mobile */
    .feature-card::after {
        animation: none !important;
        display: none; /* Completely remove animated borders on mobile */
    }

    /* Simplify backdrop filters on mobile - major performance gain */
    .feature-card {
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
    }

    /* Reduce shadow complexity on mobile */
    .cta-button {
        box-shadow: 0 3px 10px rgba(0, 212, 255, 0.15) !important;
    }

    .feature-card:hover {
        box-shadow: 0 5px 12px rgba(0, 212, 255, 0.03) !important;
        /* Reduce hover effects on mobile */
        transform: none !important;
    }

    /* CRITICAL: Optimize hero section for mobile performance */
    .hero {
        background-attachment: scroll !important;
        /* Force hardware acceleration */
        will-change: transform;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .hero-content {
        position: relative !important;
        z-index: 10;
        /* Force hardware acceleration for smooth fading */
        will-change: opacity, transform;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Optimize hero text rendering on mobile - FIXED */
    .hero h2,
    .hero-subtitle,
    .hero-description {
        /* Use standard font smoothing for gradient text compatibility */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Fix gradient text for ALL headings on mobile */
    .hero h2 {
        /* Keep original gradient, don't override */
        -webkit-font-smoothing: antialiased;
        color: #ffffff; /* Fallback color */
    }

    .features h3 {
        /* Keep original gradient, don't override */
        -webkit-font-smoothing: antialiased;
        color: #ffffff; /* Fallback color */
    }

    .demo-section h3 {
        /* Keep original gradient, don't override */
        -webkit-font-smoothing: antialiased;
        color: #ffffff; /* Fallback color */
    }

    .hero {
        padding: 120px 20px 60px;
        min-height: auto;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1rem;
    }

    .features,
    .demo-section {
        padding: 80px 20px;
    }

    .features h3,
    .demo-section h3 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Hide back to top button completely on mobile */
    .back-to-top {
        display: none !important;
    }

    /* Remove any transforms that might interfere */
    body,
    html {
        transform: none !important;
        -webkit-transform: none !important;
    }

    /* Ensure no parent elements interfere with fixed positioning */
    * {
        /* Remove any transform that creates new stacking context */
        -webkit-transform: none;
        transform: none;
    }

    /* Re-add transforms only where needed */
    .hero,
    .hero-content {
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }

    /* Force hardware acceleration for critical elements */
    .hero,
    .hero-content,
    .features,
    .feature-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: auto; /* Reset will-change after animation */
    }

    /* Ensure fixed positioning works on mobile */
    body {
        /* Remove any transforms that might affect fixed positioning */
        position: relative;
    }

    /* Optimize feature icons on mobile */
    .feature-icon svg {
        will-change: auto;
        /* Disable filters that cause performance issues */
        filter: none !important;
    }

    /* Disable non-essential animations and effects */
    .neural-node:nth-child(3n),
    .neural-node:nth-child(3n+1),
    .neural-node:nth-child(3n+2) {
        animation: none !important; /* Completely disable complex node animations */
    }

    /* Reduce circuit pattern complexity significantly */
    body::after {
        opacity: 0.05 !important;
        animation: none !important; /* Disable circuit animation on mobile */
    }

    body::before {
        opacity: 0.7 !important; /* Reduce background gradient intensity */
    }

    /* Disable hover shine effects on mobile */
    .feature-card-shine {
        display: none !important;
    }

    /* Optimize form elements for mobile */
    .form-group input,
    .form-group textarea {
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
    }
}

/* Disable neural background on very small screens */
@media (max-width: 400px) {
    .neural-bg {
        display: none !important;
    }

    body::before,
    body::after {
        opacity: 0.5 !important;
    }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
    .feature-card:hover {
        transform: none;
    }

    .feature-card:hover .feature-icon {
        transform: none;
    }

    .feature-card-shine {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 20px 60px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1rem;
    }

    .features,
    .demo-section {
        padding: 60px 20px;
    }

    .features h3,
    .demo-section h3 {
        font-size: 2rem;
    }

    .features-subtitle,
    .demo-section p {
        font-size: 1rem;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .demo-form {
        padding: 0 10px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 20px 40px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.feature-card {
    animation: fadeInUp 1s ease-out;
}

.feature-card.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

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

    .neural-node,
    .neural-connection {
        animation: none !important;
    }

    .feature-card:hover {
        transform: none !important;
    }

    .hero-content {
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .back-to-top,
    .neural-bg,
    body::before,
    body::after {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero,
    .features,
    .demo-section {
        background: white !important;
        color: black !important;
        page-break-inside: avoid;
    }

    .feature-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

/* Laravel Specific Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.alert-success {
    background-color: rgba(0, 255, 157, 0.1);
    border-color: rgba(0, 255, 157, 0.3);
    color: #00ff9d;
}

.alert-danger {
    background-color: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.alert-info {
    background-color: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

/* Pagination Styles for Laravel */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    gap: 5px;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: block;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.pagination .active span {
    background: linear-gradient(45deg, #00d4ff, #a855f7);
    border-color: transparent;
    color: white;
}

.pagination .disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}
