:root {
  --pembe: #ffd9e8;
  --lila: #e7ddff;
  --krem: #fff4e6;
  --nane: #d8f4ea;
  --vurgu: #ff6f9f;
  --vurgu-koyu: #e04f82;
  --murdum: #3b2b3f;
  --yazi: #47324d;
  --beyaz: #fffdfb;
  --ten: #e49c62;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--yazi);
  background: linear-gradient(160deg, var(--pembe) 0%, var(--lila) 45%, var(--krem) 80%, var(--nane) 100%) fixed;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Arka planda süzülen kalpler */
.arka-kalpler { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.arka-kalpler span {
  position: absolute; bottom: -40px; opacity: .45;
  animation: suzul linear infinite;
}
@keyframes suzul {
  from { transform: translateY(0) rotate(-10deg); }
  50%  { transform: translateY(-55vh) translateX(18px) rotate(10deg); }
  to   { transform: translateY(-110vh) rotate(-10deg); }
}

.logo {
  position: relative; z-index: 2;
  text-align: center;
  font-family: "Baloo 2", cursive; font-weight: 800;
  font-size: 1.35rem; letter-spacing: .02em;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
  color: var(--murdum);
}
.logo-kalp { color: var(--vurgu); display: inline-block; animation: atis 1.2s ease-in-out infinite; }
@keyframes atis { 0%,100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }

.ekran {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
}
[hidden] { display: none !important; }

/* İlerleme noktaları */
.ilerleme { display: flex; gap: 8px; min-height: 14px; }
.ilerleme i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2.5px solid var(--murdum); background: var(--beyaz);
  transition: background .3s, transform .3s;
}
.ilerleme i.aktif { background: var(--vurgu); transform: scale(1.2); }
.ilerleme i.tamam { background: var(--murdum); }

/* Konuşma balonu */
.balon {
  position: relative;
  width: 100%;
  background: var(--beyaz);
  border: 3px solid var(--murdum);
  border-radius: 22px;
  padding: 20px 18px 16px;
  box-shadow: 0 6px 0 var(--murdum);
  min-height: 108px;
  cursor: pointer;
}
.balon::after {
  content: ""; position: absolute; left: 50%; bottom: -19px;
  width: 26px; height: 26px; background: var(--beyaz);
  border-right: 3px solid var(--murdum); border-bottom: 3px solid var(--murdum);
  transform: translateX(-50%) rotate(45deg);
  border-bottom-right-radius: 4px;
}
.konusan {
  position: absolute; top: -15px; left: 16px;
  background: var(--vurgu); color: #fff;
  font-family: "Baloo 2", cursive; font-weight: 800; font-size: .95rem;
  padding: 1px 14px; border-radius: 999px;
  border: 3px solid var(--murdum);
}
#metin {
  margin: 0;
  font-family: "Baloo 2", cursive; font-weight: 600;
  font-size: 1.22rem; line-height: 1.35;
  white-space: pre-line;
  min-height: 1.35em;
}
#metin .soru-on { display: block; color: var(--vurgu-koyu); font-weight: 800; font-size: 1rem; }
.imlec { display: inline-block; width: 2px; height: 1.1em; background: var(--yazi); vertical-align: -2px; margin-left: 2px; animation: yanip 0.7s steps(1) infinite; }
@keyframes yanip { 50% { opacity: 0; } }

/* Karakterler */
.karakterler {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; margin-top: 14px;
}
.can-kutu { position: relative; }
.can-kutu:has(.kalp-eller:not([hidden])) { margin-bottom: 20px; }
.karakter {
  display: block;
  height: min(32dvh, 270px); width: auto;
  filter: drop-shadow(0 6px 0 rgba(59, 43, 63, .18));
  user-select: none; -webkit-user-drag: none;
}
.karakter.zipla { animation: zipla .45s ease; }
@keyframes zipla { 0% { transform: translateY(0); } 40% { transform: translateY(-14px) scale(1.03); } 100% { transform: translateY(0); } }
.karakter.salla { animation: salla .5s ease; }
@keyframes salla { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px) rotate(-3deg); } 40% { transform: translateX(9px) rotate(3deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.karakter.elif { height: min(27dvh, 230px); }

/* Eliyle kalp */
.kalp-eller {
  position: absolute; left: 50%; bottom: -7%;
  width: 64%; transform: translateX(-50%);
  overflow: visible;
  animation: eller-gel .6s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes eller-gel { from { transform: translate(-50%, 40%) scale(.6); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
.kalp-eller path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.kalp-eller .kalp-ic { fill: var(--vurgu); stroke: none; transform-origin: 100px 95px; animation: atis 1.2s ease-in-out infinite; }
.kalp-eller .kol path { stroke: var(--murdum); stroke-width: 34; }
.kalp-eller .el path { stroke: var(--murdum); stroke-width: 27; }
.kalp-eller .kol-ic path, .kalp-eller .el-ic path { stroke: var(--ten); }
.kalp-eller .kol-ic path { stroke-width: 27; }
.kalp-eller .el-ic path { stroke-width: 20; }
.kalp-eller .parmak path { stroke: var(--murdum); stroke-width: 2.6; }

/* Butonlar */
.secenekler {
  width: 100%;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 60px;
}
.buton {
  font-family: "Baloo 2", cursive; font-weight: 700; font-size: 1.2rem;
  color: var(--murdum);
  background: var(--beyaz);
  border: 3px solid var(--murdum);
  border-radius: 16px;
  padding: 11px 18px;
  box-shadow: 0 5px 0 var(--murdum);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .2s;
  touch-action: manipulation;
  animation: belir .35s ease both;
}
.buton:nth-child(2) { animation-delay: .08s; }
@keyframes belir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.buton:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--murdum); }
.buton.ana { background: var(--vurgu); color: #fff; }
.buton.dogru { background: #9be3c3; }
.buton.yanlis { background: #ffb3b3; }
.buton:disabled { cursor: default; }
.buton.kucuk { font-size: 1rem; padding: 7px 16px; }

/* Kaçan buton */
.buton.kacak {
  position: fixed; z-index: 20; margin: 0;
  width: max-content; white-space: nowrap;
  animation: none;
  transition: left .32s cubic-bezier(.3, 1.4, .5, 1), top .32s cubic-bezier(.3, 1.4, .5, 1);
}
.yer-tutucu { visibility: hidden; }

/* Kalp yağmuru */
.ucan-kalp {
  position: fixed; z-index: 30; pointer-events: none;
  animation: patla 1.6s ease-out forwards;
}
@keyframes patla {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--r)); opacity: 0; }
}
.yagan-kalp {
  position: fixed; top: -40px; z-index: 30; pointer-events: none;
  animation: yag linear forwards;
}
@keyframes yag { to { transform: translateY(110vh) rotate(260deg); } }

/* Film ekranı */
.film { max-width: 900px; gap: 14px; }
.film-baslik {
  margin: 0;
  font-family: "Baloo 2", cursive; font-weight: 800; font-size: 1.6rem;
  color: var(--murdum);
}
.video-cerceve {
  width: 100%;
  border: 4px solid var(--murdum);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 7px 0 var(--murdum);
  background: #000;
}
.video-cerceve video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.ipucu { margin: 0; font-weight: 700; font-size: .95rem; opacity: .8; text-align: center; }

/* Telefon yan çevrilince video tüm ekranı kaplasın */
@media (orientation: landscape) and (max-height: 520px) {
  .film { padding: 6px; min-height: 100dvh; }
  .film .film-baslik, .film .ipucu, .film #finale-gec { display: none; }
  .film .video-cerceve { border-width: 3px; box-shadow: none; width: auto; height: calc(100dvh - 12px); aspect-ratio: 16 / 9; }
  .film .video-cerceve video { height: 100%; width: 100%; }

  #diyalog .karakter { height: 34dvh; }
  #diyalog .secenekler { flex-direction: row; }
  #diyalog .secenekler .buton { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
