* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1a1a2e;
    color: #eee;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    overflow: hidden;
    height: 100vh;
}

/* Menu */
#menu-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

#menu-screen h1 {
    font-size: 4rem;
    color: #e94560;
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    margin-bottom: 40px;
    letter-spacing: 8px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.menu-buttons button {
    padding: 15px 60px;
    font-size: 1.3rem;
    border: 2px solid #e94560;
    background: transparent;
    color: #eee;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.menu-buttons button:hover {
    background: #e94560;
    transform: scale(1.05);
}

.controls-info {
    text-align: center;
}

.controls-info h3 {
    margin-bottom: 15px;
    color: #e94560;
    font-size: 1.2rem;
}

.controls-grid {
    display: flex;
    gap: 40px;
}

.control-box {
    background: rgba(255,255,255,0.05);
    padding: 15px 25px;
    border-radius: 8px;
}

.control-box h4 {
    margin-bottom: 8px;
    color: #ccc;
}

.control-box p {
    font-size: 0.9rem;
    color: #aaa;
    margin: 4px 0;
}

kbd {
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #555;
    font-size: 0.85rem;
}

/* Name Input Modal */
#name-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#name-modal .modal-content {
    background: #16213e;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #e94560;
    text-align: center;
}

#name-modal h2 {
    margin-bottom: 20px;
    color: #e94560;
}

#name-modal input {
    display: block;
    width: 250px;
    padding: 10px 15px;
    margin: 10px auto;
    background: #1a1a2e;
    border: 1px solid #444;
    color: #eee;
    font-size: 1rem;
    border-radius: 6px;
    text-align: center;
}

#name-modal input:focus {
    outline: none;
    border-color: #e94560;
}

#name-modal button {
    margin-top: 15px;
    padding: 10px 40px;
    font-size: 1.1rem;
    border: 2px solid #e94560;
    background: #e94560;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

#name-modal button:hover {
    background: #c73550;
}

/* Game Screen */
#game-screen {
    height: 100vh;
    background: #1a1a2e;
    position: relative;
}

#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.player-hud {
    flex: 1;
}

.player-name {
    font-size: 1rem;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.p1-name { color: #4fc3f7; }
.p2-name { color: #ef5350; text-align: right; }

.health-bar {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #555;
}

.health-fill {
    height: 100%;
    transition: width 0.3s;
    width: 100%;
}

.p1-health { background: linear-gradient(90deg, #4fc3f7, #29b6f6); }
.p2-health { background: linear-gradient(90deg, #ef5350, #e53935); float: right; }

#timer {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd54f;
    min-width: 80px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 213, 79, 0.5);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Game Over Message */
#game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px 60px;
    border-radius: 12px;
    border: 2px solid #e94560;
    text-align: center;
    z-index: 20;
}

#game-message h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffd54f;
}

#game-message button {
    margin: 10px;
    padding: 12px 30px;
    font-size: 1.1rem;
    border: 2px solid #e94560;
    background: transparent;
    color: #eee;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
}

#game-message button:hover {
    background: #e94560;
}

/* Online Modal */
#online-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#online-modal .modal-content {
    background: #16213e;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #e94560;
    text-align: center;
    min-width: 320px;
}

#online-modal h2 {
    margin-bottom: 20px;
    color: #e94560;
}

#online-modal button {
    margin-top: 10px;
    padding: 10px 30px;
    font-size: 1rem;
    border: 2px solid #e94560;
    background: #e94560;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

#online-modal button:hover {
    background: #c73550;
}

#online-modal input {
    display: block;
    width: 250px;
    padding: 10px 15px;
    margin: 10px auto;
    background: #1a1a2e;
    border: 1px solid #444;
    color: #eee;
    font-size: 1.1rem;
    border-radius: 6px;
    text-align: center;
    letter-spacing: 3px;
}

#online-modal input:focus {
    outline: none;
    border-color: #e94560;
}
