/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #2c2c2c;
    color: #fff;
}

.container {
    text-align: center;
}

h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    margin: 20px auto;
    width: 90vw;
    max-width: 400px;
    position: relative;
}

.cell {
    width: 100%;
    height: 100px;
    background-color: #fff;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #333;
}

.cell:hover {
    background-color: #f0f0f0;
}

.cell.taken {
    cursor: not-allowed;
}

button {
    padding: 15px 30px;
    font-size: 18px;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background-color: #0056b3;
}

#message {
    font-size: 18px;
    color: #fff;
    margin-top: 10px;
}

/* Winner line */
.winner-line {
    position: absolute;
    background-color: #ff4747;
    height: 10px;
    width: 100%;
    border-radius: 5px;
    z-index: 1;
    transform-origin: center;
}

.vertical {
    width: 10px;
    height: 100%;
}

.horizontal {
    height: 10px;
}

.diagonal-left {
    height: 10px;
    width: 100%;
    transform: rotate(45deg);
}

.diagonal-right {
    height: 10px;
    width: 100%;
    transform: rotate(-45deg);
}

/* Popup styles */
.winner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    display: none; 
}

.popup-content {
    background-color: #fff;
    padding: 20px 40px;
    text-align: center;
    border-radius: 10px;
    color: #333;
}

.popup-content h2 {
    margin-bottom: 10px;
}

.popup-content button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup-content button:hover {
    background-color: #0056b3;
}
