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

:root {
  color-scheme: dark;
  --bg: #050713;
  --text: #f5f6ff;
  --muted: rgba(220, 226, 255, .58);
  --accent: #9b8cff;
  --glass: rgba(13, 17, 40, .62);
  --line: rgba(202, 207, 255, .14);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
.app-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(49, 42, 112, .24), transparent 48%),
    radial-gradient(ellipse at 80% 18%, rgba(22, 91, 125, .14), transparent 36%),
    #050713;
}
#universe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  touch-action: none;
}
.topbar {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 58px);
  z-index: 2;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-family: Outfit, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.7px;
}
.brand-mark { color: #b5a8ff; font-size: 23px; }
.brand-light { font-weight: 300; color: #c7c9e6; }
.top-caption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(214, 220, 255, .35);
  font-size: 9px;
  letter-spacing: 2.5px;
  white-space: nowrap;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(14, 18, 42, .48);
  color: rgba(238, 239, 255, .82);
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.intro {
  position: absolute;
  top: 17%;
  left: 20px;
  right: 20px;
  text-align: center;
  pointer-events: none;
  animation: appear 1.2s ease both;
}
.eyebrow {
  margin: 0 0 13px;
  color: #a99cff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3.5px;
}
h1 {
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: clamp(35px, 6vw, 66px);
  font-weight: 400;
  letter-spacing: -2.5px;
  line-height: 1.08;
  text-shadow: 0 4px 35px rgba(117, 105, 255, .25);
}
h1 span {
  color: #b5a7ff;
  font-weight: 300;
}
.intro-copy {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .5px;
}
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 0 16px;
}
.mode-row {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(198, 203, 255, .13);
  border-radius: 999px;
  background: rgba(8, 11, 29, .68);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, .2);
}
.mode-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 17px;
  background: transparent;
  color: rgba(222, 225, 255, .58);
  font-size: 11px;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.mode-button.active {
  color: white;
  background: linear-gradient(135deg, rgba(130, 111, 255, .9), rgba(91, 108, 211, .85));
  box-shadow: 0 3px 16px rgba(113, 99, 255, .28);
}
.action-row { display: flex; gap: 9px; }
.action-button {
  min-width: 112px;
  padding: 10px 15px;
  border: 1px solid rgba(196, 201, 255, .16);
  border-radius: 999px;
  background: rgba(17, 21, 48, .64);
  color: rgba(238, 239, 255, .88);
  font-size: 11px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform .2s, background .2s, border-color .2s;
}
.action-button span { margin-right: 5px; color: #c1b6ff; }
.action-button:active, .mode-button:active { transform: scale(.96); }
.action-button:hover { background: rgba(42, 44, 88, .72); border-color: rgba(186, 177, 255, .38); }
.action-button.subtle { min-width: 72px; color: rgba(218, 222, 255, .55); }
.hint {
  margin-top: 3px;
  color: rgba(207, 213, 255, .3);
  font-size: 8px;
  letter-spacing: 2.4px;
}
@keyframes appear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 520px) {
  .top-caption { display: none; }
  .intro { top: 18%; }
  .intro-copy { font-size: 11px; }
  .mode-row { width: min(100%, 390px); justify-content: space-between; gap: 0; }
  .mode-button { padding: 10px 11px; font-size: 10px; }
  .action-button { min-width: 0; padding: 10px 13px; }
}
@media (max-height: 650px) {
  .intro { top: 13%; }
  .controls { bottom: 18px; gap: 9px; }
  h1 { font-size: clamp(32px, 5vw, 48px); }
}
