@import url("https://fonts.googleapis.com/css?family=Press+Start+2P");

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

*::selection {
    background: #fd5d8d;
    color: #f1034a;
    color: #270245;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    position: relative;
    background: #000;
    overflow: hidden;
}

body:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 500;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 400;
    opacity: .8;
    pointer-events: none;
}

.noise:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("https://ice-creme.de/images/background-noise.png");
    pointer-events: none;
}

.noise-moving {
    opacity: 1;
    z-index: 450;
}

.noise-moving:before {
    will-change: background-position;
    animation: noise 1s infinite alternate;
}

.scanlines {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 300;
    opacity: .6;
    will-change: opacity;
    animation: opacity 3s linear infinite;
}

.scanlines:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 51%);
    background-size: 100% 4px;
    will-change: background, background-size;
    animation: scanlines .2s linear infinite;
}

.intro-wrap {
    position: fixed;
    top: 0;
    left: 0;
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    font-size: 2rem;
    width: 100vw;
    height: 100vh;
    background: #2b52ff;
}

.intro-wrap .noise:before {
    background-size: 200%;
}

.intro-wrap .play {
    position: absolute;
    left: 2rem;
    top: 2rem;
    will-change: text-shadow;
    animation: rgbText 2s steps(9) 0s infinite alternate;
}

.intro-wrap .play .char {
    will-change: opacity;
    animation: type 1.2s infinite alternate;
    animation-delay: calc(60ms * var(--char-index));
}

.intro-wrap .time {
    position: absolute;
    right: 2rem;
    top: 2rem;
    will-change: text-shadow;
    animation: rgbText 1s steps(9) 0s infinite alternate;
}

.intro-wrap .recordSpeed {
    position: absolute;
    left: 2rem;
    bottom: 2rem;
    will-change: text-shadow;
    animation: rgbText 1s steps(9) 0s infinite alternate;
}

.intro-wrap .madeWith {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    will-change: text-shadow;
    animation: rgbText 1s steps(9) 0s infinite alternate;
}

.intro-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Garante que ocupe a tela toda */
    position: relative;
    padding: 0 10rem; /* Adiciona distância das bordas laterais */
}

.textCenter {
    position: relative;
}


/* Animations */
@keyframes noise {
    0%, 100% {
        background-position: 0 0;
    }

    10% {
        background-position: -5% -10%;
    }

    20% {
        background-position: -15% 5%;
    }

    30% {
        background-position: 7% -25%;
    }

    40% {
        background-position: 20% 25%;
    }

    50% {
        background-position: -25% 10%;
    }

    60% {
        background-position: 15% 5%;
    }

    70% {
        background-position: 0 15%;
    }

    80% {
        background-position: 25% 35%;
    }

    90% {
        background-position: -10% 10%;
    }
}

@keyframes opacity {
    0% {
        opacity: .6;
    }

    20% {
        opacity: .3;
    }

    35% {
        opacity: .5;
    }

    50% {
        opacity: .8;
    }

    60% {
        opacity: .4;
    }

    80% {
        opacity: .7;
    }

    100% {
        opacity: .6;
    }
}

@keyframes scanlines {
    from {
        background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 51%);
        background-size: 100% 4px;
    }

    to {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 50%, transparent 51%);
        background-size: 100% 4px;
    }
}

@keyframes rgbText {
    0% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 1px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
    }

    25% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 1px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
    }

    45% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 5px 0 1px rgba(251, 0, 231, 0.8), 0 5px 1px rgba(0, 233, 235, 0.8), -5px 0 1px rgba(0, 242, 14, 0.8), 0 -5px 1px rgba(244, 45, 0, 0.8), 5px 0 1px rgba(59, 0, 226, 0.8);
    }

    50% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), -5px 0 1px rgba(251, 0, 231, 0.8), 0 -5px 1px rgba(0, 233, 235, 0.8), 5px 0 1px rgba(0, 242, 14, 0.8), 0 5px 1px rgba(244, 45, 0, 0.8), -5px 0 1px rgba(59, 0, 226, 0.8);
    }

    55% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 0px 0 3px rgba(251, 0, 231, 0.8), 0 0px 3px rgba(0, 233, 235, 0.8), 0px 0 3px rgba(0, 242, 14, 0.8), 0 0px 3px rgba(244, 45, 0, 0.8), 0px 0 3px rgba(59, 0, 226, 0.8);
    }

    90% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), -5px 0 1px rgba(251, 0, 231, 0.8), 0 5px 1px rgba(0, 233, 235, 0.8), 5px 0 1px rgba(0, 242, 14, 0.8), 0 -5px 1px rgba(244, 45, 0, 0.8), 5px 0 1px rgba(59, 0, 226, 0.8);
    }

    100% {
        text-shadow: -1px 1px 8px rgba(255, 255, 255, 0.6), 1px -1px 8px rgba(255, 255, 235, 0.7), 5px 0 1px rgba(251, 0, 231, 0.8), 0 -5px 1px rgba(0, 233, 235, 0.8), -5px 0 1px rgba(0, 242, 14, 0.8), 0 5px 1px rgba(244, 45, 0, 0.8), -5px 0 1px rgba(59, 0, 226, 0.8);
    }
}

@keyframes type {
    0%, 19% {
        opacity: 0;
    }

    20%, 100% {
        opacity: 1;
    }
}

/* Responsividade para dispositivos móveis */
@media screen and (max-width: 768px) {
    .intro-wrap {
        padding: 0 3rem; /* Diminuir o padding lateral */
        font-size: 1.5rem; /* Reduzir o tamanho da fonte */
        text-align: center; /* Centralizar o conteúdo */
    }

    .intro-wrap .play{
        position: fixed;
        left: 1%;
        width: auto;
    }
    /*.intro-wrap .time{*/
    /*    position: absolute;*/
    /*    left: 50%;*/
    /*    transform: translateX(-50%);*/
    /*    width: auto;*/
    /*}*/
    .intro-wrap .recordSpeed{
        position: absolute;
        left: 10%;
        transform: translateX(-50%);
        width: auto;
    }
    /*.intro-wrap .madeWith {*/
    /*    position: absolute;*/
    /*    right: 2rem;*/
    /*    bottom: 2rem;*/
    /*    will-change: text-shadow;*/
    /*    animation: rgbText 1s steps(9) 0s infinite alternate;*/
    /*}*/


    .intro-wrap .time {
        top: 4rem;
    }

    .intro-wrap .recordSpeed {
        bottom: 4rem;
    }

    .intro-wrap .madeWith {
        bottom: 1rem;
    }

    /* Ajustar o texto no container */
    .textCenter {
        padding: 0 1rem;
    }

    .scanlines {
        opacity: 0.4; /* Menor opacidade nas telas pequenas */
    }

    .scanlines:before {
        background-size: 100% 4px; /* Melhor ajuste do tamanho das linhas de scan */
    }
}

@media screen and (max-width: 480px) {
    .intro-wrap {
        font-size: 1.2rem; /* Tamanho de fonte menor */
        padding: 0 1.5rem; /* Reduzir o padding lateral */
    }

    .intro-wrap .play {
        font-size: 1.5rem;
        top: 1rem;
        left: 15%;
        transform: translateX(-50%);
    }

    .intro-wrap .time {
        font-size: 1.2rem;
        top: 1rem;
        left: 65%;
    }

    .intro-wrap .recordSpeed {
        font-size: 1.2rem;
        bottom: 1rem;
        right: 3rem;
    }

    .intro-wrap .madeWith {
        font-size: 1rem;
        bottom: 0.5rem;
        left: 40%;
    }

    /* Ajustar o espaço entre os elementos */
    .textCenter {
        font-size: 1rem;
    }
}
