* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  background: #0a0f1a;
  color: #d1fae5;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1rem 3rem;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: #86efac;
}

canvas {
  border: 1px solid #1f2937;
  background: #0b1220;
  box-shadow: 0 0 0 1px #22c55e inset;
  max-width: 100%;
  height: auto;
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  color: #93c5fd;
  text-align: center;
}

.mobile-controls {
  position: fixed;
  inset: 0;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.mobile-controls.active {
  opacity: 0.45;
  pointer-events: auto;
}

.mobile-controls.prestart {
  opacity: 0.9;
}

.mobile-controls.started {
  opacity: 0;
}

.mobile-zone {
  position: absolute;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(2, 6, 23, 0.9);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-left {
  left: 0;
  top: 0;
  width: 50%;
  height: 70%;
}

.mobile-right {
  right: 0;
  top: 0;
  width: 50%;
  height: 70%;
}

.mobile-jump {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 30%;
  background: rgba(8, 47, 73, 0.95);
}

.mobile-start-hint {
  position: absolute;
  top: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #a7f3d0;
  font-size: 0.85rem;
  letter-spacing: 0.07em;
}

.mobile-controls:not(.prestart) .mobile-start-hint {
  display: none;
}

.gameover-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: min(420px, 100%);
  padding: 0.9rem;
  border: 1px solid #22c55e;
  background: rgba(2, 6, 23, 0.93);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25) inset;
}

.gameover-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #bbf7d0;
}

.gameover-score,
.gameover-copy-label,
.copy-status {
  margin: 0.35rem 0;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.share-link-text {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.5rem;
  border: 1px solid #334155;
  background: #020617;
  color: #e2e8f0;
  font-family: inherit;
  resize: vertical;
}

.copy-share-btn {
  padding: 0.45rem 0.7rem;
  border: 1px solid #22c55e;
  background: #052e16;
  color: #bbf7d0;
  font-family: inherit;
  cursor: pointer;
}

.copy-share-btn:hover {
  background: #14532d;
}

.gameover-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.restart-btn {
  border-color: #67e8f9;
  background: #082f49;
  color: #cffafe;
}

.credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
}

.credit a {
  color: #67e8f9;
}
