* {
    font-family: "Press Start 2P", system-ui;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    font-family: Arial, sans-serif;

    overflow: hidden; /* Отключаем прокрутку всего документа */
    height: 100vh; /* Фиксируем высоту */
    margin: 0;
    touch-action: none; /* Ограничиваем нежелательные жесты */
}

#game-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;


    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto; /* Прокрутка только внутри контейнера */
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
    touch-action: pan-y; /* Разрешаем только вертикальную прокрутку */
}

#canvas {
    background-color: #000;
    border: 2px solid #fff;
    max-width: 99vw;
    max-height: 90vh;
    aspect-ratio: 1 / 1;
}

button {
    background: #2D515D;;
    color: white;
    padding: 14px 23px;
    cursor: pointer;
    font-weight: 400;
    font-size: 11px;
    line-height: 1;
    border: none;
    z-index: 2;
}

.topBlock {
    position: relative;
    text-align: center;
}

#logo {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    max-height: 32px;

    user-select: none; /* Для большинства браузеров */
    -webkit-user-select: none; /* Для Safari */
    -moz-user-select: none; /* Для Firefox */
    -ms-user-select: none; /* Для Internet Explorer/Edge */
}


#score, #coordinate {
    color: #fff;
    font-size: 24px;
    margin: 10px 0;
    user-select: none; /* Для большинства браузеров */
    -webkit-user-select: none; /* Для Safari */
    -moz-user-select: none; /* Для Firefox */
    -ms-user-select: none; /* Для Internet Explorer/Edge */
}

.text, img {
    user-select: none; /* Для большинства браузеров */
    -webkit-user-select: none; /* Для Safari */
    -moz-user-select: none; /* Для Firefox */
    -ms-user-select: none; /* Для Internet Explorer/Edge */
}


#gameOver, #welcome, #winGame {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameOver > .content {
    background: black;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 64px;
    position: relative;
}

#gameOver .text {
    margin-bottom: 30px;
    font-size: 12px;
    position: relative;
    text-align: center;
}

#gameOver .img._1 {
    position: absolute;
    left: -40px;
    top: -20px;
}

#gameOver .img._2 {
    position: absolute;
    right: -30px;
    top: -23px;
    width: 25px;

    img {
        max-width: 100%;
    }
}


#welcome > .content {
    background: black;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 60px 80px;
    position: relative;
}

#welcome .text {
    margin-bottom: 33px;
    max-width: 200px;
    font-size: 12px;
    letter-spacing: 0;
    text-align: center;
    position: relative;
}

#welcome .img {
    position: absolute;
}

#welcome .img._1 {
    left: -35px;
    bottom: -50px;
}

#welcome .img._2 {
    right: -20px;
    bottom: -40px;
}


#winGame {
    background: black;
    color: white;
    text-align: center;
}


#winGame .content {
    position: relative;
    padding: 100px;
}

#winGame .text {
    font-weight: 400;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

#winGame .code {
    padding-top: 15px;
    font-weight: 800;
    display: block;
    font-size: 24px;
    position: relative;
    cursor: pointer;
}

#copied {
    position: absolute;
    left: 100%;
    bottom: 0;
    pointer-events: none;
    transition: transform 0.5s ease-in-out, opacity 0.3s ease-in;
    opacity: 0;
    color: black;
    transform: translateX(-50%) rotate(20deg);
    font-size: 12px;
    background: white;
    z-index: 999;
    padding: 0px 10px;
}

#copied.active {
    opacity: 1;
    transform: translateX(-50%) translateY(-100%) rotate(20deg);
}


#winGame button {
    padding: 15px 52px;
    font-size: 14px;
    line-height: 1.5;
}

#winGame .img {
    position: absolute;
}

#winGame .img._1 {
    left: 90%;
    top: -30px;
}

#winGame .img._2 {
    right: 105%;
    top: 20px;
}

#winGame .img._3 {
    left: 90%;
    top: 90px;
}

#winGame button {
    margin-bottom: 20px;
}

#winGame a {
    font-size: 11px;
    width: 100%;
    display: block;
    text-decoration: none !important;
    position: relative;
}

#winGame a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: white;
}


#gamepad {
    color: white;
}


.wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 1;
    pointer-events: none;

    img {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: fill;
    }
}

mark {
    background: none;
    color: yellow;
    font-weight: 500;
}
