/* Setting styles */
@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Bangers", "Impact", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    transition: all .3s ease-in-out;
}

#container{
    height: 100vh;
    background: linear-gradient(135deg, #ffe6b5, #ff99cc);
    overflow: hidden;
}

/* Scoreboard */
#scoreboard{    
    padding: 15px 15px 0px;
    width: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 5px 0px 10px 5px rgba(0, 0, 0, 0.1);    
    margin: 15px auto;
}

#scoreboard h1{
    margin-bottom: 5px;
    text-align: center;
    font-size: 3rem;
}

#scoreboard ul{
    list-style: none;
    font-size: 1.5rem;
}

.scores{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;    
}

.score{
    text-align: right;
}

#user-score, ul li:nth-child(1){
    color: rgb(23, 23, 78);    
}

#game-field{
    /* background: rgba(215, 227, 236,0.5); */
    width: 100%;
    height: 100%;
    /* box-shadow: 5px 0px 10px 5px rgba(0, 0, 0, 0.1) inset;  */
    border-radius: 50px;
}

.rounds{
    width: 300px;
    font-size: 1.3rem;
    padding: 5px;
    margin: 10px auto;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* Edit Round */
.number-input {
    border: none; /* No border */
    border-bottom: 2px solid #000; /* Bottom border */
    background: transparent; /* Transparent background */
    width: 60px; /* Adjust width as needed */
    margin-left: 10px; /* Space between label and input */
    padding: 5px; /* Padding for a better appearance */
    font-size: 1.5rem; /* Font size */
    text-align: center;
}

/* Hide the default spinner arrows */
.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
    -webkit-appearance: none; /* Hides the spinner */
    margin: 0; /* Removes margin */
}

.number-input:focus {
    outline: none; /* Remove default focus outline */
    border-bottom: 2px solid #007BFF; /* Change color on focus */
}

/* Game Field */
#game-field{
    position: relative;
    display: flex;
    /* flex-wrap: wrap; */
    justify-content: center;    
}

#game-result{
    opacity: 0;
    transform: scale(0.7);
    display: inline-block;
    background-color: white;
    font-size: 2rem;
    padding: 15px;
    border-radius: 5px;
    text-wrap:wrap;
    align-self: baseline;
    margin-top: 50px;
    text-align: center;
}

.attack{
    opacity: 0;
    transform: translateY(5%);
}

.attack-animation{    
    animation: attack both 1 0.5s ease-in-out;
}

.game-result-animation{    
    animation: pop forwards 1 0.5s ease-in-out;
}

#total-round:hover{
    display: inline-block;
    /* box-shadow: 5px 0px 10px 5px rgba(0, 0, 0, 0.2);     */
    cursor: pointer;
    padding: 0px 10px;
    border-bottom: 2px solid #180a29;
}

/* Choices - Controls*/

#controls{
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #b2e0e0, #d4f1f9);
    box-shadow: 5px 0px 10px 5px rgba(0, 0, 0, 0.2);    
}

#options{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;    
}

.choices, .attack{        
    height: 150px;
    width: 150px;    
    padding: 15px;
    margin: 5px 15px;
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    overflow: hidden;
}

.choices img, .attack img{
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.choices:hover{
    cursor: pointer;
    transform: scale(0.95);
}

.choices:hover img{
    transform: translateY(-5px) scale(1.1); /* Move up and slightly enlarge */    
}

/* Game Over Panel */

#game-over{
    transform: scaleY(0);
    transform-origin: top;
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-over-panel{
    opacity: 0;
    transform: scale(0);
    background-color: white;
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.2) inset;
    padding: 25px 30px;
    font-size: 35px;
    text-align: center;
    margin: 15px;
    border-radius: 15px;
}

.btn-controls{
    display: inline-block;
    padding: 10px 15px;
    margin: 5px 10px;
    border-radius: 15px;
}

.btn-controls:hover{
    transform: translateY(-5%);
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.2);
}

#winner{
    text-decoration: underline;
    color: #180a29;
}

#play-again{
    text-decoration: none;
    color: white;
    background-color: rgb(0, 189, 25);
}

#view-score{
    display: inline-block;
    color: white;
    background-color: #0164ce;
    cursor: pointer;
}

.note{
    font-style: italic;
    font-family: sans-serif;
    font-size: 15px;
    color: gray;
}

/* Animation */
@keyframes attack{
    0%{
        opacity: 0;
        transform: translateY(5%);
    }

    100%{
        opacity: 1;
        transform: translateX(0%);
    }
}

@keyframes pop{
    0%{
        opacity: 0;
        transform: scale(0.7);
    }

    100%{
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Web Design */

@media (max-width: 500px) {
    #game-field{
        flex-wrap: wrap;
        align-content:flex-start;
    }

    #game-result{
        margin: 5px;
    }

    .choices, .attack{
        height: 100px;
        width: 100px;
    }

    #scoreboard{
        width: 300px;
    }


    #scoreboard h1{        
        font-size: 2rem;
    }

    #game-result{        
        font-size: 1.5rem;        
    }

    #scoreboard ul{
        list-style: none;
        font-size: 1rem;
    }

    .rounds{
        width: 150px;        
        font-size: 0.9rem;
    }
}
/* 
@media (max-width: 400px) {
    .choices, .attack{
        height: 80px;
        width: 80px;
    }

} */