:root {
  --black: #060608;
  --panel: #0c0d12;
  --samsung-blue: #1428a0;
  --light-blue: #5b7fff;
  --ice: #e8ecff;
  --grey: #8b8f9a;
  --white: #f5f6f8;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 48px;
  background:
    radial-gradient(ellipse 900px 600px at 50% 110%, rgba(20, 40, 160, .35), transparent 60%),
    radial-gradient(ellipse 700px 400px at 50% -10%, rgba(91, 127, 255, .18), transparent 60%),
    linear-gradient(180deg, #0a0b10, #06060a 60%, #08090e);
  background-color: var(--black);
  overflow-x: hidden;
}

.hero {
  position: relative;
  text-align: center;
  padding: 0 24px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--white);
}

.hero-title .accent {
  color: var(--light-blue);
}

.hero-tagline {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--grey);
}

/* faint tech grid, matching the gachapon.bsd.international backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, black 40%, transparent 90%);
  pointer-events: none;
}

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 140px;
  flex-wrap: wrap;
  padding: 0 60px 60px;
}

.column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.box-stage {
  position: relative;
  width: 340px;
  aspect-ratio: 636 / 592;
  cursor: pointer;
  user-select: none;
  transition: transform .25s ease;
}

.box-stage:hover {
  transform: translateY(-4px) scale(1.02);
}

.column.is-busy .box-stage {
  cursor: default;
  pointer-events: none;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 30px 40px rgba(0, 0, 0, .55))
    drop-shadow(0 0 46px rgba(91, 127, 255, .18));
  transition: opacity .2s ease;
}

.layer.open {
  opacity: 0;
}

.column.is-open .layer.closed {
  opacity: 0;
}

.column.is-open .layer.open {
  opacity: 1;
}

.layer.closed.shake-anim {
  animation: boxShake .5s ease-in-out;
}

.layer.open.pop-anim {
  animation: boxPop .55s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes boxShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-4deg) scale(1.02); }
  40% { transform: rotate(4deg) scale(1.02); }
  60% { transform: rotate(-3deg) scale(1.01); }
  80% { transform: rotate(3deg) scale(1.01); }
}

@keyframes boxPop {
  0% { transform: scale(.85); }
  55% { transform: scale(1.12) translateY(-6px); }
  100% { transform: scale(1) translateY(0); }
}

.glow-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(91, 127, 255, .55) 45%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.glow-burst.burst {
  animation: burstFlash .7s ease-out;
}

.glow-burst.burst-big {
  animation: burstFlash .9s ease-out;
}

@keyframes burstFlash {
  0% { transform: scale(0); opacity: .95; }
  55% { opacity: .55; }
  100% { transform: scale(3.4); opacity: 0; }
}

.particles {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 6;
}

.particle {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: particleFly .9s cubic-bezier(.2, .8, .3, 1) forwards;
}

@keyframes particleFly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}

.hint {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--grey);
  animation: hintPulse 2s ease-in-out infinite;
}

.column.is-open .hint {
  display: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

/* ---------- full-screen reveal overlay ---------- */

body.no-scroll {
  overflow: hidden;
}

.reveal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 900px 700px at 50% 50%, rgba(20, 40, 160, .3), transparent 65%),
    rgba(3, 3, 6, .82);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  z-index: 100;
}

.reveal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.reveal-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--g, #5b7fff) 32%, transparent 72%);
  filter: blur(40px);
  z-index: 0;
  animation: glowPulse 2.6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.95); opacity: .55; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: .9; }
}

.reveal-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.reveal-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  transform: scale(.4) translateY(30px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.22, .9, .28, 1.2), opacity .4s ease;
}

.reveal-overlay.show .reveal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.reveal-img {
  width: min(50vw, 460px);
  object-fit: contain;
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, .6));
  animation: floaty 3s ease-in-out infinite;
  margin-bottom: 14px;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.reveal-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--light-blue);
}

.reveal-name {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--white);
  text-align: center;
}

.reveal-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 11px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.reveal-close:hover {
  background: rgba(91, 127, 255, .18);
  transform: translateY(-1px);
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
}
