JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Starstrike: Void Combat</title>
<style>
body { margin: 0; overflow: hidden; background: #000; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: white; user-select: none; }
canvas { display: block; }
/* UI Overlays */
#ui-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.screen { position: absolute; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); pointer-events: auto; }
.hidden { display: none !important; }
/* Start Screen Styles */
h1 { font-size: 3rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 10px; color: #00d4ff; text-shadow: 0 0 20px #00d4ff; }
.ship-selector { display: flex; gap: 20px; }
.ship-card {
background: #111; border: 2px solid #444; padding: 20px; width: 200px; cursor: pointer;
transition: all 0.3s; display: flex; flex-direction: column; align-items: center;
}
.ship-card:hover { border-color: #00d4ff; transform: translateY(-10px); background: #222; }
.ship-card h3 { margin: 10px 0; color: #00d4ff; }
.stat-bar-container { width: 100%; height: 10px; background: #333; margin: 5px 0; border-radius: 5px; overflow: hidden; }
.stat-bar { height: 100%; background: #00d4ff; transition: width 0.5s; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; margin-top: 5px; }
/* HUD Styles */
#hud { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; padding: 20px; box-sizing: border-box; }
.hud-bottom { position: absolute; bottom: 30px; width: 100%; display: flex; justify-content:...