:root {
  --bg: #0c0a10;
  --card: #131018;
  --edge: #26202f;
  --text: #f7f7f7;
  --dim: #9a93a8;
  --purple-deep: #2f045a;
  --purple: #48118b;
  --purple-hot: #7b2ff2;
  --cta: #f2573c;
  --cta-dark: #e54d36;
  --green: #00d977;
  --green-bright: #62f98d;
  --red: #e8392f;
  --blue: #007aff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Potion-style purple hero glow + grain */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 55% at 50% -8%, var(--purple) 0%, var(--purple-deep) 42%, transparent 72%);
}
.bg-grid::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.wrap { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 56px 20px 80px; }

header { text-align: center; margin-bottom: 40px; }
.bull-logo {
  width: 110px; height: auto;
  animation: stomp 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 24px rgba(0, 217, 119, 0.45));
}
@keyframes stomp {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-8px); }
}
.trusted { color: var(--dim); font-size: 15px; margin-top: 14px; letter-spacing: 0.2px; }
h1 {
  font-family: "Archivo Black", "Inter", sans-serif;
  font-size: 64px; line-height: 1.02; letter-spacing: -1px;
  text-transform: uppercase; margin-top: 6px;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
h1 .dot { color: var(--cta); }
.tag { color: #cfc8de; margin-top: 14px; font-size: 17px; }
.tag b { color: #fff; }
.ticker {
  display: inline-block; margin-top: 18px; padding: 8px 18px;
  background: rgba(12, 10, 16, 0.72); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; font-size: 13px; color: var(--dim);
  font-variant-numeric: tabular-nums; backdrop-filter: blur(6px);
}
.ticker b { color: var(--green); }

.input-card {
  background: rgba(12, 10, 16, 0.82); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px; padding: 26px; backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.input-card label {
  display: block; font-size: 13px; color: var(--dim); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 1.6px; font-weight: 600;
}
.input-row { display: flex; gap: 10px; }
input {
  flex: 1; background: #0a080e; border: 1px solid var(--edge); color: var(--text);
  border-radius: 10px; padding: 14px 16px; font-size: 15px; font-family: ui-monospace, monospace;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus { border-color: var(--purple-hot); box-shadow: 0 0 0 3px rgba(123, 47, 242, 0.25); }
button {
  background: linear-gradient(180deg, var(--cta) 0%, var(--cta-dark) 100%);
  color: #fff; border: 0; border-radius: 999px;
  padding: 14px 26px; font-size: 14px; font-weight: 800; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.8px;
  box-shadow: 0 6px 22px rgba(242, 87, 60, 0.35);
  transition: transform 0.1s, filter 0.2s;
}
button:hover { filter: brightness(1.1); transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: wait; transform: none; }
button.ghost {
  background: transparent; border: 1px solid var(--edge); color: var(--dim);
  font-weight: 600; box-shadow: none;
}
.hint { margin-top: 10px; font-size: 13px; color: var(--cta); min-height: 18px; }

.result {
  position: relative;
  margin-top: 30px; background: var(--card); border: 1px solid var(--edge);
  border-radius: 20px; padding: 40px 28px; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: slam 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.theme-picker {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-top: 14px;
}
.theme-chip {
  background: #0a080e; border: 1px solid var(--edge); color: var(--dim);
  border-radius: 999px; padding: 8px 16px; font-size: 12px; font-weight: 700;
  letter-spacing: 1.2px; cursor: pointer; box-shadow: none;
  font-family: "Oswald", "Inter", sans-serif; text-transform: uppercase;
}
.theme-chip:hover { filter: none; transform: translateY(-1px); color: var(--text); }
.theme-chip.active {
  border-color: var(--purple-hot); color: #fff;
  background: rgba(123, 47, 242, 0.18);
  box-shadow: 0 0 16px rgba(123, 47, 242, 0.25);
}
@keyframes slam {
  from { transform: scale(0.6) rotate(-3deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.hidden { display: none !important; }

/* ---- scene ---- */
.scene { position: relative; height: 130px; font-size: 72px; margin-bottom: 10px; }
.scene .actor { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.scene .actor img {
  display: block; height: 125px; width: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
}
.scene .fx { position: absolute; font-size: 26px; top: -10px; animation: rain linear infinite; }
@keyframes rain {
  from { transform: translateY(-30px) rotate(0deg); opacity: 1; }
  to { transform: translateY(150px) rotate(340deg); opacity: 0; }
}
.actor.cry { animation: sob 0.8s ease-in-out infinite; }
@keyframes sob { 0%,100% { transform: translate(-50%,-50%) rotate(-4deg);} 50% { transform: translate(-52%,-46%) rotate(4deg);} }
.actor.run { animation: runaway 2.2s ease-in-out infinite; }
@keyframes runaway {
  0% { transform: translate(-160%, -50%) scaleX(-1); }
  49% { transform: translate(80%, -50%) scaleX(-1); }
  50% { transform: translate(80%, -50%) scaleX(1); }
  100% { transform: translate(-160%, -50%) scaleX(1); }
}
.actor.shine { animation: shine 1.6s ease-in-out infinite; filter: drop-shadow(0 0 18px var(--green)); }
@keyframes shine { 0%,100% { transform: translate(-50%,-50%) scale(1);} 50% { transform: translate(-50%,-50%) scale(1.12);} }
.actor.bench { animation: slump 3s ease-in-out infinite; }
@keyframes slump { 0%,100% { transform: translate(-50%,-46%);} 50% { transform: translate(-50%,-42%) rotate(2deg);} }
.actor.ghosted { opacity: 0.35; filter: grayscale(1); animation: fade 2.5s ease-in-out infinite; }
@keyframes fade { 0%,100% { opacity: 0.35; } 50% { opacity: 0.12; } }
.actor.quake { animation: quake 0.15s linear infinite; }
@keyframes quake {
  0% { transform: translate(-50%,-50%) translate(2px, 1px); }
  25% { transform: translate(-50%,-50%) translate(-2px, -1px); }
  50% { transform: translate(-50%,-50%) translate(1px, -2px); }
  75% { transform: translate(-50%,-50%) translate(-1px, 2px); }
  100% { transform: translate(-50%,-50%) translate(2px, 1px); }
}

.verdict-title {
  font-family: "Archivo Black", "Inter", sans-serif;
  font-size: 28px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--cta);
  text-shadow: 0 0 34px rgba(242, 87, 60, 0.35);
}
.verdict-title.good { color: var(--green); text-shadow: 0 0 34px rgba(0, 217, 119, 0.35); }
.verdict-title.gold { color: var(--green-bright); text-shadow: 0 0 34px rgba(98, 249, 141, 0.35); }

.missed { margin: 24px 0 6px; }
.missed-label {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 13px; letter-spacing: 3px; color: var(--dim); text-transform: uppercase;
}
.missed-amount {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 68px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--red); line-height: 1.15; letter-spacing: 0.5px;
}
.missed-amount.good { color: var(--green); }

.quote {
  margin: 18px auto 0; max-width: 500px; font-size: 17px; line-height: 1.55;
  color: #d9d3e6; font-style: italic;
}

.versus {
  display: flex; align-items: stretch; justify-content: center; gap: 14px;
  margin-top: 26px;
}
.vs-col {
  flex: 1; max-width: 220px; padding: 16px 14px; border-radius: 14px;
  background: #0a080e; border: 1px solid var(--edge);
}
.vs-col.winner {
  border-color: rgba(0, 217, 119, 0.5);
  box-shadow: 0 0 26px rgba(0, 217, 119, 0.12);
}
.vs-label {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 11px; letter-spacing: 1.8px; color: var(--dim);
}
.vs-amount {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 30px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums;
}
.vs-col .vs-amount { color: var(--red); }
.vs-col.winner .vs-amount { color: var(--green); }
.vs-sub { font-size: 11px; color: var(--dim); margin-top: 4px; font-style: italic; }
.vs-divider {
  align-self: center;
  font-family: "Archivo Black", sans-serif; font-size: 18px; color: var(--dim);
}
@media (max-width: 560px) {
  .versus { flex-direction: column; align-items: center; }
  .vs-col { max-width: none; width: 100%; }
}

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-top: 28px; text-align: left;
}
.stat {
  background: #0a080e; border: 1px solid var(--edge); border-radius: 12px; padding: 13px 15px;
}
.stat .k {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 11px; letter-spacing: 1.6px; color: var(--dim); text-transform: uppercase;
}
.stat .v { font-size: 17px; font-weight: 700; margin-top: 5px; font-variant-numeric: tabular-nums; }

.pnl-wrap { margin-top: 28px; }
.pnl-preview {
  width: 100%; max-width: 560px; border-radius: 14px;
  border: 1px solid rgba(123, 47, 242, 0.45);
  box-shadow: 0 18px 50px rgba(47, 4, 90, 0.5);
  transform: rotate(-1deg);
  transition: transform 0.2s;
}
.pnl-preview:hover { transform: rotate(0deg) scale(1.02); }

.actions { display: flex; gap: 10px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.demo-note { margin-top: 16px; font-size: 12px; color: var(--green-bright); }

.potion-plug {
  margin-top: 34px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 22px 26px; border-radius: 18px;
  background:
    radial-gradient(ellipse 130% 160% at 0% 0%, rgba(123, 47, 242, 0.35) 0%, transparent 55%),
    linear-gradient(120deg, #1b0836 0%, #0e0618 60%, #0c0a10 100%);
  border: 1px solid rgba(123, 47, 242, 0.4);
  box-shadow: 0 18px 50px rgba(47, 4, 90, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.plug-kicker {
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--green-bright);
}
.plug-title {
  font-family: "Archivo Black", "Inter", sans-serif;
  font-size: 22px; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.plug-title b { color: #b98aff; }
.plug-text p { margin-top: 6px; font-size: 13px; color: var(--dim); max-width: 340px; }
.plug-btn {
  flex-shrink: 0; text-decoration: none;
  background: linear-gradient(180deg, var(--cta) 0%, var(--cta-dark) 100%);
  color: #fff; border-radius: 999px; padding: 14px 26px;
  font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px;
  box-shadow: 0 6px 22px rgba(242, 87, 60, 0.35);
  transition: transform 0.1s, filter 0.2s;
}
.plug-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

@media (max-width: 560px) {
  .potion-plug { flex-direction: column; text-align: center; }
  .plug-text p { max-width: none; }
}

/* the guy who watched you sell — peeks from the corner */
#peeker {
  position: fixed; right: -230px; bottom: 0; z-index: 40;
  width: 220px; pointer-events: none;
  transition: right 0.6s cubic-bezier(0.2, 1.2, 0.4, 1);
}
#peeker.peek { right: -60px; }
#peeker.judging { right: -20px; animation: disappointed 2.4s ease-in-out infinite; }
#peeker img {
  display: block; width: 100%; border-radius: 18px 18px 0 0;
  border: 2px solid rgba(123, 47, 242, 0.6); border-bottom: 0;
  box-shadow: 0 -8px 40px rgba(0, 217, 119, 0.25);
  transform: rotate(-4deg) translateY(14px);
}
@keyframes disappointed {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}
.peeker-bubble {
  position: absolute; top: -46px; right: 60px; white-space: nowrap;
  background: #f7f7f7; color: #0c0a10; font-size: 13px; font-weight: 700;
  padding: 9px 14px; border-radius: 14px 14px 2px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s;
}
#peeker.peek .peeker-bubble, #peeker.judging .peeker-bubble { opacity: 1; transform: translateY(0); }

@media (max-width: 700px) {
  #peeker { width: 150px; }
  .peeker-bubble { font-size: 11px; right: 40px; }
}

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 80px);
  background: #1b0836; color: #fff; border: 1px solid rgba(123, 47, 242, 0.6);
  border-radius: 999px; padding: 12px 22px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); z-index: 50;
  opacity: 0; transition: transform 0.3s, opacity 0.3s; pointer-events: none;
  white-space: nowrap;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

footer { margin-top: 52px; text-align: center; color: var(--dim); font-size: 12px; line-height: 2; }
.ca { display: block; font-family: ui-monospace, monospace; font-size: 11px; word-break: break-all; }

@media (max-width: 560px) {
  h1 { font-size: 42px; }
  .missed-amount { font-size: 48px; }
  .input-row { flex-direction: column; }
}
