@layer reset, base, components, utilities, animations;

@layer reset {
    @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

    *, *::before, *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
}

@layer base {
    :root {
        --eternity-dark: #0a0014;
        --eternity-purple: #9333ea;
        --eternity-blue: #3b82f6;
        --eternity-gold: #fbbf24;
        --glass-bg: rgba(255, 255, 255, 0.02);
        --glass-border: rgba(255, 255, 255, 0.05);
        --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
        interpolate-size: allow-keywords;
    }

    html {
        scroll-behavior: smooth;
    }

    @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
    }

    body {
        background-color: var(--eternity-dark);
        color: #f3f4f6;
        font-family: 'Space Grotesk', system-ui, sans-serif;
        overflow-x: hidden;
        min-height: 100vh;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    .font-orbitron {
        font-family: 'Orbitron', system-ui, sans-serif;
    }

    ::selection {
        background: rgba(147, 51, 234, 0.4);
        color: #fff;
    }

    :focus-visible {
        outline: 2px solid var(--eternity-purple);
        outline-offset: 2px;
    }
}

@layer components {
    .gradient-text {
        background: linear-gradient(135deg, #c084fc 0%, #60a5fa 50%, #a78bfa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        background-size: 200% 200%;
        animation: gradient-shift 4s ease infinite;
    }

    .gradient-gold {
        background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fbbf24 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        background-size: 200% 200%;
        animation: shimmer 3s linear infinite;
    }

    .gradient-border {
        position: relative;
        background: var(--glass-bg);
        border-radius: 1rem;
    }

    .gradient-border::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(135deg, var(--eternity-purple), var(--eternity-blue));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0.5;
        transition: opacity 0.4s var(--ease-smooth);
    }

    .gradient-border:hover::before {
        opacity: 1;
    }

    .glass {
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid var(--glass-border);
        will-change: backdrop-filter;
    }

    .glass-strong {
        background: rgba(10, 0, 20, 0.85);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(147, 51, 234, 0.2);
    }

    .glass-purple {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(147, 51, 234, 0.2);
    }

    .hero-bg {
        position: relative;
        background-image: url('../background.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        contain: paint;
    }

    .hero-bg::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom,
            rgba(10, 0, 20, 0.4) 0%,
            rgba(10, 0, 20, 0.7) 30%,
            rgba(10, 0, 20, 0.85) 60%,
            rgba(10, 0, 20, 0.95) 100%);
        pointer-events: none;
    }

    .hero-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(147,51,234,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
        pointer-events: none;
        opacity: 0.5;
    }

    .btn-primary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2rem;
        background: linear-gradient(135deg, var(--eternity-purple), var(--eternity-blue));
        border-radius: 0.75rem;
        font-weight: 600;
        color: white;
        transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-smooth);
        position: relative;
        overflow: hidden;
        transform: translateZ(0);
    }

    .btn-primary:hover {
        transform: translateY(-3px) scale(1.02) translateZ(0);
        box-shadow: 0 20px 40px rgba(147, 51, 234, 0.35);
    }

    .btn-primary:active {
        transform: translateY(-1px) scale(0.98) translateZ(0);
    }

    .btn-primary::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        background-size: 200% 100%;
        animation: shimmer 2s infinite;
    }

    .btn-secondary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2rem;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(147, 51, 234, 0.5);
        border-radius: 0.75rem;
        font-weight: 600;
        color: #a78bfa;
        transition: all 0.4s var(--ease-smooth);
        transform: translateZ(0);
    }

    .btn-secondary:hover {
        background: rgba(147, 51, 234, 0.12);
        border-color: var(--eternity-purple);
        transform: translateY(-3px) translateZ(0);
        box-shadow: 0 10px 30px rgba(147, 51, 234, 0.2);
    }

    .card {
        background: var(--glass-bg);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(147, 51, 234, 0.2);
        border-radius: 1rem;
        padding: 1.5rem;
        transition: transform 0.5s var(--ease-out-expo),
                    border-color 0.3s var(--ease-smooth),
                    box-shadow 0.5s var(--ease-out-expo);
        transform: translateZ(0);
        contain: content;
    }

    .card:hover {
        border-color: rgba(147, 51, 234, 0.5);
        transform: translateY(-8px) translateZ(0);
        box-shadow: 0 25px 50px rgba(147, 51, 234, 0.15);
    }

    .card-highlight {
        position: relative;
        overflow: hidden;
    }

    .card-highlight::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.1), transparent);
        transition: left 0.6s var(--ease-out-expo);
    }

    .card-highlight:hover::before {
        left: 100%;
    }

    .input-field {
        width: 100%;
        padding: 0.875rem 1rem;
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(147, 51, 234, 0.3);
        border-radius: 0.75rem;
        color: #f3f4f6;
        font-family: inherit;
        transition: all 0.3s var(--ease-smooth);
    }

    .input-field:focus {
        outline: none;
        border-color: var(--eternity-purple);
        box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.15);
    }

    .input-field::placeholder {
        color: #6b7280;
    }

    .input-field:hover:not(:focus) {
        border-color: rgba(147, 51, 234, 0.5);
    }

    .input-group {
        position: relative;
    }

    .input-group .input-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
        transition: color 0.3s var(--ease-smooth);
    }

    .input-group .input-field {
        padding-left: 2.75rem;
    }

    .input-group:focus-within .input-icon {
        color: var(--eternity-purple);
    }

    .checkbox-custom {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(147, 51, 234, 0.2);
        border-radius: 0.75rem;
        cursor: pointer;
        transition: all 0.3s var(--ease-smooth);
    }

    .checkbox-custom:hover {
        border-color: rgba(147, 51, 234, 0.4);
        background: rgba(147, 51, 234, 0.05);
    }

    .checkbox-custom.selected {
        border-color: var(--eternity-purple);
        background: rgba(147, 51, 234, 0.1);
    }

    .checkbox-custom input { display: none; }

    .checkbox-custom .checkmark {
        width: 1.25rem;
        height: 1.25rem;
        border: 2px solid rgba(147, 51, 234, 0.5);
        border-radius: 0.375rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s var(--ease-spring);
    }

    .checkbox-custom.selected .checkmark {
        background: var(--eternity-purple);
        border-color: var(--eternity-purple);
    }

    .checkbox-custom .checkmark svg {
        width: 0.75rem;
        height: 0.75rem;
        color: white;
        opacity: 0;
        transform: scale(0);
        transition: all 0.25s var(--ease-spring);
    }

    .checkbox-custom.selected .checkmark svg {
        opacity: 1;
        transform: scale(1);
    }

    .progress-bar {
        width: 100%;
        height: 0.5rem;
        background: rgba(147, 51, 234, 0.1);
        border-radius: 9999px;
        overflow: hidden;
    }

    .progress-bar .progress {
        height: 100%;
        background: linear-gradient(90deg, var(--eternity-purple), var(--eternity-blue));
        border-radius: 9999px;
        transition: width 0.6s var(--ease-out-expo);
        position: relative;
    }

    .progress-bar .progress::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        animation: shimmer 2s infinite;
    }

    .nav-link {
        position: relative;
        color: #d1d5db;
        transition: color 0.3s var(--ease-smooth);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--eternity-purple), var(--eternity-blue));
        transition: width 0.4s var(--ease-out-expo);
    }

    .nav-link:hover { color: #a78bfa; }
    .nav-link:hover::after { width: 100%; }

    .status-dot {
        position: relative;
        width: 0.625rem;
        height: 0.625rem;
        border-radius: 50%;
    }

    .status-dot.online { background: #22c55e; }

    .status-dot.online::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: #22c55e;
        animation: ripple 1.5s var(--ease-out-expo) infinite;
    }

    .status-dot.offline { background: #ef4444; }
    .status-dot.pending { background: #eab308; animation: pulse 1s ease-in-out infinite; }

    .icon-box {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(59, 130, 246, 0.1));
        transition: transform 0.4s var(--ease-spring), background 0.3s var(--ease-smooth);
    }

    .icon-box:hover {
        transform: scale(1.1) rotate(5deg);
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(59, 130, 246, 0.2));
    }

    .icon-box i {
        color: var(--eternity-purple);
        font-size: 1.25rem;
    }

    .tooltip { position: relative; }

    .tooltip::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%) translateY(5px) scale(0.95);
        padding: 0.5rem 0.75rem;
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid rgba(147, 51, 234, 0.3);
        border-radius: 0.5rem;
        font-size: 0.75rem;
        color: white;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s var(--ease-out-expo);
        z-index: 100;
        pointer-events: none;
    }

    .tooltip:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .skeleton {
        background: linear-gradient(90deg, #374151 0%, #4b5563 50%, #374151 100%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.2s ease-in-out infinite;
        border-radius: 4px;
    }

    .shimmer-btn {
        position: relative;
        overflow: hidden;
    }

    .shimmer-btn::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        background-size: 200% 100%;
        animation: shimmer 2s infinite;
    }

    .alert {
        padding: 1rem 1.25rem;
        border-radius: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .alert-success {
        background: rgba(34, 197, 94, 0.1);
        border: 1px solid rgba(34, 197, 94, 0.3);
        color: #4ade80;
    }

    .alert-error {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: #f87171;
    }

    .alert-warning {
        background: rgba(234, 179, 8, 0.1);
        border: 1px solid rgba(234, 179, 8, 0.3);
        color: #fbbf24;
    }

    .alert-info {
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.3);
        color: #60a5fa;
    }

    .badge {
        display: inline-flex;
        align-items: center;
        padding: 0.25rem 0.75rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .badge-purple {
        background: rgba(147, 51, 234, 0.2);
        color: #a78bfa;
        border: 1px solid rgba(147, 51, 234, 0.3);
    }

    .badge-green {
        background: rgba(34, 197, 94, 0.2);
        color: #4ade80;
        border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .badge-red {
        background: rgba(239, 68, 68, 0.2);
        color: #f87171;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .badge-yellow {
        background: rgba(234, 179, 8, 0.2);
        color: #fbbf24;
        border: 1px solid rgba(234, 179, 8, 0.3);
    }

    .scan-line {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--eternity-purple), transparent);
        animation: line-scan 3s linear infinite;
        pointer-events: none;
    }

    .glow-text {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor;
    }

    .neon-border {
        box-shadow:
            0 0 5px rgba(147, 51, 234, 0.5),
            0 0 10px rgba(147, 51, 234, 0.3),
            inset 0 0 5px rgba(147, 51, 234, 0.1);
    }

    .cyber-grid {
        background-image:
            linear-gradient(rgba(147, 51, 234, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(147, 51, 234, 0.03) 1px, transparent 1px);
        background-size: 50px 50px;
    }

    .noise-overlay {
        position: fixed;
        inset: 0;
        pointer-events: none;
        opacity: 0.015;
        background: url('data:image/svg+xml,<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)"/></svg>');
        z-index: 9999;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid rgba(147, 51, 234, 0.2);
        border-top-color: var(--eternity-purple);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .loading-dots {
        display: flex;
        gap: 0.25rem;
    }

    .loading-dots span {
        width: 0.5rem;
        height: 0.5rem;
        background: var(--eternity-purple);
        border-radius: 50%;
        animation: bounce-dot 1.4s ease-in-out infinite;
    }

    .loading-dots span:nth-child(2) { animation-delay: 0.16s; }
    .loading-dots span:nth-child(3) { animation-delay: 0.32s; }

    .success-checkmark {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: linear-gradient(135deg, #22c55e, #16a34a);
        display: flex;
        align-items: center;
        justify-content: center;
        animation: scale-in 0.5s var(--ease-spring), pulse-glow 2s ease-in-out infinite;
    }

    .success-checkmark svg {
        width: 40px;
        height: 40px;
        color: white;
        animation: fade-in 0.3s var(--ease-smooth) 0.2s forwards;
        opacity: 0;
    }

    .typing-container {
        min-height: 1.5em;
        display: inline-block;
    }

    .cursor-blink::after {
        content: '|';
        animation: blink 1s step-end infinite;
    }

    #particles {
        position: fixed;
        inset: 0;
        z-index: 0;
        overflow: hidden;
        contain: strict;
    }

    .particle {
        position: fixed;
        pointer-events: none;
        animation: particle-float 20s linear infinite;
        will-change: transform, opacity;
    }

    .particle.drift {
        animation: particle-float 20s linear infinite, particle-drift 4s ease-in-out infinite;
    }

    .form-section {
        opacity: 0;
        animation: fade-up 0.5s var(--ease-out-expo) forwards;
    }

    .form-section.visible { opacity: 1; }
}

@layer utilities {
    .container {
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 1rem;
    }

    @media (min-width: 640px) { .container { padding: 0 1.5rem; } }
    @media (min-width: 1024px) { .container { padding: 0 2rem; } }

    .page-transition {
        opacity: 0;
        transform: translateY(20px) translateZ(0);
        animation: fade-up 0.6s var(--ease-out-expo) forwards;
    }

    .stagger-1 { animation-delay: 0.1s; }
    .stagger-2 { animation-delay: 0.2s; }
    .stagger-3 { animation-delay: 0.3s; }
    .stagger-4 { animation-delay: 0.4s; }
    .stagger-5 { animation-delay: 0.5s; }

    .hover-lift {
        transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-smooth);
        transform: translateZ(0);
    }

    .hover-lift:hover {
        transform: translateY(-6px) translateZ(0);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    }

    .hover-glow:hover {
        box-shadow: 0 0 35px rgba(147, 51, 234, 0.45);
    }

    .hover-border:hover {
        border-color: var(--eternity-purple) !important;
    }

    .text-balance { text-wrap: balance; }

    .line-clamp-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .line-clamp-3 {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
    .scrollbar-thin::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 3px; }
    .scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(147, 51, 234, 0.5); border-radius: 3px; }
    .scrollbar-thin::-webkit-scrollbar-thumb:hover { background: var(--eternity-purple); }

    .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; }
    .delay-600 { animation-delay: 0.6s; }
    .delay-700 { animation-delay: 0.7s; }
    .delay-800 { animation-delay: 0.8s; }

    .hover-reveal { overflow: hidden; }

    .hover-reveal .reveal-content {
        transform: translateY(100%);
        transition: transform 0.4s var(--ease-out-expo);
    }

    .hover-reveal:hover .reveal-content { transform: translateY(0); }

    .magnetic-hover { transition: transform 0.3s var(--ease-smooth); }

    .tilt-card {
        transform-style: preserve-3d;
        perspective: 1000px;
    }

    .tilt-card .tilt-inner { transition: transform 0.4s var(--ease-smooth); }

    .gpu-accelerate {
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .content-hidden { content-visibility: auto; contain-intrinsic-size: auto 500px; }
}

@layer animations {
    @keyframes float {
        0%, 100% { transform: translateY(0) translateZ(0); }
        50% { transform: translateY(-20px) translateZ(0); }
    }

    @keyframes float-slow {
        0%, 100% { transform: translateY(0) rotate(0deg) translateZ(0); }
        50% { transform: translateY(-15px) rotate(2deg) translateZ(0); }
    }

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

    @keyframes pulse-glow {
        0%, 100% { box-shadow: 0 0 20px rgba(147, 51, 234, 0.4); }
        50% { box-shadow: 0 0 45px rgba(147, 51, 234, 0.7), 0 0 70px rgba(147, 51, 234, 0.35); }
    }

    @keyframes pulse-glow-blue {
        0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
        50% { box-shadow: 0 0 45px rgba(59, 130, 246, 0.7), 0 0 70px rgba(59, 130, 246, 0.35); }
    }

    @keyframes shimmer {
        0% { background-position: -200% center; }
        100% { background-position: 200% center; }
    }

    @keyframes gradient-shift {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }

    @keyframes fade-up {
        0% { opacity: 0; transform: translateY(30px) translateZ(0); }
        100% { opacity: 1; transform: translateY(0) translateZ(0); }
    }

    @keyframes fade-in {
        0% { opacity: 0; }
        100% { opacity: 1; }
    }

    @keyframes slide-in-left {
        0% { opacity: 0; transform: translateX(-50px) translateZ(0); }
        100% { opacity: 1; transform: translateX(0) translateZ(0); }
    }

    @keyframes slide-in-right {
        0% { opacity: 0; transform: translateX(50px) translateZ(0); }
        100% { opacity: 1; transform: translateX(0) translateZ(0); }
    }

    @keyframes scale-in {
        0% { opacity: 0; transform: scale(0.9) translateZ(0); }
        100% { opacity: 1; transform: scale(1) translateZ(0); }
    }

    @keyframes bounce-subtle {
        0%, 100% { transform: translateY(0) translateZ(0); }
        50% { transform: translateY(-5px) translateZ(0); }
    }

    @keyframes bounce-dot {
        0%, 80%, 100% { transform: translateY(0) translateZ(0); }
        40% { transform: translateY(-8px) translateZ(0); }
    }

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

    @keyframes rotate-slow {
        0% { transform: rotate(0deg) translateZ(0); }
        100% { transform: rotate(360deg) translateZ(0); }
    }

    @keyframes particle-float {
        0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
        10% { opacity: 0.6; }
        90% { opacity: 0.6; }
        100% { transform: translateY(-100vh) translateX(100px) rotate(360deg); opacity: 0; }
    }

    @keyframes particle-drift {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(30px); }
    }

    @keyframes skeleton-loading {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    @keyframes glow-pulse {
        0%, 100% { filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.5)); }
        50% { filter: drop-shadow(0 0 25px rgba(147, 51, 234, 0.8)); }
    }

    @keyframes border-glow {
        0%, 100% { border-color: rgba(147, 51, 234, 0.3); }
        50% { border-color: rgba(147, 51, 234, 0.8); }
    }

    @keyframes text-glow {
        0%, 100% { text-shadow: 0 0 10px rgba(147, 51, 234, 0.5); }
        50% { text-shadow: 0 0 25px rgba(147, 51, 234, 0.8), 0 0 50px rgba(147, 51, 234, 0.4); }
    }

    @keyframes ripple {
        0% { transform: scale(1); opacity: 1; }
        100% { transform: scale(2); opacity: 0; }
    }

    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
        20%, 40%, 60%, 80% { transform: translateX(5px); }
    }

    @keyframes morph {
        0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
        50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    }

    @keyframes line-scan {
        0% { top: 0; opacity: 1; }
        50% { opacity: 0.5; }
        100% { top: 100%; opacity: 0; }
    }

    @keyframes blink {
        50% { opacity: 0; }
    }

    .animate-float { animation: float 6s var(--ease-smooth) infinite; }
    .animate-float-slow { animation: float-slow 8s var(--ease-smooth) infinite; }
    .animate-float-reverse { animation: float-reverse 5s var(--ease-smooth) infinite; }
    .animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
    .animate-pulse-glow-blue { animation: pulse-glow-blue 2s ease-in-out infinite; }
    .animate-shimmer { animation: shimmer 3s linear infinite; }
    .animate-fade-up { animation: fade-up 0.6s var(--ease-out-expo) forwards; }
    .animate-fade-in { animation: fade-in 0.5s var(--ease-smooth) forwards; }
    .animate-slide-left { animation: slide-in-left 0.6s var(--ease-out-expo) forwards; }
    .animate-slide-right { animation: slide-in-right 0.6s var(--ease-out-expo) forwards; }
    .animate-scale-in { animation: scale-in 0.4s var(--ease-spring) forwards; }
    .animate-bounce-subtle { animation: bounce-subtle 2s var(--ease-smooth) infinite; }
    .animate-rotate-slow { animation: rotate-slow 20s linear infinite; }
    .animate-glow-pulse { animation: glow-pulse 2s ease-in-out infinite; }
    .animate-border-glow { animation: border-glow 2s ease-in-out infinite; }
    .animate-text-glow { animation: text-glow 2s ease-in-out infinite; }
    .animate-shake { animation: shake 0.5s var(--ease-smooth); }
    .animate-morph { animation: morph 8s var(--ease-smooth) infinite; }

    @media (max-width: 768px) {
        .hero-bg { background-attachment: scroll; }
        .particle { opacity: 0.3; }
        .animate-float, .animate-pulse-glow { animation-duration: 8s; }
    }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
        .particle { display: none; }
    }
}

@supports (view-transition-name: slide) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.4s;
        animation-timing-function: var(--ease-out-expo);
    }

    ::view-transition-old(root) {
        animation-name: fade-out-scale;
    }

    ::view-transition-new(root) {
        animation-name: fade-in-scale;
    }

    @keyframes fade-out-scale {
        to { opacity: 0; transform: scale(0.98); }
    }

    @keyframes fade-in-scale {
        from { opacity: 0; transform: scale(1.02); }
    }
}
