@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&display=swap");

:root { --font: "Geist", system-ui, -apple-system, sans-serif; }

*,*::before,*::after { box-sizing: border-box; }
html, body {
  -webkit-tap-highlight-color: transparent; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--font);
  background: radial-gradient(120% 100% at 50% 0%, #16283a 0%, #0c1521 55%, #080e16 100%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* a discrete sheet of bubble wrap, centred with room for the HUD + hint */
.sheet {
  position: fixed;
  top: clamp(52px, 9vh, 88px);
  bottom: clamp(50px, 8vh, 78px);
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 900px);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: #0c1a28;
  box-shadow: 0 30px 64px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(150,205,255,0.14);
}
/* soft plastic sheen across the sheet */
.sheet::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, transparent 30%, transparent 70%, rgba(120,170,230,0.08) 100%);
}

.bubble {
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.08s ease;
}
.bubble:active { transform: scale(0.92); }

.bubble__inner {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(ellipse 55% 45% at 38% 35%,
    rgba(200, 230, 255, 0.9) 0%,
    rgba(140, 195, 245, 0.6) 30%,
    rgba(80, 150, 220, 0.35) 65%,
    rgba(30, 80, 160, 0.25) 100%
  );
  box-shadow:
    inset -3px -3px 8px rgba(0,0,0,0.25),
    inset 2px 2px 6px rgba(255,255,255,0.55),
    0 2px 8px rgba(0,80,180,0.3);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

/* highlight glint */
.bubble__inner::before {
  content: "";
  position: absolute;
  top: 14%;
  left: 18%;
  width: 30%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  filter: blur(2px);
}

.bubble.is-popped .bubble__inner {
  opacity: 0;
  transform: scale(0.6);
}

/* HUD */
.hud {
  position: fixed;
  top: clamp(14px, 3vw, 24px);
  right: clamp(18px, 3.5vw, 34px);
  z-index: 10;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(180, 215, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
}
.reset {
  appearance: none;
  border: 1px solid rgba(180,215,255,0.28);
  background: rgba(180,215,255,0.07);
  color: rgba(180,215,255,0.55);
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.reset:hover { background: rgba(180,215,255,0.15); color: rgba(200,230,255,0.9); border-color: rgba(180,215,255,0.5); }
.reset:active { transform: scale(0.95); }

/* frame + hint */
.frame { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.frame__corner {
  position: absolute;
  font-size: clamp(0.56rem, 1.2vw, 0.7rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(160, 200, 255, 0.32);
  white-space: nowrap;
  font-family: var(--font);
}
.frame__corner--tl { top: clamp(18px, 3.5vw, 34px); left: clamp(18px, 3.5vw, 34px); }
.frame__corner--tr { top: clamp(18px, 3.5vw, 34px); right: clamp(18px, 3.5vw, 34px); }
.frame__corner--bl { bottom: clamp(20px, 3.5vw, 34px); left: clamp(18px, 3.5vw, 34px); }
.frame__corner a { color: inherit; text-decoration: none; pointer-events: auto; border-bottom: 1px solid transparent; transition: color .14s, border-color .14s; }
.frame__corner a:hover { color: rgba(200,225,255,0.65); border-bottom-color: rgba(160,200,255,0.4); }

.hint {
  position: fixed;
  bottom: clamp(20px, 3.5vw, 34px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(160, 200, 255, 0.28);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  transition: opacity 0.6s ease;
}
.hint.is-hidden { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .bubble { transition: none; }
  .bubble__inner { transition: none; }
}
