@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  color: #000000;
}

body {
  font-family: 'Helvetica', Arial, sans-serif;
}

/* full background seismograph */
#scoreCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #ffffff;
}

/* foreground container for your line/controls */
#app {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
}

/* stage covers viewport for physics */
#stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* 4 equal clickable background areas */
#zones {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 1;
}

/* transparent zones, just an activation hint on hover */
.zone {
  flex: 1;
  position: relative;
  cursor: pointer;
  background: transparent;
}

/* thin top strip for activation feedback */
.zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: background-color 0.12s ease-out;
  pointer-events: none;
}

.zone:hover {
  background: transparent;
}

.zone:hover::before {
  background: #000000;
}

/* Download button in PEO-like style */
#downloadTraceBtn {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 3;
  padding: 14px 60px;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: #ffffff;
  color: #000000;
  border: 3px solid #000;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

#downloadTraceBtn:hover {
  transform: translateX(-50%) translateY(3px);
  box-shadow: 2px 2px 0 #000;
}

#downloadTraceBtn:active {
  transform: translateX(-50%) translateY(5px);
  box-shadow: 0 0 0 #000;
}

/* bigger GIF spheres */
.sphere {
  position: absolute;
  width: 180px;
  height: 180px;
  pointer-events: auto;
  user-select: none;
  cursor: grab;
  transition: transform 0.08s ease-out;
}

.sphere:active {
  cursor: grabbing;
  transform: scale(1.02);
}

.sphere img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* top-left + handle box (shown on hover) */
.sphere-handle {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border: 2px solid #000000;
  color: #000000;
  font-weight: bold;
  font-size: 16px;
  line-height: 18px;
  text-align: center;
  pointer-events: auto;
  display: none;
}

.sphere:hover .sphere-handle {
  display: block;
}

/* ABOUT overlay */
#aboutOverlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* 90s fly‑in animation */
#aboutPanel {
  position: relative;
  border: 3px solid #000;
  box-shadow: 10px 10px 0 #000;
  background: #ffffff;
  animation: aboutFlyIn 0.6s ease-out forwards;
  transform: translate(-40px, -40px) scale(0.7);
  opacity: 0;
}

#aboutPanel img {
  display: block;
  max-width: min(90vw, 640px);
  height: auto;
}

/* X button */
#aboutClose {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 2px solid #000;
  background: #ffffff;
  color: #000000;
  font-weight: bold;
  font-size: 16px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}

@keyframes aboutFlyIn {
  0% {
    transform: translate(-40px, -40px) scale(0.7);
    opacity: 0;
  }
  60% {
    transform: translate(10px, 10px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate(0,0) scale(1);
    opacity: 1;
  }
}
