@import url("https://fonts.googleapis.com/css?family=Press+Start+2P");
* {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

html, body {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}
body {
    margin: 0;
    font-family: "Press Start 2P", cursive;
    font-size: 2em;
    color: white;
}

#promo-code {
  font-size: 32px;
  font-weight: bold;
  color: #00ff00;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

#promo-code strong {
  color: #ffff00;
  font-size: 36px;
}


button {
    outline: none;
    cursor: pointer;
    border: none;
    box-shadow: 3px 5px 0px 0px rgba(0,0,0,0.75);
}

#counter {
    position: absolute;
    top: 20px;
    right: 20px;
    color: black;
    font-weight: bold;
    z-index: 10; /* Чтобы счётчик был поверх Canvas */
}

/* Окно Game Over */
#end {
    position: absolute;
    min-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    flex-direction: column;
    text-align: center;
    background-color: rgba(0,0,0,0.5); /* Полупрозрачный фон */
    z-index: 11; /* Поверх всего */
}

#end button {
    background-color: red;
    padding: 20px 50px;
    font-family: inherit;
    font-size: inherit;
}

#controlls {
    position: absolute;
    min-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10;
}

#controlls div {
    display: grid;
    grid-template-columns: 50px 50px 50px;
    grid-template-rows: auto auto;
    grid-column-gap: 10px;
    grid-row-gap: 10px;
    margin-bottom: 20px;
}

#controlls button {
    width: 100%;
    background-color: white;
    border: 1px solid lightgray;
}

#controlls button:first-of-type {
    grid-column: 1/-1;
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    body {
        font-size: 1.2em;
    }
    #controlls button {
        padding: 10px 0;
        font-size: 0.8em;
    }
}


#backToGames {
    background: #800080;      
    color: #fff;              
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#backToGames:hover {
    transform: scale(1.1);
    background-color: #9b30ff;  
}

