* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: #0b0c10;
  color: #e0e0e0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-container {
  width: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at center, #1b2028 0%, #0b0c10 100%);
}

#version-badge {
  position: fixed;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 90;
  padding: 3px 6px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 4px;
  background: rgba(11, 12, 16, 0.78);
  color: #d4af37;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

canvas {
  display: block;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 10px rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  max-width: 100%;
  max-height: 100%;
  image-rendering: auto;
  touch-action: none;
}

/* UI Overlay & Modals */
.overlay-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  background: linear-gradient(135deg, #1f242d 0%, #161a22 100%);
  border: 2px solid #e53e3e;
  border-radius: 12px;
  padding: 24px 32px;
  max-width: 90%;
  width: 460px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(229, 62, 62, 0.4);
  text-align: center;
}

.overlay-title {
  font-size: 1.8rem;
  color: #f7fafc;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(229, 62, 62, 0.7);
}

.overlay-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #cbd5e0;
  margin-bottom: 24px;
}

.btn-ninja {
  background: linear-gradient(180deg, #e53e3e 0%, #9b2c2c 100%);
  color: #fff;
  border: 1px solid #feb2b2;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-ninja:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(229, 62, 62, 0.6);
}

.btn-ninja:active {
  transform: translateY(1px);
}
