@import url('https://fonts.googleapis.com/css2?family=New+Tegomin&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: 'New Tegomin', serif;
    color: #7F55B1;
    font-weight: bold;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;   /* ✅ Prevent sideways scroll */
}

nav {
    height: 60px;
    background-color: #F49BAB;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 20px;
    justify-content: space-between;
    font-weight: bold;
    white-space: nowrap;
}

body {
    background-color: #FFE1E0;
}

.gameContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 38px;
    flex-wrap: nowrap;
}

.container {
    display: grid;
    grid-template-columns: repeat(3, 10vw);
    grid-template-rows: repeat(3, 10vw);
    position: relative;
}

.line {
    height: 3px;
    width: 0vw;
    position: absolute;
    background-color: #F49BAB;
    transition: width .3s ease-in-out;
}

.box {
    border: 2px solid #7F55B1;
    font-size: 8vw;
    display: flex;
    align-items: center;
    justify-content: center;   
}

.box:hover {
   background: #f6bac5;
   cursor: pointer;
}

.br-0 {
  border-right: 0;
}
.bl-0 {
    border-left: 0;
}
.bt-0 {
    border-top: 0;
}
.bb-0 {
    border-bottom: 0;
}

.gameInfo {
    margin: 0 60px;
    font-family: 'New Tegomin', serif;
    font-weight: 500;
}

h1 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #7F55B1;
    white-space: nowrap;
}

.info {
    font-size: 20px;
    line-height: 2;
} 

button {
    margin: 0 2vw;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 17px;
    border-style: none;
    background: #F49BAB;
    cursor: pointer;
} 

nav button {
    background: none;
    margin: 10px;
    white-space: nowrap;
}

.image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-right: 40px;
    margin-top: 10px;
}

.image img {
    width: 0;
    transition: width 1s ease-in-out;   /* ✅ fixed */
} 

@media screen and (max-width: 900px) {
    .gameContainer {
        margin-top: 10vh;
        width: 100%;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }

    .gameInfo {
        margin-top: 40px; 
        font-size: 1.4rem;   
        text-align: center;        
        width: 100%;               
        display: flex;             
        flex-direction: column;    
        align-items: center;       
    }

    .turnAndButton {
        display: flex;             
        flex-direction: column;    
        align-items: center;  
    }

    .container {
        display: grid;
        grid-template-columns: repeat(3, 20vw);
        grid-template-rows: repeat(3, 20vw);

    }
    .image img {
        max-width: 60%;  
    }
    .line {
        visibility: hidden;
    } 
}
