* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Segoe UI', system-ui, sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

#hint {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 0 16px;
  max-width: 90vw;
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.3s;
  pointer-events: none;
  z-index: 5;
}

#hint.hidden {
  opacity: 0;
  animation: none;
  transition: opacity 0.6s ease;
}

#replay {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  z-index: 10;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}

#replay:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

#replay:active {
  transform: scale(0.95);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
