body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000;
    color: white;
    overflow: hidden;
    user-select: none;
}

p {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}

/* Szum */
canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    z-index: 10;
}

.content {
    position: relative;
    z-index: 1;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 90%;
    text-align: center;
}

.gameMenu {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Efekt 3D w napisach */
.glitch {
    position: relative;
    display: inline-block;
    font-weight: 650;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: none;
    opacity: 0.3;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    z-index: -1;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-before 2s infinite linear;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 blue;
    z-index: -2;
    clip: rect(0, 900px, 0, 0);
    animation: glitch-after 2s infinite linear;
}

@keyframes glitch-before {
    0% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(0);
    }
    10% {
        clip: rect(10px, 9999px, 30px, 0);
        transform: translate(-2px, -2px);
    }
    20% {
        clip: rect(50px, 9999px, 80px, 0);
        transform: translate(2px, 2px);
    }
    30% {
        clip: rect(20px, 9999px, 50px, 0);
        transform: translate(-2px, 0);
    }
    40% {
        clip: rect(60px, 9999px, 90px, 0);
        transform: translate(0, 2px);
    }
    50% {
        clip: rect(10px, 9999px, 40px, 0);
        transform: translate(2px, -2px);
    }
    100% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(0);
    }
}

@keyframes glitch-after {
    0% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(0);
    }
    10% {
        clip: rect(40px, 9999px, 70px, 0);
        transform: translate(2px, 2px);
    }
    20% {
        clip: rect(0px, 9999px, 60px, 0);
        transform: translate(-2px, -2px);
    }
    30% {
        clip: rect(70px, 9999px, 100px, 0);
        transform: translate(0, 2px);
    }
    40% {
        clip: rect(10px, 9999px, 40px, 0);
        transform: translate(2px, 0);
    }
    50% {
        clip: rect(30px, 9999px, 60px, 0);
        transform: translate(-2px, 2px);
    }
    100% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(0);
    }
}

/* Czcionka retro */
.retro {
    font-family: 'VT323';
    color: white;
    font-size: x-large;
}

/* Przyciski dot. muzyki/dźwięku */
#soundToggle {
    font-size: 24px;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 21;
}

#musicToggle {
    font-size: 24px;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 70px;
    z-index: 21;
}

#settings {
    font-size: 24px;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 111px;
    z-index: 21;
}

/* Informacja o możliwości zapauzowania gry */
.info {
    font-size: 24px;
    color: white;
    position: absolute !important;
    left: 20px;
    bottom: 0;
    text-align: left;
    display: grid;
    line-height: 0;
    z-index: 21;
}

/* Ekran menu/pauzy/wygranej */
#pauseOverlay, #menuOverlay, #winOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
}

.square {
    position: relative;
    display: flex;
    flex-direction: column;
    top: 60px;
    z-index: 30;
}

.square2 {
    display: flex;
    flex-direction: column;
    top: 60px;
    z-index: 30;
}

.square3 {
    display: flex;
    flex-direction: column;
    transform: translateY(-130px);
    align-items: center;
    z-index: 30;
}

.pauseText {
    font-size: 80px;
    text-align: center;
    z-index: 30;
}

.menuText {
    font-family: 'VT323';
    font-size: 300px;
    z-index: 30;
    transform: translateY(-15vh);
    position: relative;
    opacity: 1;
    transition: transform 1s ease-in-out, font-size 1s ease, opacity 0.3s ease-in;
}

.menuText.small {
    transform: translateY(-41vh);
    font-size: 200px;
}

#restart, #restartWholeGame {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.24);
    color: white;
    border: 2px solid white;
    border-radius: 2px;
    cursor: pointer;
    width: 200px;
    height: 70px;
}

#restart:hover, #restartWholeGame:hover {
    background-color: rgba(66, 30, 30, 0.336);
    color: #ffe6e6;
    border: 2px solid #ffe6e6;
}

.scaled {
    transform: scale(0.75) translateY(-35%);
}

.fade {
    transition: opacity 0.3s ease-in;
    opacity: 1;
}

.blink-start {
    animation: blink-start 2s infinite;
}

.blink-resume {
    animation: blink-resume 2s infinite;
}

@keyframes blink-start {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes blink-resume {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.hidden-cursor {
    cursor: none !important;
}

.minimal {
    opacity: 1;
}

.trophy {
    transform: scale(0.42);
    animation: scaleTrophy 4s linear infinite;
}

@keyframes scaleTrophy {
    0% { transform: scale(0.42); }
    50% { transform: scale(0.44); }
    100% { transform: scale(0.42); }
}

.trophy-glow {
    z-index: -1;
    position: absolute;
    top: calc(50% - 140px);
    left: calc(50%);
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.95;
    transition: transform 0.1s ease-out;
    content: "";
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.5), transparent 70%);
    animation: rotateGlow 128s linear infinite;
}

@keyframes rotateGlow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}