body {
    background-color: #050505;
    /* This acts as the fallback base */
    color: white;
    overflow-x: hidden;
}

/* --- PRELOADER STYLES --- */
#preloader {
    position: fixed;
    inset: 0;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s;
}

body.loading {
    overflow: hidden;
}
/* Custom Cursor Logic */
#cursor {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #eb0028;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

#cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(235, 0, 40, 0.2);
    border-color: transparent;
    mix-blend-mode: normal;
}

@media (hover: hover) and (pointer: fine) {
    body {
        cursor: none;
    }

    #cursor {
        display: block;
    }
}

/* Glitch Text Effect */
.glitch-wrapper {
    position: relative;
}

.glitch-wrapper::before,
.glitch-wrapper::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
}

@media (hover: hover) {
    .card:hover .glitch-wrapper::before {
        left: 2px;
        text-shadow: -1px 0 #00ffff;
        animation: glitch-1 2s infinite linear alternate-reverse;
    }

    .card:hover .glitch-wrapper::after {
        left: -2px;
        text-shadow: -1px 0 #eb0028;
        animation: glitch-2 3s infinite linear alternate-reverse;
    }
}

@keyframes glitch-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    100% {
        clip-path: inset(40% 0 80% 0);
    }
}

.clip-angled {
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}