* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* to include border and padding in the height and width calculation */
}

body {
    background-color: #518586;
    text-align: center;
    height: 100vh;
}

/* Newly added */
.game-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease-in;
}

.container {
    height: 65vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.game-board {
    position: relative;
    height: 60vmin;
    width: 60vmin;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5vmin;
}

.win-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background-color: #414141;
    border-radius: 1rem;
    transition: width 1s ease-in-out;
    transform-origin: left center;
    /* <--  IMPORTANT */
}

.box {
    height: 18vmin;
    width: 18vmin;
    border-radius: 1rem;
    border: none;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.4);
    font-size: 8vmin;
    background-color: #e7e7cd;
    transition: transform 0.2s ease, background 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* newly added */
.box:hover:not(:disabled) {
    background-color: #e3ba90;
    transform: scale(1.05);
    cursor: pointer;
}


#reset {
    padding: 1rem;
    font-size: 1.25rem;
    background-color: #414141;
    color: #ffffff;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
}

#new-btn {
    padding: 1rem;
    font-size: 1.25rem;
    background-color: #414141;
    color: #ffffff;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
}

#msg {
    color: #e07337;
    font-size: 8vmin;

}

/* Result popup  newly added */
.msg-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* newly added */
.msg-card {
    background-color: #ffff;
    padding: 2rem 3rem;
    border-radius: 20px;
    text-align: center;
    animation: scaleIn 0.5s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.hide {
    display: none;
}

.imgbox img {
    width: 0;
    margin-top: 0;
    transition: width 1s ease-in-out;

}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}

@keyframes scaleIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
