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

body {
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Asteroids Deluxe blue overlay effect */
.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(0, 100, 200, 0.05) 0%, transparent 70%);
}

#gameCanvas {
    display: block;
    background: #000;
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    filter: hue-rotate(180deg) saturate(1.5) brightness(1.1);
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.score-display, .lives-display, .level-display {
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    color: #00ffff;
}

.settings-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    pointer-events: all;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ffff;
    padding: 30px;
    border-radius: 10px;
    z-index: 1000;
    min-width: 300px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.settings-menu.hidden {
    display: none;
}

.settings-content h2 {
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    color: #00ffff;
}

.setting-group {
    margin-bottom: 15px;
}

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

.setting-group select,
.setting-group input[type="checkbox"] {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    color: #fff;
    border-radius: 5px;
}

.setting-group input[type="checkbox"] {
    width: auto;
    transform: scale(1.5);
    margin-left: 10px;
}

.close-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 24px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.game-over button {
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.game-over button:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.control-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-section h3 {
    margin-bottom: 15px;
    text-align: center;
    color: #0ff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.control-row label {
    flex: 1;
    font-weight: bold;
}

.control-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-left: 10px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.control-btn.listening {
    background: rgba(255, 0, 0, 0.3);
    border-color: #f00;
    animation: pulse 1s infinite;
}

@keyframes pulse {
0% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
50% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
}

/* Mobile Controls */
.mobile-controls {
position: fixed;
bottom: 20px;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding: 0 20px;
pointer-events: none;
z-index: 100;
}

.mobile-controls.hidden {
display: none;
}

.joystick-container {
pointer-events: all;
}

.joystick {
width: 120px;
height: 120px;
background: rgba(0, 255, 255, 0.1);
border: 2px solid #00ffff;
border-radius: 50%;
position: relative;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.joystick-knob {
width: 40px;
height: 40px;
background: radial-gradient(circle, #00ffff, #0088ff);
border-radius: 50%;
position: absolute;
transition: none;
box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
pointer-events: none;
}

.fire-container {
pointer-events: all;
}

.mobile-fire-btn {
width: 80px;
height: 80px;
background: radial-gradient(circle, rgba(255, 0, 100, 0.8), rgba(255, 0, 50, 0.6));
border: 2px solid #ff6600;
border-radius: 50%;
color: #fff;
font-weight: bold;
font-size: 14px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
transition: all 0.2s ease;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}

.mobile-fire-btn:active {
background: radial-gradient(circle, rgba(255, 0, 150, 0.9), rgba(255, 0, 100, 0.7));
transform: scale(0.95);
box-shadow: 0 0 30px rgba(255, 102, 0, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
.mobile-controls {
padding: 0 10px;
}
.joystick {
width: 100px;
height: 100px;
}
.joystick-knob {
width: 35px;
height: 35px;
}
.mobile-fire-btn {
width: 70px;
height: 70px;
font-size: 12px;
}
}

@media (max-width: 480px) {
.joystick {
width: 80px;
height: 80px;
}
.joystick-knob {
width: 30px;
height: 30px;
}
.mobile-fire-btn {
width: 60px;
height: 60px;
font-size: 11px;
}
}
