* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Barlow Condensed', sans-serif;
    background-color: #f5f5f5;
}

.wrapper {
    width: 100vw; /*100% of the viewport width*/
    height: 100vh; /*100% of the viewport height*/
    background: radial-gradient(
        134.34% 134.34% at 50% 0%,
        rgb(35, 200, 186) 0%,
        rgb(1, 27, 88) 100%
    );
    display: flex; 
    flex-direction: column; 
    align-items: center;
}

.scoreboard{
    width: 800px; 
    height: 180px;
    border: 2px solid #0c043f; 
    border-radius: 20px;
    margin-top: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.scoreboard_title{
    margin-left: 10px;
}

.scoreboard_title img{
    width: 120px;
    height: 120px;
    border-radius:100px;
    justify-content: center;
    margin-left: 20px;
}

.scoreboard_score{
    width: 150px; 
    height: 114px; 
    background-color: #0c043f;
    border-radius: 20px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    margin-right: 30px; 
}

.scoreboard_score h1{
    color: white; 
    font-size: 2.7rem;
}

.scoreboard_score p{
    color: white; 
    font-size: 16px;
    font-weight: 550;
    line-height: 18px;
    letter-spacing: 2.5px;
}

.hand_signs{
    background-image: url('images/bg-pentagon.svg');
    background-repeat: no-repeat;
    background-position: center;
    width: 500px; 
    height: 470px; 
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: -20px; 
  
}

.paper{
    margin-top: 95px;
    margin-left: -30px;
}

.scissors{
    margin-top: -10px;
    margin-left: -15px;
}

.rock{
    margin-top: 95px;
    margin-right: -30px;
}

.spock{
    margin-top: -30px;
    margin-left: -10px;
}

.lizard{
    margin-top: -30px;
    margin-left: 10px;
}

.hand_signs .hand{
    cursor: pointer;
    transition: transform 0.25s;
}

.hand_signs .hand:hover {
    transform: translate3d(0px, -8px, 0px);;
}


.contest{
    width: 950px;
    display: none;
}

.contest img {
    width: 300px;
    height: 300px;
    margin-top: 20px;
}

.contest > div{
    flex:1;
}

.contest h1 {
    color: white;
    font-size: 23px;
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.contest .handImageContainer{
    display: flex;
    justify-content: center;
}

.referee{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

.referee h1{
    color: white;
    font-size: 3rem;
}

.newGame {
    background-color: rgb(1, 27, 88);
    padding: 16px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    color: rgb(35, 200, 186);
}

.newGame:hover {
    background-color: rgb(35, 200, 186);
    color: rgb(1, 27, 88);
    transform: translate3d(0px, -5px, 0px);
}
/* ...existing code... */

@media (max-width: 768px) {
    .wrapper {
        width: 100%;
        height: auto;
        padding: 20px;
        overflow: hidden;
    }

    .scoreboard {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .scoreboard_title img {
        width: 100px;
        height: auto;
    }

    .scoreboard_score p {
        font-size: 1.2rem;
    }

    .scoreboard_score h1 {
        font-size: 2.5rem;
    }

    .contest {
        width: 100%;
        padding: 15px;
        text-align: center;
        justify-content: center;
        margin-left: 10px;
        margin-right: 10px;
        overflow: hidden;
    }

    .userhand {
        width: 25%;
        height: auto;
        margin-top: 15px;
    }

    .computerhand {
        width: 25%;
        height: auto;
    }

    .referee{
        width: 30%;
        height: auto;
        padding: 30px;
    }

    .userhand h1{
        font-size: 1.1rem;
    }
    .computerhand h1{
        font-size: 1.1rem;
    }
    .referee h1{
        font-size: 1.5rem;
    }

    .handImage{
        max-height:100%;
        width: 50px;
    }
    .rules-container {
        text-align: center;
        margin-top: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    #show-rules-btn {
        display: block;
        margin: 0 auto;
    }
}

.rules-container{
    text-align: center;
    margin-top: 10px;
    margin-left: 600px;
}

#show-rules-btn {
    background-color: rgb(1, 27, 88);
    border-color: rgb(1, 27, 88);
    padding: 9px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    color: rgb(35, 200, 186);
}

#show-rules-btn:hover {
    background-color: rgb(35, 200, 186);
    color: rgb(1, 27, 88);
    font-weight: bold   ;
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.822); /* Black w/ opacity */
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 80%;
    max-width: 600px;
}

.modal-content img {
    width: 100%;
    height: auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}


#rules-image {
    margin-top: 20px;
    max-width: 80%;
    height: auto;
    display: block;
}


