body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #333;
}

#app {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    width: 350px;
}

h1 {
    margin-top: 0;
    color: #2c3e50;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    margin: 5px;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 120px;
    text-align: center;
    text-transform: uppercase;
}

.join-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hidden {
    display: none !important;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    min-height: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #7f8c8d;
}

#status-message {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e67e22;
}

#board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    background-color: #34495e;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cell {
    background-color: white;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.cell:hover {
    background-color: #ecf0f1;
}

.cell.x {
    color: #e74c3c;
}

.cell.o {
    color: #3498db;
}

#btn-leave {
    background-color: #e74c3c;
}

#btn-leave:hover {
    background-color: #c0392b;
}