* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

body {
    background: var(--background-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.tv-frame {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#closeWelcome {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 45px;
    height: 45px;
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    color: var(--fourth-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 4px 4px 0px var(--third-color);
    z-index: 120;
}

.ui-icons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 12px;
    z-index: 200;
}

.pc-btn {
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 4px 4px 0px var(--secondary-color);
    outline: none !important;
}

.pc-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas {
    display: block;
    background: var(--background-color);
    image-rendering: pixelated;
}

.overlay {
    position: absolute;
    inset: 0;
    background: var(--background-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.cyan-text {
    color: var(--third-color);
    text-shadow: 4px 4px var(--secondary-color);
    font-size: clamp(24px, 8vw, 60px);
    text-align: center;
}

.pink-text {
    color: var(--secondary-color);
    text-shadow: 4px 4px var(--third-color);
    font-size: clamp(20px, 6vw, 40px);
    text-align: center;
}

.pause-screen {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 150;
}

.pause-modal-pc {
    background: var(--background-color);
    border: 4px solid var(--primary-color);
    padding: 20px 40px;
    color: var(--primary-color);
    font-size: clamp(18px, 6vw, 30px);
    text-shadow: 3px 3px var(--secondary-color);
    box-shadow: 8px 8px 0px var(--secondary-color);
    text-align: center;
}

.crt-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 300;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
    background-size: 100% 3px;
}

.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.7) 150%);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.blink-text {
    animation: blink 1s infinite;
    font-size: clamp(10px, 3vw, 18px);
    color: var(--primary-color);
    margin-top: 20px;
    text-align: center;
}

#rotateOverlay {
    position: fixed;
    inset: 0;
    background: var(--background-color);
    color: var(--primary-color);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    z-index: 9999;
    font-family: 'Press Start 2P', cursive;
    padding: 20px;
}

#rotateOverlay::before {
    content: "";
    display: block;
    width: 45px;
    height: 80px;
    border: 4px solid var(--third-color);
    border-radius: 6px;
    margin-bottom: 30px;
    background: radial-gradient(circle at center bottom 6px, var(--third-color) 4px, transparent 4px);
    background-repeat: no-repeat;
    animation: rotatePhone 2s infinite ease-in-out;
}

#rotateOverlay h1 {
    font-size: clamp(18px, 4vw, 30px);
    color: var(--third-color);
    text-shadow: 2px 2px var(--secondary-color);
    margin: 0;
}

#rotateOverlay small {
    font-size: clamp(10px, 2.5vw, 16px);
    color: var(--secondary-color);
    display: block;
    margin-top: 15px;
}

@keyframes rotatePhone {
    0% {
        transform: rotate(0deg);
    }

    30% {
        transform: rotate(-90deg);
    }

    70% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@media only screen and (min-width: 768px) {
    #closeWelcome{
        display:none;
    }
}