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

:root {
    --navbar-height: 56px;
}

body {
    background: #1a1a2e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

.navbar {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%) !important;
    border-bottom: 2px solid #00ff88;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

.navbar-brand {
    font-size: 28px;
    font-weight: bold;
    color: #00ff88 !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    letter-spacing: 3px;
    cursor: pointer;
}

.score-display {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    display: flex;
    gap: 20px;
}

.score-display small {
    font-weight: normal;
    opacity: 0.9;
}

.score-p1 {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    margin-right: 8px;
}

.score-p2 {
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    margin-right: 8px;
}

#gameContainer {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--navbar-height));
}

#gameCanvas {
    display: block;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px 60px;
    border-radius: 15px;
    text-align: center;
    display: none;
    border: 2px solid #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.4);
    z-index: 100;
}

#gameOver h2 {
    color: #ff4757;
    font-size: 36px;
    margin-bottom: 15px;
}

#gameOver .winner {
    color: #00ff88;
}

#gameOver p {
    color: #eee;
    font-size: 24px;
    margin-bottom: 25px;
}

.game-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    color: #1a1a2e;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    color: #1a1a2e;
}

.game-btn.secondary {
    background: linear-gradient(135deg, #3d5afe, #1e88e5);
    color: #ffffff;
}

.game-btn.secondary:hover {
    box-shadow: 0 0 20px rgba(61, 90, 254, 0.5);
    color: #ffffff;
}

/* Modal styles */
.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00ff88;
    border-radius: 15px;
}

.modal-header {
    border-bottom: 1px solid #00ff88;
}

.modal-title {
    color: #00ff88;
    font-weight: bold;
    letter-spacing: 2px;
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    color: #eee;
}

.leaderboard-scroll {
    max-height: 60vh;
    overflow-y: auto;
}

.leaderboard-table th,
.leaderboard-table td {
    font-size: 14px;
    white-space: nowrap;
}

.form-label {
    color: #00ff88;
    font-weight: bold;
}

.form-check-input:checked {
    background-color: #00ff88;
    border-color: #00ff88;
}

.form-check-label {
    color: #eee;
}

.btn-group .btn {
    background: #252545;
    border: 2px solid #00ff88;
    color: #eee;
    padding: 15px 30px;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-group .btn:hover {
    background: #00ff88;
    color: #1a1a2e;
}

.btn-group .btn.active {
    background: #00ff88;
    color: #1a1a2e;
    font-weight: bold;
}

.controls-info {
    background: #252545;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.controls-info h6 {
    color: #00ff88;
    margin-bottom: 10px;
}

.controls-info p {
    margin-bottom: 5px;
    font-size: 14px;
}

.p1-color { color: #00ff88; }
.p2-color { color: #ff6b6b; }

.keycaps { display: flex; gap: 16px; flex-wrap: wrap; }
.keygroup { display: inline-flex; flex-direction: column; gap: 6px; }
.keyrow { display: flex; gap: 6px; justify-content: center; }
.keycap {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #f1f1f1;
    letter-spacing: 0.5px;
}
.keycap.wide { min-width: 80px; }
.keylabel { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: #f5f5f5; }
.pause-label { color: #ffffff; }
