:root {
  color-scheme: dark;
  --ink: #08090f;
  --panel: rgba(14, 18, 30, 0.66);
  --panel-strong: rgba(18, 24, 39, 0.86);
  --text: #f7f2e8;
  --muted: #aeb8cb;
  --line: rgba(255, 255, 255, 0.18);
  --cyan: #40d8c7;
  --gold: #f0b95b;
  --coral: #ff6b5e;
  --violet: #8d7cff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 20% 20%, #17313a 0, transparent 32%),
    radial-gradient(circle at 80% 10%, #3a2336 0, transparent 30%),
    linear-gradient(135deg, #070910 0%, #101827 42%, #17100c 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

#cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 82%);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 54px);
  color: rgba(247, 242, 232, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 22px rgba(64, 216, 199, 0.24);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  font-size: 14px;
}

nav a {
  color: rgba(247, 242, 232, 0.74);
}

nav a:hover {
  color: #fff;
}

main {
  position: relative;
  z-index: 2;
}

.stage {
  display: grid;
  width: min(1220px, calc(100% - 36px));
  min-height: 100svh;
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 0.84fr);
  gap: clamp(26px, 6vw, 74px);
  align-items: center;
  padding: 112px 0 58px;
}

.stage-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.95;
}

.stage-copy p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(247, 242, 232, 0.75);
  font-size: clamp(17px, 2vw, 21px);
}

.oracle-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(20px, 4vw, 34px);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 180ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.oracle-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(64, 216, 199, 0.16) 28%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 780ms ease;
}

.oracle-card.revealing {
  border-color: rgba(240, 185, 91, 0.62);
  box-shadow: 0 34px 100px rgba(255, 107, 94, 0.18), var(--shadow);
}

.oracle-card.revealing::before {
  transform: translateX(120%);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.prediction-shell {
  min-height: 318px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: clamp(18px, 4vw, 28px);
  background: rgba(8, 9, 15, 0.38);
  transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.prediction-shell.switching {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(16px) scale(0.98);
}

.label {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

#predictionText {
  min-height: 142px;
  margin-bottom: 26px;
  color: var(--text);
  font-size: clamp(27px, 4.6vw, 44px);
  line-height: 1.08;
}

.wish-label {
  color: var(--gold);
}

.wish-text {
  margin-bottom: 0;
  color: rgba(247, 242, 232, 0.78);
  font-size: 18px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-top: 18px;
}

.button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--coral), #c7449d 48%, var(--violet));
}

.button.secondary {
  border-color: rgba(64, 216, 199, 0.34);
  background: rgba(64, 216, 199, 0.12);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.progress-wrap {
  height: 8px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-wrap span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--coral));
  transition: width 420ms ease;
}

.info-band {
  display: grid;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 52px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-band article {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.info-band span {
  color: var(--gold);
  font-weight: 900;
}

.info-band h3 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.info-band p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar {
    position: absolute;
  }

  .stage {
    grid-template-columns: 1fr;
    padding-top: 104px;
  }

  .stage-copy {
    max-width: 760px;
  }

  .oracle-card {
    transform: none;
  }

  .info-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .brand small {
    display: none;
  }

  nav {
    gap: 12px;
    font-size: 13px;
  }

  h1 {
    font-size: 44px;
  }

  .stage {
    width: min(100% - 24px, 520px);
    padding-top: 96px;
  }

  .card-topline,
  .actions {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  #predictionText {
    min-height: 196px;
    font-size: 28px;
  }
}
