
#win-line {
    position: absolute;
    width: 0px;
    height: 11px;
    background-color: rgba(0, 0, 0, 0.884);
    transform-origin: 0 0; /* Ensures proper rotation */
    transform: scaleX(0);
    transition: all 1s ease-in-out;
    z-index: 2; /* Ensures it appears above the board */
    border-radius: 20px;
    box-shadow: 0 0 40px 8px rgba(45, 2, 92, 0.993); 
}


body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.container {
    text-align: center;
}

h1 {
    color: #333;
}

.board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 5px;
    margin: 20px auto;
}

.cell {
    background-color: #da97ee91;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 2.5rem;
}

.cell:hover {
    background-color: #d577f1e5;
}

.cell.taken {
    pointer-events: none;
    color: #ce60f0d5;
}

.info {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5em;
}

.status {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
    transition: all 0.3s ease-in-out;
}

/* When a player wins */
.status.win {
    font-size: 2rem;
    color: #fff;
    background-color: #28a745; /* Green for a win */
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    animation: winMessage 2s ease-out;
}

/* Animation for the win message */
@keyframes winMessage {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* When a tie occurs */
.status.tie {
    font-size: 2rem;
    color: #fff;
    background-color: #dc3545; /* Red for tie */
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    animation: tieMessage 2s ease-out;
}

/* Animation for the tie message */
@keyframes tieMessage {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* From Uiverse.io by adamgiebl */
#restart{
    display: flex;
    align-items: cente;
    align-content: center;
    align-self: center;
}

.cssbuttons-io-button {
    background: #a370f0;
    color: white;
    font-family: inherit;
    padding: 0.35em;
    padding-left: 1.2em;
    font-size: 17px;
    font-weight: 500;
    border-radius: 0.9em;
    border: none;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-shadow: inset 0 0 1.6em -0.6em #714da6;
    overflow: hidden;
    position: relative;
    height: 2.8em;
    padding-right: 3.3em;
    cursor: pointer;
}

.cssbuttons-io-button .icon {
    background: white;
    margin-left: 1em;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 2.2em;
    width: 2.2em;
    border-radius: 0.7em;
    box-shadow: 0.1em 0.1em 0.6em 0.2em #7b52b9;
    right: 0.3em;
    transition: all 0.3s;
}

.cssbuttons-io-button:hover .icon {
    width: calc(100% - 0.6em);
}

.cssbuttons-io-button .icon svg {
    width: 1.1em;
    transition: transform 0.3s;
    color: #7b52b9;
}

.cssbuttons-io-button:hover .icon svg {
    transform: translateX(0.1em);
}

.cssbuttons-io-button:active .icon {
    transform: scale(0.95);
}
