html {
    overflow-x: hidden;
}

body {
    background-color: #050505;
    color: #EAEAEA;
    overflow-x: hidden;
    cursor: none;
    width: 100%;
    max-width: 100vw;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid white;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 1);
    border-color: transparent;
    mix-blend-mode: difference;
}

.glitch-image-hover {
    filter: grayscale(1) brightness(0.8);
    transform: scale(1);
    backface-visibility: hidden;
    will-change: filter, transform;
}

.glitch-image-hover,
.group:hover .glitch-image-hover {
    transition-property: filter, transform;
    transition-duration: 700ms;
    transition-timing-function: ease-out;
}

.group:hover .glitch-image-hover {
    filter: grayscale(0) contrast(1.05) brightness(1.05);
    transform: scale(1.03);
}

.text-outline {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    color: transparent;
    transition: all 0.3s ease;
}

.text-outline:hover {
    -webkit-text-stroke: 0px;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#loader {
    transform-origin: top;
}

.glitch-wrapper {
    position: relative;
}

.glitch-wrapper::before,
.glitch-wrapper::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
    pointer-events: none;
    text-shadow: none !important;
}

.glitch-wrapper::before {
    color: #e0e0e0;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-4px, -4px);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-wrapper::after {
    color: #808080;
    z-index: -2;
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translate(4px, 4px);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-wrapper:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4);
    transition: text-shadow 0.3s ease;
}

iframe.grayscale {
    filter: grayscale(100%);
    transition: filter 0.7s ease-out;
}

iframe.grayscale:hover {
    filter: grayscale(0%);
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%);
        transform: translate(-4px, 2px);
    }

    20% {
        clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%);
        transform: translate(4px, -2px);
    }

    40% {
        clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%);
        transform: translate(-4px, 4px);
    }

    60% {
        clip-path: polygon(0 90%, 100% 10%, 100% 100%, 0 100%);
        transform: translate(4px, 0px);
    }

    80% {
        clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
        transform: translate(-2px, -4px);
    }

    100% {
        clip-path: polygon(0 35%, 100% 35%, 100% 60%, 0 60%);
        transform: translate(2px, 2px);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: polygon(0 10%, 100% 10%, 100% 15%, 0 15%);
        transform: translate(4px, -4px);
    }

    20% {
        clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
        transform: translate(-4px, 2px);
    }

    40% {
        clip-path: polygon(0 20%, 100% 20%, 100% 35%, 0 35%);
        transform: translate(4px, 4px);
    }

    60% {
        clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%);
        transform: translate(-2px, 2px);
    }

    80% {
        clip-path: polygon(0 30%, 100% 30%, 100% 40%, 0 40%);
        transform: translate(4px, -2px);
    }

    100% {
        clip-path: polygon(0 80%, 100% 80%, 100% 90%, 0 90%);
        transform: translate(-4px, 4px);
    }
}
