/* ============================================================
   WARPDOOR v6 — Cinematic UI / Glassmorphism / Premium
============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; min-height: 100%;
  background: #02030a; color: #fff;
  font-family: 'IBM Plex Mono', 'Noto Sans JP', monospace;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
body { overscroll-behavior: none; }
#root { width: 100%; min-height: 100vh; position: relative; }

button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(172, 120, 255, .4); color: #fff; }

/* Premium scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.02); }
::-webkit-scrollbar-thumb { background: linear-gradient(#a864ff55, #3a1e7555); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(#a864ff88, #3a1e7588); }

/* ─── Keyframes ─────────────────────────────── */
@keyframes twinkle { 0%,100% { opacity:.12 } 50% { opacity:.9 } }
@keyframes floatY { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@keyframes floatSlow { 0%,100% { transform: translateY(0) rotate(0deg) } 50% { transform: translateY(-20px) rotate(2deg) } }
@keyframes glowPulse {
  0%,100% { text-shadow: 0 0 40px rgba(172,120,255,.4), 0 0 80px rgba(100,50,200,.2), 0 0 120px rgba(60,20,150,.1) }
  50%     { text-shadow: 0 0 80px rgba(200,160,255,.8), 0 0 160px rgba(150,100,255,.4), 0 0 240px rgba(100,60,220,.2) }
}
@keyframes pulse { 0%,100% { opacity:.45 } 50% { opacity:1 } }
@keyframes scanline { 0% { transform: translateY(-10%) } 100% { transform: translateY(100vh) } }
@keyframes fadeIn { 0% { opacity: 0 } 100% { opacity: 1 } }
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(24px) } 100% { opacity: 1; transform: translateY(0) } }
@keyframes fadeInDown { 0% { opacity: 0; transform: translateY(-12px) } 100% { opacity: 1; transform: translateY(0) } }
@keyframes scaleIn { 0% { opacity: 0; transform: scale(.85) } 100% { opacity: 1; transform: scale(1) } }
@keyframes slideDown { 0% { opacity: 0; transform: translateY(-8px) } 100% { opacity: 1; transform: translateY(0) } }
@keyframes blink { 0%,100% { opacity: .3 } 50% { opacity: .95 } }
@keyframes shimmer { 0% { background-position: -200% 0 } 100% { background-position: 200% 0 } }
@keyframes borderScroll {
  0% { background-position: 0 0 }
  100% { background-position: 400% 0 }
}
@keyframes doorGlow {
  0%,100% { filter: drop-shadow(0 0 30px #a864ff66) drop-shadow(0 0 60px #5b2fbf33) }
  50%     { filter: drop-shadow(0 0 60px #c498ffaa) drop-shadow(0 0 120px #8c4cff66) }
}
@keyframes rotateBg {
  0% { transform: rotate(0deg) }
  100% { transform: rotate(360deg) }
}

/* ─── Brand tokens ─────────────────────────────── */
:root {
  --brand-violet: #a864ff;
  --brand-deep: #5b2fbf;
  --brand-indigo: #1a0a40;
  --bg-0: #02030a;
  --bg-1: #050618;
  --bg-2: #080b24;
  --glass: rgba(14, 12, 36, .55);
  --glass-bright: rgba(22, 20, 48, .75);
  --hairline: rgba(255,255,255,.08);
  --hairline-bright: rgba(255,255,255,.14);
  --ink-0: #fff;
  --ink-1: rgba(255,255,255,.72);
  --ink-2: rgba(255,255,255,.5);
  --ink-3: rgba(255,255,255,.3);
}

/* ─── Landing ──────────────────────────────────── */
.landing {
  width: 100%; min-height: 100vh;
  background:
    radial-gradient(ellipse 1100px 700px at 30% 8%, #2a1560 0%, #0a0528 40%, transparent 70%),
    radial-gradient(ellipse 800px 500px at 90% 90%, #3a1570 0%, #0a0828 40%, transparent 70%),
    linear-gradient(180deg, #02030a 0%, #02010a 100%);
  position: relative; overflow-x: hidden; overflow-y: auto;
}
.star {
  position: fixed; border-radius: 50%;
  background: #fff; pointer-events: none; z-index: 0;
  box-shadow: 0 0 2px #fff;
}
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 600px 200px at 20% 20%, rgba(120,60,255,.12) 0%, transparent 50%),
    radial-gradient(ellipse 400px 300px at 85% 40%, rgba(255,80,180,.08) 0%, transparent 50%),
    radial-gradient(ellipse 500px 250px at 50% 90%, rgba(80,180,255,.1) 0%, transparent 50%);
  filter: blur(30px);
  animation: floatSlow 18s ease-in-out infinite;
}
.scanline {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(transparent, rgba(172,120,255,.25), transparent);
  animation: scanline 10s linear infinite;
  pointer-events: none; z-index: 1;
  box-shadow: 0 0 12px rgba(172,120,255,.4);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Topbar ───────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 14px clamp(16px, 4vw, 32px);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  z-index: 100; background: rgba(2,3,10,.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: .32em; color: var(--ink-3); text-transform: uppercase;
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-1); font-weight: 500;
}
.topbar-brand::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-violet);
  box-shadow: 0 0 10px var(--brand-violet), 0 0 20px var(--brand-violet);
  animation: pulse 2s ease-in-out infinite;
}
.brand-version {
  color: var(--ink-3); margin-left: 8px; font-size: 9px;
  padding: 2px 6px; border: 1px solid var(--hairline); border-radius: 2px;
}
.stats { display: flex; gap: clamp(12px, 2.5vw, 24px); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.stats .k { color: #fff; font-weight: 700; }
.stats > div { display: flex; align-items: center; gap: 6px; }

.hud-btn {
  background: rgba(255,255,255,.04); color: var(--ink-1);
  border: 1px solid var(--hairline);
  padding: 8px 14px; font-size: 10px; letter-spacing: .28em;
  border-radius: 2px; transition: all .2s ease; text-transform: uppercase;
}
.hud-btn:hover {
  background: rgba(172,120,255,.12); border-color: rgba(172,120,255,.4);
  color: #fff; transform: translateY(-1px);
}

/* ─── Hero ─────────────────────────────────────── */
.hero {
  padding: clamp(100px, 16vh, 160px) clamp(16px, 4vw, 48px) clamp(40px, 8vh, 80px);
  text-align: center; position: relative; z-index: 5;
}
.hero-tag {
  display: inline-block; padding: 6px 16px;
  font-size: 10px; letter-spacing: .5em; text-transform: uppercase;
  background: rgba(172,120,255,.08); border: 1px solid rgba(172,120,255,.25);
  color: var(--brand-violet); border-radius: 999px; margin-bottom: 24px;
  animation: fadeInDown 1s ease .1s both;
}
.hero-title {
  font-family: 'Syne', serif;
  font-size: clamp(52px, 12vw, 168px); font-weight: 800;
  letter-spacing: -.04em; line-height: .88; margin: 0 0 20px;
  background: linear-gradient(180deg, #fff 0%, #fff 40%, #c89cff 70%, #6c39d9 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 1.2s ease .2s both, glowPulse 4s ease-in-out infinite;
  filter: drop-shadow(0 6px 40px rgba(172,120,255,.3));
}
.hero-sub {
  color: var(--ink-1); font-family: 'Shippori Mincho', serif;
  font-size: clamp(14px, 2.2vw, 22px); letter-spacing: .08em;
  margin: 0 0 32px; font-weight: 400;
  animation: fadeInUp 1.2s ease .4s both;
}
.hero-cap {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-2); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--hairline); background: rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
  animation: fadeInUp 1.2s ease .55s both;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4afc9e;
  box-shadow: 0 0 10px #4afc9e, 0 0 24px #4afc9e66;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ─── Action buttons ───────────────────────────── */
.action-row {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  padding: 0 clamp(16px, 4vw, 48px) 60px;
  position: relative; z-index: 5;
  animation: fadeInUp 1.2s ease .75s both;
}
.action-btn {
  position: relative; overflow: hidden;
  padding: 16px 28px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  background: rgba(14,12,36,.6); color: #fff;
  border: 1px solid rgba(172,120,255,.35);
  backdrop-filter: blur(10px);
  border-radius: 6px; font-weight: 500;
  transition: all .3s cubic-bezier(.22,1,.36,1);
  display: inline-flex; align-items: center; gap: 12px;
}
.action-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(172,120,255,.25), transparent);
  background-size: 200% 100%;
  opacity: 0; transition: opacity .3s;
}
.action-btn:hover { transform: translateY(-2px); border-color: rgba(172,120,255,.7); box-shadow: 0 10px 40px rgba(172,120,255,.35); }
.action-btn:hover::before { opacity: 1; animation: shimmer 1.5s linear infinite; }
.action-btn.primary {
  background: linear-gradient(135deg, #5b2fbf 0%, #a864ff 100%);
  border-color: transparent;
  box-shadow: 0 8px 32px rgba(172,120,255,.45);
}
.action-btn.primary:hover { box-shadow: 0 12px 56px rgba(172,120,255,.65); }
.act-icon { font-size: 16px; }

/* ─── Daily theme ──────────────────────────────── */
.daily-theme {
  max-width: 960px; margin: 0 auto 48px; padding: 20px 24px;
  display: flex; gap: 20px; align-items: center;
  background: linear-gradient(135deg, rgba(172,120,255,.08), rgba(90,47,191,.04));
  border: 1px solid rgba(172,120,255,.2); border-radius: 10px;
  backdrop-filter: blur(14px);
  animation: fadeInUp 1.2s ease .9s both;
}
.daily-icon {
  width: 54px; height: 54px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(172,120,255,.2), rgba(90,47,191,.1));
  border-radius: 12px; font-size: 24px;
  box-shadow: inset 0 0 20px rgba(172,120,255,.15);
}
.daily-info { flex: 1; }
.daily-label { color: var(--brand-violet); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 4px; }
.daily-title { font-family: 'Shippori Mincho', serif; font-size: 20px; color: #fff; margin-bottom: 2px; }
.daily-desc { color: var(--ink-2); font-size: 12px; }

/* ─── Worlds section ──────────────────────────── */
.section-title {
  text-align: center; color: var(--ink-2); font-size: 11px;
  letter-spacing: .5em; text-transform: uppercase; padding: 16px 0 36px;
}
.section-title::before,
.section-title::after { content: '◆'; color: var(--brand-violet); margin: 0 14px; opacity: .7; }
.worlds-section { padding: 40px clamp(16px, 4vw, 48px); position: relative; z-index: 5; }
.worlds-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wcard {
  position: relative; overflow: hidden;
  padding: 26px 22px; min-height: 300px;
  background: linear-gradient(180deg, rgba(10,8,24,.85) 0%, rgba(5,4,16,.95) 100%);
  border: 1px solid var(--hairline); border-radius: 10px;
  color: #fff; text-align: left; cursor: pointer;
  transition: transform .3s cubic-bezier(.22,1,.36,1),
              border-color .3s, box-shadow .3s, background .3s;
  display: flex; flex-direction: column;
  animation: fadeInUp .8s ease both;
}
.wcard::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, currentColor 0%, transparent 60%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
  mix-blend-mode: screen;
}
.wcard:hover { transform: translateY(-6px) scale(1.01); }
.wcard:hover::before { opacity: .12; }

.wcard .emoji {
  font-size: 40px; line-height: 1; margin-bottom: 14px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
}
.wcard .wname { font-family: 'Shippori Mincho', serif; font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.wcard .wyear { color: var(--ink-3); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.wcard .wdesc { color: var(--ink-1); font-size: 12px; line-height: 1.65; margin-bottom: 14px; flex: 1; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  font-size: 9px; letter-spacing: .18em; padding: 3px 8px; border-radius: 4px;
  border: 1px solid; background: rgba(0,0,0,.4); text-transform: uppercase;
}
.row-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--hairline);
}
.warps { font-size: 9px; color: var(--ink-3); letter-spacing: .2em; text-transform: uppercase; }
.warp-btn { font-size: 11px; font-weight: 700; letter-spacing: .28em; }
.badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 9px; letter-spacing: .2em; padding: 4px 8px;
  border: 1px solid; border-radius: 3px; text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.lock-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.88); color: #fff; padding: 10px 18px;
  border: 1px solid var(--hairline-bright); border-radius: 20px;
  font-size: 10px; letter-spacing: .26em; backdrop-filter: blur(10px);
  pointer-events: none; text-transform: uppercase;
}
.wcard.locked .emoji,
.wcard.locked .wname,
.wcard.locked .wdesc { filter: grayscale(70%) brightness(.6); }

/* ─── Live feed ───────────────────────────────── */
.live-feed { padding: 40px clamp(16px, 4vw, 48px); max-width: 880px; margin: 0 auto; position: relative; z-index: 5; }
.feed-list { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(10,8,24,.5); border: 1px solid var(--hairline);
  border-radius: 8px; animation: fadeInUp .5s ease both;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
}
.feed-item:hover { background: rgba(20,15,40,.7); border-color: rgba(172,120,255,.3); }
.fi-emoji { font-size: 22px; }
.fi-name { font-size: 13px; font-weight: 500; color: #fff; }
.fi-ago { margin-left: auto; font-size: 10px; color: var(--ink-3); letter-spacing: .2em; }

/* ─── Footer ───────────────────────────────────── */
.footer {
  padding: 60px 24px 40px; text-align: center;
  font-size: 10px; color: var(--ink-3); letter-spacing: .24em;
  border-top: 1px solid var(--hairline); margin-top: 40px;
  line-height: 2.2;
}
.footer a { color: var(--brand-violet); text-decoration: none; border-bottom: 1px dashed rgba(172,120,255,.4); }

/* ─── Door scene (portal transition) ──────────── */
.door-scene {
  position: fixed; inset: 0; z-index: 500;
  background: #000; overflow: hidden; cursor: pointer;
}
.door-scene canvas { display: block; width: 100%; height: 100%; }
.door-hud {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  color: #fff;
}
.door-prompt {
  position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
  animation: fadeInUp 1s ease .5s both;
}
.door-prompt .key {
  display: inline-block; padding: 10px 32px;
  border: 1px solid rgba(172,120,255,.5); border-radius: 999px;
  font-size: 12px; letter-spacing: .4em; text-transform: uppercase;
  background: rgba(10,8,24,.7); backdrop-filter: blur(14px);
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 4px 32px rgba(172,120,255,.3), inset 0 0 16px rgba(172,120,255,.15);
}
.door-prompt .caption {
  margin-top: 16px; color: var(--ink-2); font-size: 10px;
  letter-spacing: .32em; text-transform: uppercase;
}
.door-top {
  position: absolute; top: 0; left: 0; right: 0; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(0,0,0,.6), transparent);
}
.door-top-info {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  color: var(--ink-2); letter-spacing: .32em; text-transform: uppercase;
}
.door-top-info b { color: #fff; font-weight: 500; }

/* Vignette */
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 490;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6) 100%);
}

/* ─── Warp transition (wormhole) ─────────────── */
.warp-stage {
  position: fixed; inset: 0; z-index: 600; background: #000;
  overflow: hidden;
}
.warp-stage canvas { display: block; width: 100%; height: 100%; }
.warp-caption {
  position: absolute; bottom: 18%; left: 0; right: 0;
  text-align: center; color: #fff; z-index: 5; pointer-events: none;
}
.warp-caption .where {
  font-family: 'Shippori Mincho', serif; font-size: clamp(28px, 5vw, 48px);
  letter-spacing: .18em; font-weight: 700;
  animation: fadeInUp 1.2s ease .2s both;
  text-shadow: 0 4px 48px rgba(0,0,0,.9);
}
.warp-caption .when {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink-1); font-size: 12px; letter-spacing: .5em;
  margin-top: 10px; text-transform: uppercase;
  animation: fadeInUp 1.2s ease .4s both;
}
.warp-progress {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 240px; height: 3px;
  background: rgba(255,255,255,.06); border-radius: 2px;
  overflow: hidden; z-index: 5; pointer-events: none;
}
.warp-progress-bar {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #a864ff, #4afc9e, #a864ff);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

/* ─── World view (after arrival) ─────────────── */
.world-stage {
  position: fixed; inset: 0; z-index: 400; background: #000;
}
.world-stage canvas { display: block; width: 100%; height: 100%; }
.world-hud {
  position: fixed; inset: 0; pointer-events: none; z-index: 410;
}
.world-hud > * { pointer-events: auto; }

.world-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 16px clamp(14px, 3vw, 28px);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.25) 60%, transparent 100%);
  animation: fadeInDown .8s ease .6s both;
}
.world-name-block {
  display: flex; align-items: center; gap: 14px;
  backdrop-filter: blur(8px);
}
.world-name-block .emoji {
  font-size: 40px; filter: drop-shadow(0 4px 20px rgba(0,0,0,.6));
}
.world-name-block h2 {
  margin: 0; font-family: 'Shippori Mincho', serif;
  font-size: clamp(20px, 3vw, 28px); letter-spacing: .08em; font-weight: 700;
  text-shadow: 0 2px 20px rgba(0,0,0,.9);
}
.world-name-block .sub {
  font-size: 10px; letter-spacing: .32em; color: var(--ink-2);
  text-transform: uppercase; margin-top: 2px;
  font-family: 'IBM Plex Mono', monospace;
}

.world-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.world-btn {
  background: rgba(10,8,24,.7); backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-bright); color: #fff;
  padding: 10px 16px; font-size: 10px; letter-spacing: .26em;
  border-radius: 4px; text-transform: uppercase; font-weight: 500;
  transition: all .2s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.world-btn:hover {
  background: rgba(172,120,255,.15); border-color: rgba(172,120,255,.5);
  transform: translateY(-1px);
}
.world-btn.danger:hover {
  background: rgba(255,80,80,.15); border-color: rgba(255,80,80,.5);
}

.world-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px clamp(14px, 3vw, 28px) 20px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; flex-wrap: wrap;
  background: linear-gradient(0deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 70%, transparent 100%);
  animation: fadeInUp .8s ease .8s both;
}
.discovery {
  max-width: 500px;
  padding: 14px 18px;
  background: rgba(10,8,24,.7); backdrop-filter: blur(14px);
  border: 1px solid rgba(172,120,255,.25); border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.discovery-label {
  font-size: 9px; color: var(--brand-violet);
  letter-spacing: .4em; text-transform: uppercase; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.discovery-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-violet);
  box-shadow: 0 0 8px var(--brand-violet);
  animation: pulse 1.5s ease-in-out infinite;
}
.discovery-text {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(13px, 1.5vw, 16px); line-height: 1.6; color: #fff;
}

.crosshair {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 28px; height: 28px;
  pointer-events: none; z-index: 405;
  opacity: .4; transition: opacity .3s;
}
.crosshair::before, .crosshair::after {
  content: ''; position: absolute; background: rgba(255,255,255,.7);
}
.crosshair::before { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.crosshair::after { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }

.controls-help {
  position: absolute; right: 18px; bottom: 20%;
  padding: 10px 14px; font-size: 9px; letter-spacing: .2em;
  color: var(--ink-2); text-transform: uppercase;
  background: rgba(10,8,24,.6); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); border-radius: 6px;
  line-height: 1.9;
}
.controls-help b { color: #fff; font-weight: 500; }
.controls-help .kbd {
  display: inline-block; padding: 1px 6px; margin: 0 2px;
  border: 1px solid var(--hairline-bright); border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace; color: #fff;
  background: rgba(255,255,255,.04);
}

.mini-compass {
  position: absolute; top: 50%; right: 18px; transform: translateY(-50%);
  width: 56px; height: 56px;
  background: rgba(10,8,24,.7); border: 1px solid var(--hairline);
  border-radius: 50%; backdrop-filter: blur(10px);
  display: grid; place-items: center;
  color: #fff; font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
}

/* ─── Modal ────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.78); backdrop-filter: blur(14px);
  display: grid; place-items: center;
  animation: fadeIn .3s ease both; padding: 16px;
}
.modal {
  width: min(90vw, 560px); max-height: 85vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(14,12,36,.98), rgba(5,4,16,.98));
  border: 1px solid rgba(172,120,255,.25); border-radius: 14px;
  padding: 32px; color: #fff;
  animation: scaleIn .3s cubic-bezier(.22,1,.36,1) both;
  box-shadow: 0 32px 120px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
}
.modal h2 {
  font-family: 'Shippori Mincho', serif; font-size: 24px; margin: 0 0 12px;
  background: linear-gradient(180deg, #fff, #c89cff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.modal p { color: var(--ink-1); line-height: 1.7; font-size: 13px; margin: 0 0 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal-close {
  position: absolute; top: 18px; right: 20px;
  background: none; border: none; color: var(--ink-2);
  font-size: 22px; cursor: pointer; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 50%;
  transition: all .2s;
}
.modal-close:hover { background: rgba(255,255,255,.08); color: #fff; }

.pass-features {
  list-style: none; padding: 0; margin: 16px 0 0;
}
.pass-features li {
  padding: 10px 0 10px 30px; font-size: 13px; color: var(--ink-1);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.pass-features li::before {
  content: '✓'; position: absolute; left: 0; top: 10px;
  color: var(--brand-violet); font-weight: 700;
  width: 20px; height: 20px; background: rgba(172,120,255,.15);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 11px;
}

/* ─── Stamp collection ──────────────────────── */
.stamp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.stamp {
  aspect-ratio: 1; display: grid; place-items: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--hairline);
  border-radius: 8px; font-size: 28px; position: relative;
  filter: grayscale(100%) brightness(.3); transition: all .3s;
}
.stamp.earned {
  filter: none;
  background: rgba(172,120,255,.1);
  border-color: rgba(172,120,255,.4);
  box-shadow: 0 0 16px rgba(172,120,255,.2), inset 0 0 20px rgba(172,120,255,.1);
}
.stamp .ct {
  position: absolute; top: 2px; right: 4px;
  font-size: 9px; color: var(--brand-violet); letter-spacing: .1em;
}

/* ─── Share toast ──────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  padding: 14px 24px; background: rgba(10,8,24,.92);
  border: 1px solid rgba(172,120,255,.4); border-radius: 999px;
  color: #fff; font-size: 13px; letter-spacing: .06em;
  z-index: 1200; box-shadow: 0 12px 60px rgba(0,0,0,.8);
  backdrop-filter: blur(14px);
  animation: fadeInUp .4s ease both;
}

/* ─── Loading overlay ──────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: radial-gradient(circle at center, #0a0528, #000);
  display: grid; place-items: center;
  animation: fadeIn .3s ease both;
}
.loading-inner {
  text-align: center;
}
.loading-ring {
  width: 80px; height: 80px; margin: 0 auto 20px;
  border: 2px solid rgba(172,120,255,.15);
  border-top-color: var(--brand-violet);
  border-radius: 50%;
  animation: rotateBg 1.2s linear infinite;
  box-shadow: 0 0 40px rgba(172,120,255,.35);
}
.loading-text {
  color: var(--ink-1); font-size: 10px; letter-spacing: .5em;
  text-transform: uppercase;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 620px) {
  .topbar { padding: 10px 14px; font-size: 9px; }
  .stats { gap: 10px; font-size: 9px; }
  .hero { padding: 110px 16px 40px; }
  .worlds-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wcard { min-height: 260px; padding: 20px 16px; }
  .wcard .emoji { font-size: 32px; }
  .wcard .wname { font-size: 18px; }
  .action-btn { padding: 14px 18px; font-size: 10px; letter-spacing: .22em; }
  .mini-compass, .controls-help { display: none; }
  .world-top { padding: 12px 14px; }
  .world-bottom { padding: 12px 14px 14px; }
  .discovery { max-width: 100%; }
  .world-btn { padding: 8px 12px; font-size: 9px; }
  .stamp-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 380px) {
  .worlds-grid { grid-template-columns: 1fr; }
}
