/* --------------SPACE ASTEROIDS STYLE------------------------------- */

body{
    margin: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
    background-color: black;
    color: white;
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;

}

.space{
    margin-top: 1%;
    margin-bottom: 0;
    padding: 0;
    font-size: 2.5rem;
    border: 2px solid blue;
}
#score-container {

    position: fixed;
    margin: 0;
    top: 10%;
    right: 10%;
    font-size: 1rem;
  }

#game-container{
    margin: 1vh;
    /* margin: 0; */
    position: relative;
    display: grid;
    border: 2px solid white;
    grid-template-rows: 1fr auto;
    width: 82vw;
    height: 85vh;
}



.ship,.bullet, .enemy{
    /* background-color: white; */
    position: absolute;
    height: 10px;
    width: 10px;
    margin: 0;
    padding: 0;
}





 /* .ship{
    position: absolute;
    grid-row: 2;
    grid-column: 2;
    bottom: 10px;
    left: calc(50% - 10px); /* ship center
     width: 40px;
  height: 40px;
  background-color: #fff;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}   */


.ship {
        position: absolute;
        border-radius: 50%;
        grid-row: 2;
        grid-column: 2;
        bottom: 10px;
        left: calc(50% - 20px);
        width: 50px;
        height: 50px;
        background-image: url('images/spaceshipimage.png'); 
        background-size: cover;
        background-repeat: no-repeat;
        /* background-color: white; */
}


#start-button{
    position: absolute;
    border-radius: 10px;
    font-family: poppins,Arial, Helvetica, sans-serif;
    height:50px;
    width: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background-color: #3498db;
    color: white;
    cursor: pointer; 

}

.enemy{
    border-radius: 50%;
    /* background-color: grey;  */
    animation: spin 2s linear infinite; /* Add the spin animation */  
}


.enemy1 {
    animation: spin 1s linear infinite;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    background-image: url('images/asteroid.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center; 
    /* background-color: black; */
  }

  .enemy2 {
    animation: spin 2s linear infinite;
    width: 40px;
    height: 40px;
    background-image: url('images/asteroid.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center; 
    /* background-color: black; */
  }

  .enemy3 {
    animation: spin 3s linear infinite;
    width: 80px;
    height: 80px;
    background-image: url('images/big_astroid.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center; 
    /* background-color: white;  */
  }


  .bullet{
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    background-color: yellow;
    box-shadow: 1px 1px 1px 2px rgb(244, 244, 154);
}
@keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  #controls-container {
    position: fixed;
    margin-top: 10px;
    display:none; /* hidden on computer screen*/
  }
  
  #controls-container button {
    margin: 0 10px;
  }

  @media (max-width: 1024px) {
    /* Show controls only on screens with a max-width of 768px (typical mobile size) */
    #controls-container {
        position: fixed;
        width: 57%;
        height: 12px;
        bottom: 13%;
        display: flex;
        justify-content: center;
    }


    #game-container{
        margin-top: 87vh;
        position: fixed;
        display: grid;
        border: 2px solid white;
        grid-template-rows: 1fr auto;
        width: 90vw;
        height: 75vh;
    }

    #controls-container{
        margin-top: 30px;
    }
    #left-arrow, #right-arrow, #center-circle{
        margin-top: 20%;
        border: none;
        padding-left: 30%;

        width: 100px;
        height: 100px;
    }


    #left-arrow{
        
    background-image: url('images/left_key.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center; 
    background-color: black;
    }

    #center-circle{
        
        background-image: url('images/attack_key.png');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center; 
        background-color: black;
    }

    #right-arrow {
        
        background-image: url('images/right_key.png');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center; 
        background-color: black;
    
    }

    .space{
        margin-top: 2%;
        /* margin-bottom: 1%; */
        padding: 0;
    }

}

@media (max-width: 600px) {
    .space{
        top: 1%;
        position: fixed;
        font-size: 1rem;
        left: 10%;
    }

    #score-container {
        position: fixed;
        margin: 0;
        top: 3%;
        right: 10%;
        font-size: 1rem;
    }

    #controls-container {
        position: fixed;
        width: 81%;
        height: 0;
        bottom: 16%;
        display: flex;
        justify-content: center;
    }
}
