:root {
  --bg: #14061f;
  --pink: #ff4fa3;
  --pink-soft: #ff9fd0;
  --rose: #ffd1ea;
  --violet: #a855f7;
  --text: #fff5fb;
  --muted: rgba(255, 236, 248, .74);
  --glass: rgba(255, 255, 255, .08);
  --glass-brd: rgba(255, 255, 255, .16);
  --sheet-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(130% 80% at 50% 0%, #3d1259 0%, #1f0a30 55%, #12061c 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Arka plan ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; opacity: .55; animation: drift 16s ease-in-out infinite alternate; }
.b1 { width: 70vmax; height: 70vmax; top: -30vmax; left: -30vmax; background: radial-gradient(closest-side, rgba(255, 61, 154, .55), transparent); }
.b2 { width: 60vmax; height: 60vmax; top: 10vh; right: -30vmax; background: radial-gradient(closest-side, rgba(139, 92, 246, .55), transparent); animation-duration: 20s; }
.b3 { width: 60vmax; height: 60vmax; bottom: -35vmax; left: -10vmax; background: radial-gradient(closest-side, rgba(255, 122, 195, .4), transparent); animation-duration: 24s; }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.15); } }

.floating-hearts span { position: absolute; bottom: -40px; animation: rise linear infinite; will-change: transform; }
@keyframes rise {
  0% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(18px, -55vh) rotate(12deg); }
  100% { transform: translate(-12px, -115vh) rotate(-8deg); }
}

/* ---------- Sayfa ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: max(26px, env(safe-area-inset-top)) 20px calc(var(--sheet-h) + 28px);
  transition: padding-bottom .5s ease;
}

.intro { text-align: center; }
.kicker {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: clamp(22px, 6.2vw, 30px);
  color: var(--pink-soft);
}
h1 {
  font-weight: 900;
  font-size: clamp(31px, 9vw, 48px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: .2em 0 .45em;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(90deg, #ff7ac3, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: clamp(15.5px, 4.3vw, 18px);
  line-height: 1.55;
  text-wrap: pretty;
}
.lead strong { color: var(--rose); font-weight: 800; }

/* ---------- Sahne ---------- */
.stage {
  position: relative;
  height: clamp(320px, 52vh, 640px);
  height: clamp(320px, 52svh, 640px);
  margin: 14px -20px 0;
  outline: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><text x='50%' y='56%' dominant-baseline='middle' text-anchor='middle' font-size='36'>👊</text></svg>") 24 24, pointer;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; transition: opacity .7s ease; }
.spot {
  position: absolute;
  inset: 6% 8% 6%;
  background: radial-gradient(closest-side, rgba(255, 105, 180, .42), rgba(168, 85, 247, .16) 62%, transparent 100%);
  animation: glow 4s ease-in-out infinite alternate;
}
@keyframes glow { to { opacity: .7; transform: scale(1.05); } }
.floor {
  position: absolute;
  left: 50%;
  bottom: 3%;
  width: 62%;
  height: 34px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 79, 163, .35), rgba(20, 6, 31, .4) 55%, transparent);
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4fa3, #c13dff);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(255, 79, 163, .45);
  pointer-events: none;
  animation: bob 1.6s ease-in-out infinite;
  transition: opacity .4s, transform .4s;
}
.hint.gone { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.9); }
.ping { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: ping 1.4s infinite; }
@keyframes bob { 50% { translate: 0 -6px; } }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
  100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

.bubble {
  position: absolute;
  top: 4%;
  right: 5%;
  z-index: 2;
  max-width: min(46%, 230px);
  padding: 10px 14px;
  border-radius: 18px 18px 18px 5px;
  background: #fff;
  color: #3b0a57;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  transform-origin: bottom left;
  opacity: 0;
  pointer-events: none;
}
.bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 0;
  border-width: 0 0 12px 12px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
}

.fallback-img {
  position: absolute;
  inset: 4% 6% 3%;
  width: 88%;
  height: 93%;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
}
.fallback-img.ph { display: grid; place-items: center; font-size: 140px; }

/* ---------- Skor ---------- */
.stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.count { display: flex; align-items: baseline; gap: 6px; font-size: 20px; }
.count b { display: inline-block; min-width: 1ch; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.count small { font-size: 14px; color: var(--muted); font-weight: 700; }
.meter { flex: 1; min-width: 0; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
.meter-top b { color: var(--text); white-space: nowrap; }
.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3d6e, #ff4fa3 55%, #c084fc);
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Butonlar ---------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  font: 900 18px/1 'Nunito', system-ui, sans-serif;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.yes {
  background: linear-gradient(135deg, #ff4fa3, var(--violet));
  box-shadow: 0 10px 30px rgba(255, 79, 163, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  scale: var(--grow, 1);
  transition: scale .4s cubic-bezier(.2, 1.4, .3, 1);
  animation: beat 1.6s ease-in-out infinite;
}
.yes:active { filter: brightness(.92); }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.07); }
  24% { transform: scale(1); }
  36% { transform: scale(1.04); }
}
.no {
  padding: 15px 24px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  color: var(--text);
  white-space: nowrap;
}
.no.roaming {
  position: fixed;
  z-index: 45;
  background: rgba(40, 14, 60, .88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: left .24s cubic-bezier(.2, .9, .25, 1.2), top .24s cubic-bezier(.2, .9, .25, 1.2);
}

/* ---------- Soru paneli ---------- */
.sheet {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  width: min(520px, calc(100% - 24px));
  padding: 18px 18px 14px;
  border-radius: 28px;
  text-align: center;
  background: rgba(40, 13, 60, .8);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 79, 163, .12);
  transform: translate(-50%, 160%);
  transition: transform .65s cubic-bezier(.2, 1.15, .3, 1);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet-q { font-size: 21px; font-weight: 900; margin-bottom: 14px; }
.choices { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 60px; }
.sheet-note { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }

.reopen {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  translate: -50% 0;
  padding: 14px 22px;
  font-size: 16px;
  white-space: nowrap;
}

/* ---------- Efektler ---------- */
.fx { position: fixed; inset: 0; z-index: 65; overflow: hidden; pointer-events: none; }
.fx > * { position: absolute; will-change: transform, opacity; }
.fx .fist { font-size: clamp(66px, 19vw, 100px); line-height: 1; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .35)); }
.fx .pow { width: 150px; height: 150px; display: grid; place-items: center; }
.fx .pow svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx .pow span {
  position: relative;
  font-family: 'Bangers', Impact, sans-serif;
  font-size: 36px;
  letter-spacing: .04em;
  color: #3b0a57;
  rotate: -8deg;
  white-space: nowrap;
  text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}
.fx .pow.combo span { font-size: 28px; }
.fx .particle { font-size: 22px; line-height: 1; }
.fx .flash { inset: 0; }

/* ---------- Mektup ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(90% 60% at 50% 30%, rgba(120, 30, 110, .55), rgba(16, 5, 26, .9));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .5s ease;
}
.overlay[hidden] { display: none; }
.overlay.show { opacity: 1; }
.letter {
  margin: auto;
  width: min(440px, 100%);
  padding: 30px 24px 22px;
  border-radius: 32px;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transform: translateY(24px) scale(.95);
  transition: transform .7s cubic-bezier(.2, 1.2, .3, 1);
}
.overlay.show .letter { transform: none; }
.big-heart { font-size: 64px; line-height: 1; animation: beat 1.4s ease-in-out infinite; filter: drop-shadow(0 8px 24px rgba(255, 79, 163, .6)); }
.letter h2 {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: clamp(48px, 14vw, 62px);
  line-height: 1.1;
  margin: 8px 0 14px;
  background: linear-gradient(90deg, #ffb3dc, #ff4fa3, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.q { margin-top: 14px; font-size: 17px; font-weight: 700; color: var(--muted); }
.a { margin-top: 4px; font-size: 25px; font-weight: 900; }
.a em { font-style: normal; color: var(--pink-soft); }
.closing { margin: 24px 0 20px; font-size: 16px; line-height: 1.5; color: var(--rose); }
.wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 16px 22px;
  font-size: 17px;
  white-space: nowrap;
  text-decoration: none;
  background: linear-gradient(135deg, #2bd46a, #0f9e7a);
  box-shadow: 0 12px 30px rgba(37, 211, 102, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.wa svg { width: 22px; height: 22px; }
.wa-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.link {
  margin-top: 16px;
  padding: 6px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 700 14px 'Nunito', system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reveal { opacity: 0; transform: translateY(10px); }
.overlay.show .reveal { animation: fadeUp .7s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) forwards; }
.overlay.skip .reveal { animation-delay: 0s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------- Diğer ---------- */
.sound {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 70;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 18px;
  cursor: pointer;
}
.noscript { position: fixed; inset: auto 0 20px; text-align: center; z-index: 80; }

@media (min-width: 720px) {
  main { padding-top: 48px; }
  .stage { margin-inline: -60px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .floating-hearts span, .spot { animation: none; }
}
