* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
}

.container {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.name-input {
    margin-bottom: 20px;
}

.name-input input {
    padding: 10px;
    margin: 5px;
    font-size: 1rem;
    border: 2px solid #444;
    border-radius: 5px;
    width: calc(50% - 20px);
}

.start-button {
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    color: #fff;
    transition: background-color 0.3s ease;
}

.start-button:hover {
    background-color: #0056b3;
}

.game {
    display: none;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px auto;
    width: 330px;
    height: 330px;
}

.cell {
    width: 100%;
    height: 100%;
    background-color: #282828;
    border: 2px solid #444;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: #f0f0f0;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.cell:hover {
    background-color: #3a3a3a;
    transform: scale(1.05);
}

.cell.x {
    color: #FF5733;
}

.cell.o {
    color: #33C1FF;
}

.reset {
    padding: 10px 20px;
    font-size: 1.2rem;
    margin-top: 20px;
    cursor: pointer;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    color: #fff;
    transition: background-color 0.3s ease;
}

.reset:hover {
    background-color: #0056b3;
}

.change-names {
    padding: 10px 20px;
    font-size: 1.2rem;
    margin-top: 20px;
    margin-left: 10px;
    cursor: pointer;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    color: #fff;
    transition: background-color 0.3s ease;
}

.change-names:hover {
    background-color: #218838;
}

.status {
    margin-top: 10px;
    font-size: 1.5rem;
    height: 30px;
}

.stats {
    margin-top: 20px;
    font-size: 1rem;
    color: #dddddd;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #1e1e1e;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    text-align: center;
}

.modal-content button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
}

.modal-content #confirmChangeButton {
    background-color: #28a745;
}

.modal-content #cancelChangeButton {
    background-color: #dc3545;
}
