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

.screen {
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.hidden {
    display: none !important;
}

/* Login & Lobby */
input[type="text"] {
    padding: 10px;
    font-size: 1.2rem;
    border-radius: 5px;
    border: none;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background 0.3s;
}

button:hover {
    background-color: #2ecc71;
}

#session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.session-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.session-item b {
    color: #f1c40f;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.session-item button {
    background-color: #3498db;
    padding: 5px 15px;
    font-size: 1rem;
}

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

/* Game */
#game-container {
    position: relative;
    margin: 20px auto;
    border: 5px solid #2c3e50;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background-color: #1e272e;
    overflow: hidden;
}

canvas {
    display: block;
}

#game-info {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#score-blue {
    color: #3498db;
    font-weight: bold;
}

#score-red {
    color: #e74c3c;
    font-weight: bold;
}

#controls-hint {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
}

#controls-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.key-group {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
}

.key-group b {
    color: #f1c40f;
}

#config-btn {
    align-self: center;
    margin-top: 5px;
    padding: 5px 10px;
    font-size: 0.8rem;
    background-color: #7f8c8d;
    width: auto;
}

#config-btn:hover {
    background-color: #95a5a6;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #34495e;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    min-width: 300px;
}

.key-config label {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    align-items: center;
}

.key-config input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    border: none;
}