body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(#3a3a79, #b490ca);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* omar editting for troggle button */
/* start */

#mode-toggle {
    position: fixed;
    top: 20px;
    right: 60px;
    z-index: 9999;
    padding: 11px 15px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(#3a3a79, #b490ca);
    color: white;
    font-size: 18px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.4s ease, background-color 0.3s ease;
    width: 45px;
    height: 45px;

}

#mode-toggle .label {
    display: inline-block;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-width 0.4s ease, opacity 0.3s ease, margin-left 0.3s ease;
    vertical-align: middle;
}

#mode-toggle:hover {
    width: 150px;

}

#mode-toggle:hover .label {
    opacity: 1;
    max-width: 100px;
    margin-left: 5px;
    visibility: visible;
    color: #ffffff;
}

/* end */

.game {
    width: 320px;
    height: auto;
    padding: 35px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
    color: #ffffff;
    margin: 24px auto;
    font-weight: bold;
}

.name {
    margin: 8px 0 12px 0;
    padding: 8px 0;
    font-size: 38px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 1px 1px 10px #00000088;
}

span {
    color: #8ecfff;
}

.wins {
    padding: 8px 10px;
    margin: 10px 0 18px;
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.turns {

    color: #121212;
    font-size: 24px;
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 8px 0;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 18px;
    margin: 15px auto;
}

.squares {
    width: 80px;
    height: 80px;
    background: linear-gradient(#c8c8e6, #82c8f9);
    color: #1a1a1a;
    font-size: 50px;
    border-radius: 14px;
    margin: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #5ee7df99;
    font-weight: bold;
    user-select: none;

}

.squares:hover {
    background: linear-gradient(rgba(255, 255, 255, 0.829), #9c9c9c1f);
    color: #00fffb;
    border: 2px solid #8ecfff88;
    cursor: pointer;
    transform: scale(1.1);
    box-shadow: #ffffff 0 2px 8px;

}

/*Omar editting for resetScore button*/
/*start*/

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.button-group button {
    background: linear-gradient(90deg, #5ee7df, #b490ca);
    color: #121212;
    border-radius: 12px;
    border: none;
    font-size: 18px;
    padding: 10px 24px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(117, 113, 113, 0.6);
    transition: all 0.3s ease;
}

.button-group button:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #4faef1;
    box-shadow: #82c8f9 0 2px 8px;
    cursor: pointer;
}

.button-group button#reset-score {
    background: linear-gradient(90deg, #b490ca, #5ee7df);
    color: #000000;
}

.button-group button#reset-score:hover {
    background: rgba(255, 245, 235, 0.9);
    color: #ff5e62;
    box-shadow: #ff5e62 0 2px 8px;
}


/*end*/


button {
    background: linear-gradient(90deg, #5ee7df, #b490ca);
    color: #121212;
    border-radius: 12px;
    border: none;
    margin-top: 12px;
    font-size: 20px;
    padding: 10px 28px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(117, 113, 113, 0.795);

}

button:hover {
    background: rgba(255, 255, 255, 0.801);
    color: #4faef1;
    box-shadow: #82c8f9 0 2px 8px;
    cursor: pointer;

}