body { margin: 0; padding: 0; overflow: hidden; background-color: #87CEEB; font-family: sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
#canvas-container { width: 100vw; height: 100vh; display: none; }

#start-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background-color: #222; color: white; z-index: 20; padding: 20px; box-sizing: border-box; text-align: center; touch-action: auto; -webkit-user-select: auto; user-select: auto; }
#start-screen h1 { font-size: 24px; margin-bottom: 10px; color: #ffeb3b; }
#start-screen p { font-size: 15px; margin-bottom: 30px; color: #ccc; }

.file-select-area { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; width: 100%; max-width: 300px; }
.file-btn { background-color: #4CAF50; color: white; padding: 15px; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; text-align: center; border: 2px solid transparent; transition: 0.2s; touch-action: manipulation; -webkit-tap-highlight-color: rgba(255,255,255,0.2); }
.file-btn.selected { background-color: #2e7d32; border-color: #ffeb3b; }
input[type="file"] { display: none; }

#btn-start { background-color: #ff4757; color: white; padding: 15px 40px; border-radius: 30px; font-size: 20px; font-weight: bold; cursor: pointer; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.5); display: none; touch-action: manipulation; }
#btn-start:active { transform: scale(0.95); }

#loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 20px; color: white; background: rgba(0,0,0,0.8); padding: 20px 40px; border-radius: 15px; display: none; z-index: 30; }

#damage-ui { position: absolute; top: 20px; left: 0; width: 100%; display: none; justify-content: space-between; padding: 0 30px; box-sizing: border-box; pointer-events: none; z-index: 10; }
.damage-box { background: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 10px; color: white; text-align: center; min-width: 80px; }
.damage-name { font-size: 12px; color: #aaa; margin-bottom: 5px; }
.damage-percent { font-size: 28px; font-weight: bold; font-family: Impact, sans-serif; }
#p1-percent { color: #fff; }
#cpu-percent { color: #fff; }

#game-ui { position: absolute; bottom: 10px; left: 0; width: 100%; height: 150px; display: none; pointer-events: none; z-index: 10; }
.dpad { position: absolute; left: 20px; bottom: 20px; pointer-events: auto; display: flex; gap: 10px; }
.action-buttons { position: absolute; right: 20px; bottom: 20px; pointer-events: auto; display: flex; align-items: flex-end; gap: 15px; }

.btn { width: 70px; height: 70px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); border: 2px solid rgba(255, 255, 255, 0.6); color: white; font-weight: bold; font-size: 18px; display: flex; justify-content: center; align-items: center; touch-action: none; outline: none; }
.btn:active { background: rgba(255, 255, 255, 0.6); transform: scale(0.95); }
#btn-attack { background: rgba(255, 71, 87, 0.5); border-color: rgba(255, 71, 87, 0.8); width: 80px; height: 80px; font-size: 22px; }
#btn-attack:active { background: rgba(255, 71, 87, 0.9); }
#btn-jump { background: rgba(76, 175, 80, 0.5); border-color: rgba(76, 175, 80, 0.8); margin-bottom: 30px; }
#btn-jump:active { background: rgba(76, 175, 80, 0.9); }
