html,
body {
    height: 100%;
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #3282B8, #BBE1FA);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #222;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    padding-left: 0;
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

nav a.active,
nav a:hover {
    color: #aef1c5;
    text-decoration: underline;
}

.game-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    margin: 1rem auto;
    gap: 3rem;
    padding-bottom: 2rem;
}

.board-container {
    position: relative;
    width: 600px;
    height: 600px;
    display: grid;
    grid-template-columns: repeat(10, 60px);
    grid-template-rows: repeat(10, 60px);
    border: 3px solid #222;
    background: url("../assets/images/snake_ladder.png") center center/cover no-repeat;
}

.box {
    border: 0.5px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #333;
}

#p1,
#p2 {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    position: absolute;
    border: 3px solid black;
    transition: all 0.5s linear;
    z-index: 10;
}

#p1 {
    background-color: #e63946;
    z-index: 11;
}

#p2 {
    background-color: #f4a261;
}

#diceCont {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.6rem;
    gap: 0.5rem;
    width: 200px;
}

#diceImage {
    width: 70px;
}

#dice {
    font-size: 2.4rem;
    font-weight: bold;
}

#diceBtn {
    cursor: pointer;
    background-color: #207cca;
    border: none;
    padding: 0.6rem 1.6rem;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    transition: background-color 0.3s ease;
    width: 100%;
}

#diceBtn.red-turn {
    background: #e63946;
    color: #fff;
    transition: background 0.22s, color 0.22s;
}

#diceBtn.yellow-turn {
    background: #f4a261;
    color: #333;
    transition: background 0.22s, color 0.22s;
}

#diceBtn:hover {
    background-color: #125e8a;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background: #222;
    color: white;
    font-size: 0.9rem;
    margin-top: auto;
    width: 100%;
}

@media (max-width: 650px) {
    .game-main {
        flex-direction: column;
        max-width: 650px;
        align-items: center;
        gap: 1.5rem;
    }

    .board-container {
        width: 90vw;
        height: 90vw;
        grid-template-columns: repeat(10, 1fr);
        grid-template-rows: repeat(10, 1fr);
        margin-bottom: 1.5rem;
    }

    #p1,
    #p2 {
        width: 6vw;
        height: 6vw;
    }

    #diceCont {
        width: 100%;
        margin-top: 0;
    }
}