body {
    font-family: Arial, sans-serif;
    background: #222;
    color: #fff;
    margin: 0;
    padding: 0;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    margin: 1rem 0;
    font-size: 2.5rem;
}

/* Game Container */
.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    max-width: 100vw;
    max-height: 100vh;
}

/* Phaser Game Container */
#phaser-game {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 70vh;
}

#phaser-game canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid #fff;
}

/* Chat Section */
#chat {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#chat input {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    border: 1px solid #666;
    border-radius: 4px;
    background: #333;
    color: #fff;
    font-size: 1rem;
}

#chat button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#chat button:hover {
    background: #45a049;
}

#messages {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    max-height: 100px;
    overflow-y: auto;
    width: 100%;
    max-width: 400px;
}

#messages li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #444;
}

/* Connection Status */
.connection-status {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid #666;
    backdrop-filter: blur(5px);
    font-size: 12px;
    font-weight: bold;
}

.connection-status.online {
    border-color: #4CAF50;
}

.connection-status.offline {
    border-color: #F44336;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F44336;
    animation: pulse 2s infinite;
}

.connection-status.online .status-indicator {
    background: #4CAF50;
    animation: none;
}

.status-text {
    color: #fff;
}

/* Map Timer */
.map-timer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    font-family: 'Courier New', monospace;
    z-index: 1000;
    min-width: 150px;
}

.timer-label {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
}

.timer-value {
    font-size: 16px;
    font-weight: bold;
    color: #4CAF50;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Gun Display Styles */
.gun-display {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #666;
    backdrop-filter: blur(5px);
    font-size: 14px;
    font-weight: bold;
}

.gun-icon {
    font-size: 20px;
    color: #fff;
}

.gun-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ammo-text {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.gun-status {
    color: #4CAF50;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* HP Display Styles */
.hp-display {
    position: fixed;
    top: 20px;
    right: 90px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #666;
    backdrop-filter: blur(5px);
}

.hp-label {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
}

.hp-bar-container {
    width: 100px;
    height: 20px;
    background: #333;
    border: 2px solid #666;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.hp-bar {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 8px;
}

.hp-text {
    font-weight: bold;
    color: #fff;
    font-size: 12px;
    min-width: 50px;
    text-align: center;
}

/* Options Menu Styles */
.options-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.options-button {
    background: #444;
    color: #fff;
    border: 2px solid #666;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.options-button:hover {
    background: #666;
    border-color: #888;
}

.options-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: #333;
    border: 2px solid #666;
    border-radius: 8px;
    padding: 15px;
    min-width: 200px;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.options-dropdown.show {
    display: block;
}

.option-item {
    margin-bottom: 10px;
}

.option-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.option-item input {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #666;
    border-radius: 4px;
    background: #222;
    color: #fff;
}

.option-item button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.option-item button:hover {
    background: #45a049;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin: 0.5rem 0;
    }
    
    .game-container {
        padding: 0.5rem;
    }
    
    .canvas-container {
        margin: 0.5rem 0;
    }
    
    #chat {
        margin-top: 0.5rem;
    }
    
    #chat input,
    #chat button {
        font-size: 0.9rem;
    }
    
    .options-menu {
        top: 10px;
        right: 10px;
    }
    
    .options-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .options-dropdown {
        top: 50px;
        min-width: 180px;
        padding: 10px;
    }
    
    .hp-display {
        top: 10px;
        right: 60px;
        padding: 8px 12px;
    }
    
    .hp-bar-container {
        width: 80px;
        height: 16px;
    }
    
    .hp-label {
        font-size: 12px;
    }
    
    .hp-text {
        font-size: 10px;
        min-width: 40px;
    }
    
    .connection-status {
        top: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .gun-display {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .gun-icon {
        font-size: 16px;
    }
    
    .ammo-text {
        font-size: 10px;
    }
    
    .gun-status {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .game-container {
        padding: 0.25rem;
    }
    
    #chat input,
    #chat button {
        font-size: 0.8rem;
    }
    
    .hp-display {
        top: 5px;
        right: 50px;
        padding: 6px 10px;
        gap: 6px;
    }
    
    .hp-bar-container {
        width: 60px;
        height: 14px;
    }
    
    .hp-label {
        font-size: 10px;
    }
    
    .hp-text {
        font-size: 9px;
        min-width: 35px;
    }
    
    .connection-status {
        top: 5px;
        left: 5px;
        padding: 4px 8px;
        font-size: 9px;
    }
    
    .gun-display {
        bottom: 5px;
        right: 5px;
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .gun-icon {
        font-size: 14px;
    }
    
    .ammo-text {
        font-size: 8px;
    }
    
    .gun-status {
        font-size: 7px;
    }
} 

.key-map-panel {
    position: fixed;
    top: 80px;
    right: 30px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 0;
    color: #fff;
    z-index: 1000;
    min-width: 180px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    font-size: 1rem;
    text-align: left;
    transition: all 0.3s ease;
}

.key-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    border-bottom: 1px solid #444;
}

.key-map-toggle {
    background: none;
    border: none;
    color: #ffd700;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.key-map-toggle:hover {
    color: #fff;
}

.key-map-content {
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.key-map-panel.minimized .key-map-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.key-map-panel.minimized {
    min-width: 120px;
}
.key-map-panel h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #ffd700;
    letter-spacing: 1px;
}
.key-map-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.key-map-panel li {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}
.key-map-panel b {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.05em;
}
@media (max-width: 900px) {
    .key-map-panel {
        position: static;
        margin: 1rem auto;
        display: block;
        width: 90%;
        min-width: unset;
        box-shadow: none;
    }
}

/* Vehicle Dashboard */
.vehicle-dashboard {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;
    color: white;
    font-family: 'Courier New', monospace;
    z-index: 1000;
    min-width: 200px;
}

.vehicle-dashboard.hidden {
    display: none;
}

.dashboard-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.dashboard-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speed-display {
    text-align: center;
    flex: 1;
}

.speed-label {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}

.speed-value {
    font-size: 20px;
    font-weight: bold;
    color: #00FF00;
}

.speed-unit {
    font-size: 8px;
    color: #666;
}

.rpm-display {
    text-align: center;
    flex: 1;
    margin: 0 10px;
}

.rpm-label {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}

.rpm-bar-container {
    width: 60px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin: 2px auto;
    overflow: hidden;
}

.rpm-bar {
    height: 100%;
    background: linear-gradient(90deg, #00FF00, #FFFF00, #FF0000);
    width: 0%;
    transition: width 0.1s ease;
}

.rpm-value {
    font-size: 12px;
    color: #FFD700;
}

.gear-display {
    text-align: center;
    flex: 1;
}

.gear-label {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}

.gear-value {
    font-size: 18px;
    font-weight: bold;
    color: #00FFFF;
} 

.vehicle-color-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.3rem;
}
.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    outline: none;
    cursor: pointer;
    transition: border 0.2s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.color-btn:hover, .color-btn:focus {
    border: 2px solid #FFD700;
    transform: scale(1.1);
} 

.pre-game-menu {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 20, 30, 0.97);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pre-game-card {
    background: #23243a;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    min-width: 340px;
    max-width: 95vw;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.pre-game-card h2 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 2rem;
    text-align: center;
    color: #FFD700;
}
.pre-game-field {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.pre-game-field label {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #FFD700;
}
.pre-game-field input[type="text"],
.pre-game-field select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #444;
    background: #18192b;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.pre-game-field .vehicle-color-options {
    margin-top: 0.2rem;
}
.pre-game-field .color-btn.selected {
    border: 3px solid #FFD700;
    box-shadow: 0 0 8px #FFD70099;
}
.start-game-btn {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(90deg, #FFD700, #FF5733);
    color: #222;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s, color 0.2s;
}
.start-game-btn:hover {
    background: linear-gradient(90deg, #FF5733, #FFD700);
    color: #fff;
}
.settings-btn {
    background: #444;
    color: #FFD700;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}
.settings-btn:hover {
    background: #FFD700;
    color: #222;
}
@media (max-width: 600px) {
    .pre-game-card {
        min-width: 90vw;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }
} 