.loading {
    overflow: hidden;
}

.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeOut 0.5s ease-out 0.5s forwards;
}

.loading::after {
    content: 'Czatujemy 2.0';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-primary);
    text-shadow: 0 0 20px var(--neon-primary);
    z-index: 10001;
    animation: pulse 1s infinite, fadeOut 0.5s ease-out 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}

.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--neon-primary);
    animation: matrix-fall linear infinite;
}

@keyframes matrix-fall {
    to {
        transform: translateY(100vh);
    }
}

.holographic {
    position: relative;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 255, 255, 0.1) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: holographic-shine 3s infinite;
}

.holographic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: holographic-sweep 2s infinite;
}

@keyframes holographic-shine {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes holographic-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.neon-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--gradient-primary) border-box;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
    animation: neon-border-rotate 4s linear infinite;
}

@keyframes neon-border-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.glitch {
    position: relative;
    color: var(--text-primary);
    font-weight: bold;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--neon-primary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--neon-secondary);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% {
        transform: translate(0);
    }
    15%, 49% {
        transform: translate(-2px, 2px);
    }
}

@keyframes glitch-2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% {
        transform: translate(0);
    }
    21%, 62% {
        transform: translate(2px, -2px);
    }
}

.scan-lines {
    position: relative;
    overflow: hidden;
}

.scan-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    animation: scan-lines-move 0.1s linear infinite;
}

@keyframes scan-lines-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream::after {
    content: '01001000 01100101 01101100 01101100 01101111';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-primary);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: data-flow 3s linear infinite;
}

@keyframes data-flow {
    0% { left: -100%; }
    100% { left: 100%; }
}

.morph-shape {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: morph 4s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 25% 75% 75% 25%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 75% 25% 25% 75%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 25% 75% 25% 75%;
        transform: rotate(270deg);
    }
}

.float-element {
    animation: float-gentle 6s ease-in-out infinite;
}

.float-element:nth-child(2n) {
    animation-delay: -2s;
    animation-direction: reverse;
}

.float-element:nth-child(3n) {
    animation-delay: -4s;
}

@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.energy-pulse {
    position: relative;
}

.energy-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-primary), transparent);
    transform: translate(-50%, -50%);
    animation: energy-pulse-animation 2s infinite;
}

@keyframes energy-pulse-animation {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.circuit-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, var(--neon-primary) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, var(--neon-secondary) 2px, transparent 2px),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 255, 0.1) 25%, rgba(0, 255, 255, 0.1) 26%, transparent 27%),
        linear-gradient(0deg, transparent 24%, rgba(255, 0, 255, 0.1) 25%, rgba(255, 0, 255, 0.1) 26%, transparent 27%);
    background-size: 50px 50px, 50px 50px, 50px 50px, 50px 50px;
    background-position: 0 0, 25px 25px, 0 0, 0 0;
    animation: circuit-flow 10s linear infinite;
}

@keyframes circuit-flow {
    0% { background-position: 0 0, 25px 25px, 0 0, 0 0; }
    100% { background-position: 50px 50px, 75px 75px, 50px 50px, 50px 50px; }
}

.hex-grid {
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.1) 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    animation: hex-shift 8s linear infinite;
}

@keyframes hex-shift {
    0% { background-position: 0 0, 15px 15px; }
    100% { background-position: 30px 30px, 45px 45px; }
}

.laser-beam {
    position: relative;
    overflow: hidden;
}

.laser-beam::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-primary), transparent);
    animation: laser-sweep 2s infinite;
}

@keyframes laser-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.quantum-dots {
    position: relative;
}

.quantum-dots::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, var(--neon-primary) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, var(--neon-secondary) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, var(--neon-accent) 1px, transparent 1px);
    background-size: 40px 40px, 60px 60px, 80px 80px;
    animation: quantum-dance 15s linear infinite;
    opacity: 0.3;
}

@keyframes quantum-dance {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@media (max-width: 768px) {
    .orb-1, .orb-2, .orb-3 {
        animation-duration: 20s;
    }
    
    .particles {
        animation-duration: 30s;
    }
    
    .neon-text {
        animation: none;
        text-shadow: 0 0 5px var(--neon-primary);
    }
    
    .matrix-rain,
    .cyber-grid,
    .circuit-pattern,
    .quantum-dots::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles,
    .gradient-orb,
    .matrix-rain,
    .cyber-grid {
        display: none;
    }
}

@media (prefers-contrast: high) {
    :root {
        --neon-primary: #ffffff;
        --neon-secondary: #ffffff;
        --neon-accent: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --bg-primary: #000000;
        --bg-secondary: #111111;
    }
}

@media print {
    .background-animation,
    .particles,
    .gradient-orb,
    .matrix-rain,
    .cyber-grid,
    .navbar {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-title,
    .section-title {
        color: black !important;
        text-shadow: none !important;
    }
}