@font-face {
    font-family: 'Hamberger-Bold';
    src: url('/media/games/cyber-ball/fonts/Hamberger-Bold.ttf') format('truetype');
}


  body{
      padding: 0;
      margin: 0;
  }
  ::-webkit-scrollbar {
    width: 10px;
    background: transparent;
    height: 7px;
  }
  
  /* Track */
  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.327);
    height: 7px;
    border-radius: 100px;
  }
  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: #8ec3de;
    border-radius: 100px;
  }
  #full-area{
      width: 100%;
      height: 100vh;
      background: #000;
      position: absolute;
      overflow: hidden;
      user-select: none;
      font-family: 'Hamberger-Bold', sans-serif;
  }
        #game-area{
          position: absolute;
          width: 1180px;
          height: 800px;
          left:50%;
          top:50%;
          transform: translate(-50%,-50%) scale(1) !important;
        }

#gameContainer {
    width: 1280px;
    height: 720px;
    position: absolute;
    overflow: hidden;
    margin: 0 auto;
    left:50%;
    top:50%;
    transform: translate(-50%,-50%);
}


#videoBg {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

#gameContainer.video-bg #videoBg {
    display: block;
}

#renderCanvas {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    touch-action: none;
    display: block;
}


#startScreenHTML, #endScreenHTML {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: none; /* Initially hidden */
    font-family: 'Hamberger-Bold', sans-serif;
    pointer-events: auto;
}

/* When displayed, center the content */
#startScreenHTML[style*="display: flex"], #endScreenHTML[style*="display: flex"] {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#instructionsBox {
    position: relative;
    width: 800px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    margin-top: -50px;
}

#instructionsBg {
    position: absolute;
    width: 800px;
    height: auto;
    object-fit: contain;
}

#instructionsContent {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
    pointer-events: auto;
}

#instructionsTitle {
    color: white;
    font-size: 64px !important;
    text-align: center;
    margin-top: 50px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#instructionsText {
    color: white;
    font-size: 48px;
    text-align: center;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#playButton {
    width: 200px;
    height: auto;
    margin-top: 20px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease;
    position: relative;
    top: -20px;
}

#playButton:hover {
    transform: scale(1.1);
}

#gameOverBox {
    position: relative;
    width: 800px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    margin-top: -50px;
}

#gameOverBg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#gameOverContent {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
    pointer-events: auto;
            margin-top: -50px;
}

#scoreSection {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 150px;
}

#scoreImg {
    width: 150px;
    height: auto;
    margin-top: 50px;
}

#scoreText {
    color: white;
    font-size: 64px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-top: -20px;
}

#highscoreSection {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
        margin-top: -20px;
}

#highscoreBox {
    width: 400px;
    height: auto;
}

#highscoreText {
    position: absolute;
    color: white;
    font-size: 36px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

#buttonsContainer {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

#playAgainBtn, #switchGameBtn {
    width: 300px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#playAgainBtn:hover, #switchGameBtn:hover {
    transform: scale(1.1);
}

 @media ( max-width : 600px ) {
    #gameContainer {
        width: 800px;
        height: 1180px;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
    
    #renderCanvas {
        width: 800px ;
        height: 1180px ;
        touch-action: none;
        display: block;
    }
    
    #startScreenHTML,#endScreenHTML{
        /* transform: scale(.9); */
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        position: absolute;
    }

    #endScreenHTML {
        left: 50%;
        margin: 0;
        transform:translate(-50%, -50%) scale(.9) ;
        transform-origin: center center;
    }

    #instructionsBg{
        width: 780px;
    }

    #playButton{
        transform: scale(1.2);
        top: -20px;
        position: relative;
    }
}