@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

header {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
    height: 100px;
    padding: 5%;
    position: absolute;
    width: 100%;
    z-index: 100;
}

header img {
    width: 100px;
    margin-top: 20px;
    margin-left: -20px;
}

html, body {
    height: 100%;
}

.home {
    display: flex;
    height: 100vh;
    background: linear-gradient(to top, #D2E2FB 30%, #86A8DB);
    position: relative;
    overflow: hidden;
}

.home img {
    position: absolute;
    bottom: 0;
    width: 100%;
    pointer-events: none;
}

.home .title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 50px;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    font-family: "Poppins", sans-serif;
}

.about {
    padding: 50px;
    background: #3B3291;
    color: white;
    position: relative;
    z-index: 100;
}

.game-container-wrapper {
    background-color: #3B3291;
    width: 100%;
    height: calc(100vh - 100px);
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center; 
}

#gameContainer {
    width: 100%;
    max-width: 800px;
    height: 640px; 
    background-color: #3B3291;
    display: flex;
    justify-content: center; 
    align-items: center; 
    margin-top: 250px;
}

.page-footer {
    height: 200px;
    background-color: #3B3291;
}

.title1 {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}
.title1:hover {
    transform: scale(1.1);
}

.choose-container {
    text-align: center;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #3B3291;
}
.choose-container h1 {
    margin-bottom: 20px;
    color: #ffffff;
    background: #3B3291;
    font-family: 'Poppins', sans-serif;
}
.choose-container h3 {
    margin-bottom: 20px;
    color: #f5f5f5;
    background: #3B3291;
    font-family: 'Poppins', sans-serif;
} 
.canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    background: #3B3291;
}  

#canvasContainer1 {
    display: flex;
    flex-direction: column;
}

#canvasContainer2 {
    display: none;
}

canvas {
    border: 2px solid #555;
    border-radius: 10px;
    margin-bottom: 20px;
    background: #f3f3f3;
}
.button-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
}
.button-wrapper-2 {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
    position:relative;
    left:-27px;
}
button {
    background-color: #fff;
    color: #3B3291;
    border: none;
    padding: 10px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #418cdc;
}

.tick {

    height:50px;
    position: relative;

}

#player1-Text, #player2-Text {
    color: #f2f2f2;
    margin-bottom: 10px;
}

::-webkit-scrollbar {
    width: 0px;
}

@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }
    header img {
        width: 80px;
        margin-top: 10px;
        margin-left: 0;
    }
    .home .title {
        font-size: 36px;
    }
    .game-container-wrapper {
        height: auto;
    }
    #gameContainer {
        max-width: 100%;
        height: auto;
        margin-top: 50px;
    }
}

@media screen and (max-width: 850px) {
    .home .title {
        font-size: 28px;
    }
    .choose-container {
        padding: 10px;
    }
    .canvas-container {
        margin: 10px 0;
    }
    canvas {
        width: 90%;
        border-width: 1px;
        margin-bottom: 10px;
    }
    .button-wrapper {
        display: flex;
        gap: 10px;
    }
    .button-wrapper-2 {
        display: flex;
        gap: 10px;
        left: -40px;

    }

    .home .title {
        font-size: 40px;
    }

    .button-wrapper button {
        width: 50px;
        padding: 10px;
        font-size: 0.5rem;
        text-align: center;
    }
    .button-wrapper-2 button {
        width: 50px;
        padding: 10px;
        font-size: 0.5rem;
        text-align: center;
    }

    .about {
        padding: 20px;
    }
}

#touch-controls-wrapper {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #3B3291;
    width: 100%;
}

#touch-controls-player1, #touch-controls-player2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.touch-button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #fff;
}

.touch-button:active {
    background: #3B3291;
}

@media screen and (min-width: 768px) {
    #touch-controls-wrapper {
        display: none;
    }
}

@media screen and (min-width: 768px) {
    .canvas-container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }
    .canvas-container canvas {
        margin-bottom: 0;
    }
}
