/* Düzen: çizgili pembe zemin üstünde mavi kenarlı, dikişli kâğıt. Her ekran dokunarak açılan bir oyuncak.
   Tek görünüm: kâğıt her temada aynı kalır. */
:root {
  --pembe: #f0d5db;
  --pembe-koyu: #e2aeb9;
  --beyazimsi: #fbf3f3;
  --kagit: #f8f2e6;
  --sari: #f2dfb7;
  --mavi: #c9dcef;
  --gul: #ad4f5f;
  --lacivert: #2b4170;
  --soluk: #566585;
  --gri-koyu: #2a2b31;
  --gri: #484a53;
  --sunger: #e8c594;
  --krema: #fff8ee;
  --golge: rgba(43, 65, 112, 0.2);
  --baslik: "DM Serif Display", Georgia, serif;
  --el: "Caveat", "Segoe Script", cursive;
  --metin: "Nunito", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  min-height: 100%;
}
body {
  background: repeating-linear-gradient(0deg, var(--pembe) 0 13px, var(--beyazimsi) 13px 26px);
  color: var(--lacivert);
  font-family: var(--metin);
  font-size: 16px;
  line-height: 1.5;
  padding-block: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.cerceve {
  position: relative;
  max-width: 460px;
  min-height: calc(100vh - 32px);
  margin: 0 auto;
  padding: 44px 22px 84px;
  background: var(--kagit);
  border: 5px solid var(--mavi);
  box-shadow: 0 8px 24px var(--golge);
}
.cerceve::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed var(--pembe-koyu);
  pointer-events: none;
}
.pul {
  position: absolute;
  top: -8px;
  z-index: 2;
  width: 48px;
  height: 44px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 4px var(--golge);
}
.pul img {
  width: 26px;
  height: 26px;
}
.pul.sol {
  left: -7px;
  background: var(--pembe-koyu);
  transform: rotate(-9deg);
}
.pul.sag {
  right: -6px;
  background: var(--sari);
  transform: rotate(8deg);
}
.sayfa {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: gel 0.4s ease-out;
}
@keyframes gel {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.etiket {
  align-self: center;
  padding: 3px 14px;
  background: var(--mavi);
  color: var(--lacivert);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 2px dashed var(--kagit);
  outline: 2px solid var(--mavi);
}
h2 {
  margin: 0;
  text-align: center;
  font: 400 36px/1.08 var(--baslik);
  color: var(--gul);
  text-wrap: balance;
  outline: none;
}
h2 em {
  display: block;
  font: 700 36px/1.1 var(--el);
  color: var(--lacivert);
}
p {
  margin: 0;
}
.not {
  font-family: var(--el);
  font-size: 22px;
  line-height: 1.2;
  color: var(--soluk);
  text-align: center;
  min-height: 26px;
}
.kurdele {
  align-self: stretch;
  padding: 10px 12px;
  text-align: center;
  border: 2px dashed var(--gul);
  background: var(--krema);
  font: 700 25px/1.15 var(--el);
  color: var(--lacivert);
  transform: rotate(-1deg);
}
.buton {
  align-self: center;
  min-height: 50px;
  padding: 10px 24px;
  border: 2px dashed var(--kagit);
  background: var(--mavi);
  color: var(--lacivert);
  outline: 2px solid var(--mavi);
  font: 800 16px var(--metin);
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--pembe-koyu);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
.buton:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--pembe-koyu);
}
.buton.ikincil {
  background: var(--krema);
  border-color: var(--gul);
  outline-color: transparent;
  color: var(--gul);
}
:focus-visible {
  outline: 3px solid var(--gul) !important;
  outline-offset: 2px;
}
.noktalar {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--krema);
  box-shadow: 0 2px 6px var(--golge);
}
.noktalar a {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}
.noktalar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mavi);
  transition:
    transform 0.2s,
    background 0.2s;
}
.noktalar a.aktif i {
  background: var(--lacivert);
  transform: scale(1.3);
}
#muzik-dugme {
  position: fixed;
  z-index: 6;
  right: max(24px, calc(env(safe-area-inset-right, 0px) + 12px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--lacivert);
  color: var(--krema);
  font: 800 20px var(--metin);
  cursor: pointer;
  box-shadow: 0 4px 10px var(--golge);
}
#konfeti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* 1. Hediye */
.hediye {
  position: relative;
  display: block;
  width: min(100%, 270px);
  height: 330px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.h-govde,
.h-kapak,
.h-not {
  position: absolute;
  left: 0;
  right: 0;
}
.h-govde {
  top: 150px;
  height: 170px;
  left: 14px;
  right: 14px;
  z-index: 3;
  background:
    linear-gradient(
      90deg,
      transparent calc(50% - 15px),
      var(--mavi) calc(50% - 15px),
      var(--mavi) calc(50% + 15px),
      transparent calc(50% + 15px)
    ),
    radial-gradient(circle, var(--krema) 2px, transparent 3px) 0 0 / 22px 22px,
    var(--pembe-koyu);
  border: 3px solid var(--gul);
  box-shadow: 0 12px 16px var(--golge);
}
.h-kapak {
  top: 110px;
  height: 44px;
  z-index: 4;
  background: linear-gradient(
      90deg,
      transparent calc(50% - 15px),
      var(--mavi) calc(50% - 15px),
      var(--mavi) calc(50% + 15px),
      transparent calc(50% + 15px)
    ),
    var(--pembe-koyu);
  border: 3px solid var(--gul);
  transition: transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.h-kapak img {
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 104px;
  height: 48px;
  margin: 0 0 -6px -52px;
}
.h-not {
  top: 170px;
  height: 130px;
  left: 30px;
  right: 30px;
  z-index: 2;
  padding: 14px 12px;
  background: var(--sari);
  border: 2px dashed var(--gul);
  font: 700 25px/1.12 var(--el);
  color: var(--gul);
  text-align: center;
  transition: transform 0.7s 0.1s ease-out;
}
.hediye.acik .h-kapak {
  transform: translateY(-112px) rotate(5deg);
}
.hediye.acik .h-not {
  transform: translateY(-122px);
}
.hediye.acik {
  cursor: default;
}

/* 2. Plak */
.pikap {
  position: relative;
  width: min(100%, 300px);
  margin: 0 auto;
  border: 6px solid var(--mavi);
  background: repeating-linear-gradient(135deg, var(--pembe) 0 9px, var(--beyazimsi) 9px 18px);
  box-shadow: 8px 8px 0 var(--pembe-koyu);
}
.pikap::before {
  content: "";
  display: block;
  padding-top: 100%;
}
.bant {
  position: absolute;
  left: 50%;
  top: -14px;
  width: 90px;
  height: 26px;
  margin-left: -45px;
  background: var(--mavi);
  opacity: 0.85;
  transform: rotate(-2deg);
}
.plak {
  position: absolute;
  top: 8%;
  left: 8%;
  width: 84%;
  height: 84%;
  border-radius: 50%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  transform: rotate(0deg) translateZ(0);
  display: grid;
  place-items: center;
  background: repeating-radial-gradient(circle, var(--gri-koyu) 0 3px, var(--gri) 3px 4px);
  box-shadow: 0 6px 14px var(--golge);
  -webkit-animation: don 3.6s linear infinite;
  animation: don 3.6s linear infinite;
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}
.caliyor .plak {
  -webkit-animation-play-state: running;
  animation-play-state: running;
}
@-webkit-keyframes don {
  from { transform: rotate(0deg) translateZ(0); }
  to { transform: rotate(360deg) translateZ(0); }
}
@keyframes don {
  from { transform: rotate(0deg) translateZ(0); }
  to { transform: rotate(360deg) translateZ(0); }
}
.plak span {
  width: 38%;
  height: 38%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
  background: var(--mavi);
  color: var(--lacivert);
  font: 700 19px/1 var(--el);
  transform: rotate(-12deg);
  text-align: center;
}
.kol {
  position: absolute;
  right: 9%;
  top: 7%;
  width: 18%;
  height: 62%;
  z-index: 1;
  transform-origin: 72% 7%;
  transform: rotate(-20deg);
  transition: transform 0.6s;
}
.caliyor .kol {
  transform: rotate(0deg);
}
.kol img {
  width: 100%;
  height: 100%;
  display: block;
}
.plak-kart {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--krema);
  border: 2px solid var(--mavi);
  text-align: center;
}
.plak-kart strong {
  font-size: 18px;
  font-weight: 800;
}
.cubuklar {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
  margin-top: 6px;
}
.cubuklar i {
  width: 6px;
  height: 6px;
  background: var(--lacivert);
}
.caliyor .cubuklar i {
  animation: cubuk 0.7s ease-in-out infinite alternate;
}
.cubuklar i:nth-child(2) {
  animation-delay: 0.15s !important;
}
.cubuklar i:nth-child(3) {
  animation-delay: 0.3s !important;
}
.cubuklar i:nth-child(4) {
  animation-delay: 0.1s !important;
}
@keyframes cubuk {
  to {
    height: 24px;
  }
}

/* 3. Kamera */
.bilgi {
  position: relative;
  padding: 10px 12px;
  background: var(--krema);
  border: 2px dashed var(--gul);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.kamera {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--gri), var(--gri-koyu));
  box-shadow: 0 10px 18px var(--golge);
}
.ekran {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--gri-koyu);
  border-radius: 6px;
  background: var(--pembe);
  cursor: pointer;
  font: inherit;
  color: var(--lacivert);
  display: block;
}
.ekran small {
  position: absolute;
  padding: 0 6px;
  background: var(--gri-koyu);
  color: var(--krema);
  font-size: 11px;
  font-weight: 800;
  border-radius: 3px;
}
.ekran .sayi {
  top: 6px;
  right: 6px;
}
.ekran .play {
  top: 6px;
  left: 6px;
}
.dugmeler {
  width: 58px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
}
.dugmeler b {
  width: 40px;
  height: 12px;
  border-radius: 4px;
  background: var(--gri-koyu);
  box-shadow: inset 0 1px 0 var(--gri);
}
.dugmeler u {
  width: 28px;
  height: 22px;
  background: radial-gradient(circle, var(--gri-koyu) 1.5px, transparent 2px) 0 0 / 7px 7px;
}
.dugmeler s {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 8px solid var(--gri-koyu);
  background: var(--gri);
}
.gezinti {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ok {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 52px;
  padding: 0;
  margin: 0;
  border: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border-radius: 8px;
  background: var(--gri);
  color: var(--krema);
  font: 800 22px var(--metin);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--gri-koyu);
}
.ok svg {
  display: block;
  pointer-events: none;
}
.ok:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--gri-koyu);
}
.gezinti span {
  flex: 1;
  font: 700 22px var(--el);
  min-width: 74px;
  text-align: center;
}
/* 4. Pasta */
.pasta {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 300 / 190;
  margin: 8px auto 0;
}
.pasta-resim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dilim {
  position: absolute;
  left: 66.5%;
  top: 37%;
  width: 20%;
  height: 42.2%;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg));
  transition: transform 0.5s;
}
.dilim.surukleniyor {
  transition: none;
}
.dilim img {
  width: 100%;
  height: 100%;
  display: block;
}
.dilim.cekildi {
  transform: translate(34px, 26px) rotate(14deg);
  cursor: default;
  pointer-events: none;
}
.dilim i {
  position: absolute;
  left: 62%;
  top: 28%;
  padding: 1px 6px;
  background: var(--krema);
  border: 2px solid var(--gul);
  color: var(--gul);
  font: 700 15px var(--el);
  white-space: nowrap;
  transform: rotate(-6deg);
}
.dilim.cekildi i {
  display: none;
}
.pasta-not {
  padding: 14px;
  background: var(--sari);
  border: 2px dashed var(--gul);
  text-align: center;
  font: 700 26px/1.15 var(--el);
  color: var(--gul);
  animation: gel 0.4s ease-out;
}

/* 5. Harfler */
.karisik {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  min-height: 76px;
  background: var(--sari);
  border: 2px dashed var(--gul);
}
.harf {
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  background: var(--krema);
  box-shadow: 1px 2px 3px var(--golge);
  font-size: 26px;
  line-height: 1;
  color: var(--gul);
  transition: transform 0.12s;
}
.harf.secili {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 0 0 3px var(--lacivert);
}
.bosluklar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.kelime {
  display: flex;
  gap: 4px;
}
.yuva {
  width: 34px;
  height: 42px;
  padding: 0;
  border: 2px dashed var(--mavi);
  background: none;
  cursor: pointer;
  font: 400 25px var(--baslik);
  color: var(--lacivert);
}
.yuva.dolu {
  border-style: solid;
  border-color: var(--lacivert);
  background: var(--krema);
  cursor: default;
}
.yuva.yanlis {
  animation: salla 0.3s;
  border-color: var(--gul);
}
@keyframes salla {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/* 6. Mektup */
.geri {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
  padding: 4px 12px;
  border: 2px solid var(--mavi);
  background: var(--krema);
  color: var(--lacivert);
  font: 800 15px var(--metin);
  cursor: pointer;
}
.mektup {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 18px;
  background:
    radial-gradient(circle, rgba(173, 79, 95, 0.22) 1px, transparent 1.5px) 0 0 / 8px 8px,
    var(--sari);
  box-shadow: 0 6px 14px var(--golge);
}
.mektup::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px dashed var(--gul);
  opacity: 0.45;
  pointer-events: none;
}
.mektup h3 {
  margin: 0;
  font: 700 42px/1 var(--el);
  color: var(--lacivert);
}
.mektup p {
  font: 500 24px/1.2 var(--el);
  color: var(--gri-koyu);
}
.mektup .ust-not {
  font-size: 20px;
  color: var(--gul);
}
.mektup .imza {
  text-align: right;
  font-size: 28px;
  font-weight: 700;
  color: var(--lacivert);
}
.son-butonlar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.final {
  font: 400 34px/1.1 var(--baslik);
  color: var(--gul);
  text-align: center;
  padding: 8px 0;
  animation: gel 0.5s ease-out;
}

.plak-baslik {
  margin-top: 8px;
}
.mektup-metin {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Fotoğraflar: sadece aktif olan görünür */
.foto {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.foto.aktif {
  display: block;
}
.foto-yazilar {
  width: 100%;
  max-width: 34em;
  margin: 0 auto;
}
.foto-yazi {
  display: none;
  margin: 0;
  font-family: var(--el);
  font-size: 23px;
  line-height: 1.3;
  text-align: center;
  color: var(--gul);
}
.foto-yazi.aktif {
  display: block;
  animation: yazi-gel 0.35s ease;
}
@keyframes yazi-gel {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Karışık harflerin farklı görünmesi */
.harf:nth-child(4n + 1) {
  font-family: var(--baslik);
  rotate: -5deg;
}
.harf:nth-child(4n + 2) {
  font-family: var(--el);
  font-weight: 700;
  color: var(--lacivert);
  background: var(--mavi);
  rotate: 4deg;
}
.harf:nth-child(4n + 3) {
  font-family: var(--metin);
  font-weight: 800;
  color: var(--krema);
  background: var(--gul);
  rotate: -3deg;
}
.harf:nth-child(4n) {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--lacivert);
  background: var(--pembe);
  rotate: 6deg;
}

/* Sayfa içi bağlantılar */
.menu {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin-bottom: 14px;
}
.menu a,
.foto-baglanti a,
.mektup-baglanti a,
.alt a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--lacivert);
  font-weight: 800;
  font-size: 14px;
  text-underline-offset: 3px;
}
.menu a {
  padding: 0 8px;
  text-decoration: none;
}
.menu a.aktif {
  color: var(--gul);
  text-decoration: underline wavy;
}
.foto-baglanti {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
}
.foto-baglanti a.aktif {
  color: var(--gul);
}
.mektup-baglanti {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
}
.alt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.alt .onceki {
  grid-column: 1;
  justify-self: start;
}
.alt .yukari {
  grid-column: 2;
  justify-self: center;
}
.alt .sonraki {
  grid-column: 3;
  justify-self: end;
}
.alt a {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .plak {
    animation: none;
  }
}
