:root {
  --ink: #07152f;
  --berry: #1c5d91;
  --pink: #163f6d;
  --peach: #0b2345;
  --cream: #d9edff;
  --shadow: #102f59;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #081a35;
  font-family: "VT323", monospace;
}

.scene {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 42px 20px 28px;
  background: linear-gradient(180deg, #08152e 0%, #0b2b50 66%, #071a37 100%);
}

.scene::before, .scene::after {
  position: absolute;
  content: "·  ·  ·  ·  ·  ·  ·";
  color: rgba(176, 222, 255, .55);
  font: 17px/1 "VT323", monospace;
  letter-spacing: 9px;
}
.scene::before { top: 9%; left: 7%; transform: rotate(-8deg); }
.scene::after { right: 5%; bottom: 18%; transform: rotate(7deg); }

.sky-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: #174a78; opacity: .48; filter: blur(4px); }
.cloud { position: absolute; width: 115px; height: 23px; border: 4px solid rgba(135,211,255,.38); border-radius: 2px; opacity: .8; }
.cloud::before, .cloud::after { position: absolute; content: ""; bottom: 0; border: 4px solid rgba(135,211,255,.38); border-bottom: 0; border-radius: 50% 50% 0 0; }
.cloud::before { left: 16px; width: 24px; height: 19px; }
.cloud::after { left: 50px; width: 34px; height: 28px; }
.cloud-left { top: 18%; left: 4%; }
.cloud-right { top: 27%; right: 3%; transform: scale(.7); }

.love-card {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  padding: 31px 28px 27px;
  text-align: center;
  background: var(--cream);
  border: 7px solid var(--berry);
  box-shadow: 0 0 0 5px var(--cream), 12px 14px 0 5px var(--shadow);
}
.card-topline { display: flex; justify-content: space-between; color: var(--berry); font: 11px "Press Start 2P", monospace; letter-spacing: -1px; }
.eyebrow { margin: 18px 0 12px; font-size: 23px; letter-spacing: 2px; color: #6ea8d3; }
h1 { margin: 0; color: #58b8ed; font: clamp(32px, 8vw, 50px)/1.2 "Press Start 2P", monospace; text-shadow: 4px 4px 0 #12355e; }
.question { margin: 16px 0 22px; font-size: clamp(30px, 7vw, 40px); line-height: .95; }
.question em { color: #64c7f5; font-style: normal; }
.divider { display: flex; justify-content: center; gap: 15px; margin: 18px 0 1px; color: #4e8fbd; font-size: 22px; }

.pixel-signal { display: flex; justify-content: center; gap: 7px; margin: 22px auto 0; filter: drop-shadow(3px 4px 0 #0b426b); }
.pixel-signal i { width: 12px; height: 12px; background: var(--berry); }
.pixel-signal i:nth-child(2), .pixel-signal i:nth-child(4) { margin-top: 12px; }
.pixel-signal i:nth-child(3) { margin-top: 24px; }

.actions { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.choice-button { min-width: 164px; padding: 15px 12px 13px; cursor: pointer; color: #d9f4ff; background: var(--berry); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); font: 11px "Press Start 2P", monospace; transition: transform .12s, box-shadow .12s, background .12s; }
.choice-button:hover, .choice-button:focus-visible { background: #c25b80; transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); outline: none; }
.choice-button.selected { background: #7d405b; }
.hint { margin: 19px 0 0; color: #75afd0; font-size: 21px; }
.signature { position: absolute; z-index: 2; bottom: 27px; display: flex; align-items: center; gap: 10px; color: #75afd0; font-size: 20px; text-align: center; }
.sparkle { color: var(--berry); }

.anonymous-face { display: none; }
.love-card.result-active > *:not(.anonymous-face) { display: none; }
.love-card.result-active { padding: 28px; background: #071a35; border-color: #2f9bd0; box-shadow: 0 0 0 5px #071a35, 12px 14px 0 5px #09284a; }
.love-card.result-active .anonymous-face { display: block; }
.anonymous-face svg { display: block; width: min(100%, 360px); margin: 0 auto 14px; image-rendering: pixelated; }
.mask-outline { fill: #112d52; }
.mask-shadow { fill: #2b78a8; }
.mask-light { fill: #bfe9ff; }
.brow, .eye, .nose, .smile, .mustache, .goatee { fill: #071a35; }
.cheek { fill: #4d9cc4; }
.anonymous-face span { display: block; color: #65d6ff; font: 14px/1.15 "VT323", monospace; text-shadow: 2px 0 #ff176f; }
.phishing-message { max-width: 440px; margin: 0 auto; }

/* Cyberpunk-style failure state, enabled after either answer is chosen. */
.scene.glitch-active {
  animation: scene-glitch 1.8s steps(2, end) infinite;
  isolation: isolate;
}

.scene.glitch-active::before,
.scene.glitch-active::after {
  z-index: 4;
  pointer-events: none;
}

.scene.glitch-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, .07) 0,
    rgba(255, 255, 255, .07) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: overlay;
  animation: scanlines .18s steps(2, end) infinite;
}

.scene.glitch-active::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(0, 240, 255, .16) 14.2% 14.8%, transparent 15%),
    linear-gradient(90deg, transparent 0 71%, rgba(255, 0, 102, .18) 71.2% 71.8%, transparent 72%);
  mix-blend-mode: screen;
  animation: glitch-slices .7s steps(2, end) infinite;
}

.glitch-active .love-card {
  animation: card-glitch .42s steps(2, end) infinite;
  filter: drop-shadow(-5px 0 rgba(0, 240, 255, .75)) drop-shadow(5px 0 rgba(255, 0, 102, .7));
}

.glitch-active #message {
  position: relative;
  animation: text-glitch .32s steps(2, end) infinite;
  text-shadow: 4px 4px 0 #f6b5a7, -3px 0 rgba(0, 240, 255, .85), 3px 0 rgba(255, 0, 102, .8);
}

.glitch-active .cloud,
.glitch-active .sky-glow,
.glitch-active .signature {
  animation: ambient-glitch .65s steps(2, end) infinite;
}

@keyframes scene-glitch {
  0%, 18%, 100% { transform: translate(0); filter: none; }
  20% { transform: translate(-3px, 1px); filter: hue-rotate(25deg) saturate(1.4); }
  22% { transform: translate(4px, -2px); }
  24% { transform: translate(0); }
  68% { filter: contrast(1.2) hue-rotate(-20deg); }
  70% { transform: translate(2px, 0); }
}

@keyframes scanlines {
  from { transform: translateY(-8px); }
  to { transform: translateY(8px); }
}

@keyframes glitch-slices {
  0%, 100% { transform: translate(0); clip-path: inset(0); }
  18% { transform: translate(-12px, 4px); clip-path: inset(12% 0 72% 0); }
  20% { transform: translate(10px, -5px); clip-path: inset(58% 0 26% 0); }
  48% { transform: translate(7px, 0); clip-path: inset(35% 0 48% 0); }
  50% { transform: translate(0); clip-path: inset(0); }
}

@keyframes card-glitch {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-4px, 1px) skewX(-1deg); }
  27% { transform: translate(5px, -2px) skewX(2deg); }
  45% { transform: translate(0); }
  78% { transform: translate(2px, 1px); }
}

@keyframes text-glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(3px, 0); }
  22% { transform: translate(-4px, 1px); }
  52% { transform: translate(0); }
  74% { transform: translate(-2px, -1px); }
}

@keyframes ambient-glitch {
  0%, 100% { transform: translate(0); opacity: .8; }
  30% { transform: translate(5px, -2px); opacity: .55; }
  32% { transform: translate(-4px, 1px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scene.glitch-active,
  .glitch-active .love-card,
  .glitch-active #message,
  .glitch-active .cloud,
  .glitch-active .sky-glow,
  .glitch-active .signature,
  .scene.glitch-active::before,
  .scene.glitch-active::after { animation: none; }
}

@media (max-width: 520px) { .scene { padding: 28px 16px 85px; } .love-card { padding: 25px 17px 23px; } .card-topline { font-size: 8px; } .choice-button { width: 100%; } .signature { width: 100%; justify-content: center; font-size: 17px; } .cloud { display: none; } }
