/* General Styles */
body {
    background: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background: #1e1e1e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
}

h1 {
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 3em;
    font-weight: bold;
}

h2 {
    margin-bottom: 20px;
    color: #e0e0e0;
}

/* Buttons */
button {
    padding: 12px 25px;
    font-size: 16px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin: 10px 5px;
    width: auto;
}

button:hover {
    background: #555;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.start-game-btn {
    background: #2e7d32;
    color: white;
}

.start-game-btn:hover {
    background: #388e3c;
}

/* Inputs */
input[type="text"] {
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #e0e0e0;
    width: calc(100% - 24px);
    font-size: 16px;
    box-sizing: border-box;
}

input[type="text"]::placeholder {
    color: #888;
}

/* Game Board */
.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    margin: 30px auto;
    width: 300px;
    height: 300px;
}

.cell {
    background: #333;
    border: 2px solid #444;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cell:hover {
    background: #4a4a4a;
    transform: scale(1.05);
}

.cell.win {
    background: #2e7d32 !important;
    color: white !important;
}

.cell.lose {
    background: #c62828 !important;
    color: white !important;
}

/* Status and Info */
#status {
    font-size: 20px;
    margin-bottom: 20px;
}

#playerInfo, #opponentInfo {
    margin: 10px 0;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 8px;
}

/* Sections */
.mode-selection, .player-setup, .game-container {
    display: none; /* Initially hidden */
}

#modeSelection {
    display: block;
}

.player-setup div {
    margin-top: 15px;
}

/* Popup/Modal for Winner */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: #2c2c2c;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    color: #fff;
}

#winnerText {
    font-size: 2em;
    margin-bottom: 20px;
}