body {
    background-color: black;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    font-family: "Nunito Sans", sans-serif;
    transition: opacity 0.8s ease-in-out;
}

.falling-text {
    position: fixed;
    top: -50px;
    color: rgba(150, 150, 150, 0.2);
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 9996;
    animation: textfall linear forwards;
    text-transform: lowercase;
    text-shadow: 0 0 5px rgba(100, 100, 100, 0.3);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

@keyframes textfall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 0.25;
    }

    80% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(120vh);
        opacity: 0;
    }
}

body.transition-to-video {
    opacity: 0;
}

#background-video {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#background-video.show {
    opacity: 1;
    filter: brightness(0.7);
    /* Darkness effect */
}

#background-video.show.extra-dark {
    filter: brightness(0.5);

}

/* Global Grain / Noise Effect */
body::after {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
    z-index: 9998;
    animation: grain-shift 0.5s steps(3) infinite;
    mix-blend-mode: overlay;
}

@keyframes grain-shift {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -5%);
    }

    20% {
        transform: translate(-10%, 5%);
    }

    30% {
        transform: translate(5%, -10%);
    }

    40% {
        transform: translate(-5%, 15%);
    }

    50% {
        transform: translate(-10%, 5%);
    }

    60% {
        transform: translate(15%, 0);
    }

    70% {
        transform: translate(0, 10%);
    }

    80% {
        transform: translate(-15%, 0);
    }

    90% {
        transform: translate(10%, 5%);
    }

    100% {
        transform: translate(5%, 0);
    }
}

.button {
    background-color: transparent;
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;

    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.button:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.button:active {
    transform: translate(-50%, -50%) scale(0.98);
    color: #d0d0d0;
}

.overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.overlay p {
    color: white;
    font-size: 2em;
    margin-bottom: 11px;
}

.mute-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    cursor: pointer;
    background-color: black;
}

.mute-button img {
    max-width: 40px;
    display: block;
}

.pfp-container {
    position: relative;
    display: inline-block;
}

.pfp {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0px 0px 3px 5px #d19ae7;
    background: linear-gradient(45deg, #f0aef1, #d19ae7);
    background-size: 200% 200%;
    animation: gradient-animation 3s ease infinite;
}

.pfp-deco {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    pointer-events: none;
    z-index: 1;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.small-images {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.superp,
.superv,
.svg-inline--fa.fa-discord.fa-w-14 {
    width: 18px;
    margin: 0 5px;
    color: white;
}

* {
    user-select: none;
    cursor: url(https://cur.cursors-4u.net/others/oth-8/oth704.cur), auto !important;
}

.overlay p,
.overlay a,
.overlay span,
.overlay strong,
.overlay em {
    position: relative;
    color: #e8e8e8;
    text-shadow:
        0 0 3px rgba(255, 255, 255, 0.6),
        0 0 8px rgba(200, 220, 255, 0.4),
        0 0 15px rgba(150, 180, 220, 0.2);
    animation: creepy-flicker 4s infinite ease-in-out;
    letter-spacing: 1px;
}

@keyframes creepy-flicker {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.6), 0 0 8px rgba(200, 220, 255, 0.4);
    }

    50% {
        opacity: 0.9;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 12px rgba(180, 200, 240, 0.5);
    }
}

.pfp {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0px 0px 3px 5px rgb(255, 182, 245);
    background: linear-gradient(45deg, #f0aef1, #d19ae7);
    background-size: 200% 200%;
    animation: gradient-animation 3s ease infinite;
    position: relative;
    filter: contrast(1.15) brightness(1.08) saturate(1.12);
    animation: vhs-glitch-soft 2.2s infinite linear alternate;
}

@keyframes vhs-glitch-soft {
    0% {
        filter: contrast(1.15) brightness(1.08) saturate(1.12) hue-rotate(0deg);
        left: 0px;
    }

    10% {
        filter: contrast(1.18) brightness(1.10) saturate(1.15) hue-rotate(-2deg);
        left: -0.5px;
    }

    20% {
        filter: contrast(1.13) brightness(1.07) saturate(1.10) hue-rotate(2deg);
        left: 0.5px;
    }

    30% {
        filter: contrast(1.17) brightness(1.09) saturate(1.13) hue-rotate(-1deg);
        left: -0.7px;
    }

    40% {
        filter: contrast(1.15) brightness(1.08) saturate(1.12) hue-rotate(1deg);
        left: 0.7px;
    }

    100% {
        filter: contrast(1.15) brightness(1.08) saturate(1.12) hue-rotate(0deg);
        left: 0px;
    }
}

/* Lignes VHS */
body::before {
    content: "";
    pointer-events: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 4px);
    animation: vhs-lines 0.3s infinite linear;
}

@keyframes vhs-lines {
    0% {
        background-position-y: 0;
    }

    100% {
        background-position-y: 4px;
    }
}

/* ========== MOBILE RESPONSIVE ========== */
@media screen and (max-width: 768px) {

    /* Video fullscreen cover */
    #background-video {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        object-fit: cover;
    }

    /* Button - larger touch target */
    .button {
        font-size: 18px;
        padding: 14px 35px;
        min-width: 120px;
        min-height: 50px;
    }

    /* Overlay adjustments */
    .overlay {
        top: 45%;
        width: 90%;
        padding: 10px;
    }

    .overlay:hover {
        transform: translate(-50%, -50%) scale(1.0);
    }

    .overlay p {
        font-size: 1.5em;
        background-size: 50px 50px !important;
    }

    /* Profile picture */
    .pfp {
        width: 90px;
        height: 90px;
    }

    .pfp-deco {
        width: 120px;
        height: 120px;
    }

    /* Small images (badges) */
    .superp,
    .superv {
        width: 20px;
        height: 20px;
    }

    /* Discord icon */
    .overlay a svg {
        width: 35px;
        height: 35px;
    }

    /* Mute button */
    .mute-button {
        top: 15px;
        right: 15px;
    }

    .mute-button img {
        max-width: 35px;
    }

    /* Falling text - smaller on mobile */
    .falling-text {
        font-size: 10px;
    }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
    .button {
        font-size: 16px;
        padding: 12px 28px;
    }

    .overlay {
        top: 40%;
    }

    .overlay p {
        font-size: 1.2em;
    }

    .pfp {
        width: 70px;
        height: 70px;
    }

    .pfp-deco {
        width: 95px;
        height: 95px;
    }

    .superp,
    .superv {
        width: 16px;
        height: 16px;
    }

    .overlay a svg {
        width: 28px;
        height: 28px;
    }
}