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

:root{
  --aqua:   #2aa9ff;
  --aqua-d: #0a64c8;
  --sky:    #bfe9ff;
  --glass:  rgba(255,255,255,.45);
  --glass-b: rgba(255,255,255,.65);
  --ink:    #0b3a5e;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; overflow:hidden; }
body{
  font-family:'Quicksand', 'Segoe UI', system-ui, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(120% 90% at 50% -10%, #eafaff 0%, #bfe9ff 38%, #5fb8f5 72%, #2a7de1 100%);
  -webkit-font-smoothing:antialiased;
  user-select:none;
  cursor:default;
}
.hidden{ display:none !important; }

#scene{ position:fixed; inset:0; }
#scene canvas{ display:block; }

/* ── White swoop / fade overlay ─────────────────────────────── */
#fade{
  position:fixed; inset:0; z-index:40; pointer-events:none;
  background:
    radial-gradient(120% 120% at 50% 50%, #ffffff 0%, #eafaff 60%, #cdeeff 100%);
  opacity:0;
  transition:opacity 1.6s cubic-bezier(.6,0,.2,1);
}

/* ── Shared glassy "Frutiger Aero" card ─────────────────────── */
.glass{
  position:relative;
  background:linear-gradient(160deg, var(--glass-b), var(--glass) 45%, rgba(255,255,255,.25));
  border:1px solid rgba(255,255,255,.8);
  border-radius:28px;
  backdrop-filter:blur(18px) saturate(1.5);
  -webkit-backdrop-filter:blur(18px) saturate(1.5);
  box-shadow:
    0 20px 60px rgba(10,70,140,.35),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -30px 60px rgba(120,200,255,.25);
  overflow:hidden;
}
/* glossy top-light sweep */
.glass::before{
  content:""; position:absolute; inset:0 0 55% 0;
  background:linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0));
  pointer-events:none;
}

.card{ padding:46px 52px; text-align:center; max-width:460px; }
.card.small{ padding:34px 40px; }

#enter,#pause,#oops{
  position:fixed; inset:0; z-index:50;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
  animation:fadeIn .8s ease both;
}
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }

h1{
  font-size:clamp(30px,5vw,52px); font-weight:700; letter-spacing:.16em;
  background:linear-gradient(180deg,#ffffff, #d6f0ff 40%, #43a7ff);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  text-shadow:0 2px 18px rgba(80,180,255,.45);
  margin-bottom:6px;
}
h2{ font-size:26px; letter-spacing:.05em; margin-bottom:6px; color:var(--aqua-d); }
#subtitle{ font-size:16px; opacity:.85; margin-bottom:26px; letter-spacing:.05em; }
.fineprint{ margin-top:18px; font-size:12.5px; opacity:.7; letter-spacing:.04em; }

/* ── Glossy aqua button ─────────────────────────────────────── */
.aero-btn{
  font-family:inherit; font-weight:600; font-size:17px; letter-spacing:.04em;
  color:#fff; cursor:pointer;
  padding:15px 30px; border:none; border-radius:999px;
  background:linear-gradient(180deg, #7fd0ff 0%, var(--aqua) 48%, var(--aqua-d) 100%);
  box-shadow:
    0 10px 24px rgba(10,90,200,.45),
    inset 0 2px 2px rgba(255,255,255,.9),
    inset 0 -10px 18px rgba(0,60,140,.45);
  transition:transform .15s ease, filter .2s ease;
}
.aero-btn:hover{ transform:translateY(-2px) scale(1.03); filter:brightness(1.08); }
.aero-btn:active{ transform:translateY(0) scale(.99); }

/* decorative bubbles drifting inside the entry card */
.bubbles{ position:absolute; inset:0; pointer-events:none; }
.bubbles span{
  position:absolute; bottom:-30px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(180,230,255,.25) 60%, rgba(120,200,255,0) 72%);
  box-shadow:inset 0 0 8px rgba(255,255,255,.8);
  animation:rise linear infinite;
}
.bubbles span:nth-child(1){ left:12%; width:26px; height:26px; animation-duration:9s; }
.bubbles span:nth-child(2){ left:34%; width:14px; height:14px; animation-duration:7s; animation-delay:1.5s;}
.bubbles span:nth-child(3){ left:58%; width:34px; height:34px; animation-duration:11s; animation-delay:.6s;}
.bubbles span:nth-child(4){ left:76%; width:18px; height:18px; animation-duration:8s; animation-delay:2.4s;}
.bubbles span:nth-child(5){ left:88%; width:10px; height:10px; animation-duration:6.5s; animation-delay:3s;}
@keyframes rise{
  0%{ transform:translateY(0) scale(.8); opacity:0; }
  15%{ opacity:.9; }
  100%{ transform:translateY(-340px) scale(1.1); opacity:0; }
}

/* ── In-world HUD ───────────────────────────────────────────── */
#hud{ position:fixed; inset:0; z-index:20; pointer-events:none; }
#crosshair{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
}
#crosshair .dot{
  display:block; width:9px; height:9px; border-radius:50%;
  background:rgba(255,255,255,.9);
  box-shadow:0 0 8px rgba(120,210,255,.9), 0 0 2px rgba(0,80,160,.6);
  transition:transform .25s ease, background .25s ease;
}
#crosshair.active .dot{
  transform:scale(1.9);
  background:rgba(180,240,255,.95);
  box-shadow:0 0 16px rgba(120,210,255,1);
}
#prompt{
  position:absolute; left:50%; bottom:14%; transform:translateX(-50%);
  font-size:18px; font-weight:600; letter-spacing:.06em; color:#fff;
  text-shadow:0 2px 10px rgba(0,60,140,.7);
  padding:10px 22px; border-radius:999px;
  background:linear-gradient(180deg, rgba(120,200,255,.55), rgba(20,110,210,.45));
  border:1px solid rgba(255,255,255,.55);
  backdrop-filter:blur(8px);
  opacity:0; transition:opacity .3s ease, transform .3s ease;
}
#prompt.show{ opacity:1; transform:translateX(-50%) translateY(-4px); }
#legend{
  position:absolute; bottom:22px; left:50%; transform:translateX(-50%);
  font-size:13px; letter-spacing:.03em; color:#eaf7ff;
  text-shadow:0 1px 6px rgba(0,50,120,.7);
  opacity:.8;
}
#legend b{ color:#fff; }
