/* Renkler ve temel değişkenler */
:root {
  --bg: #fff3f5;
  --card: #ffffff;
  --ink: #3a2230;
  --muted: #8b6b78;
  --pink: #ff5d8f;
  --pink-d: #e63e75;
  --soft: #ffe3ec;
  --line: #f4d3dd;
  --cream: #fff8ef;
  --shadow: 0 10px 30px rgba(230, 62, 117, .13);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { font-size: 100%; }
html.video { font-size: 120%; } /* video modu: yazılar %20 büyük */

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
}

#app { width: 100%; max-width: 440px; position: relative; }

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 20px;
}
h1.plain { text-align: center; margin: 0 0 18px; }

/* Ekran geçişleri */
.screen.enter { animation: slideIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.screen.leave { animation: slideOut .18s ease-in both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(-28px); } }

.card {
  position: relative;
  background: var(--card);
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  text-align: center;
}
.card.slim { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; padding: 20px 18px; }

.emoji { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.emoji.big { font-size: 5rem; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.12); } }

.question { font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; font-weight: 600; margin: 0 0 22px; }

/* Butonlar */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 1rem "Inter", system-ui, sans-serif;
  text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, var(--pink), var(--pink-d)); color: #fff; box-shadow: 0 6px 16px rgba(230, 62, 117, .3); }
.btn.ghost { background: #fff; color: var(--pink-d); border-color: var(--line); }
.btn.wa { background: #25d366; color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.row { display: flex; gap: 10px; margin-top: 12px; }
.row .btn { flex: 1; padding: 12px 10px; font-size: .95rem; }

.link { background: none; border: 0; color: var(--muted); font: 500 .9rem "Inter", sans-serif; text-decoration: underline; cursor: pointer; padding: 10px; min-height: 44px; }

/* Form */
.field { display: block; text-align: left; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.field small { font-weight: 400; color: var(--muted); }
input {
  display: block; width: 100%; margin-top: 6px; min-height: 52px;
  padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px;
  font: 500 1rem "Inter", sans-serif; color: var(--ink); background: #fff; outline: none;
}
input:focus { border-color: var(--pink); }
input.invalid { border-color: #e03; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.field:last-of-type input { margin-bottom: 0; }
.linkbox { margin-top: 18px; font-size: .85rem; color: var(--muted); }
#btn-make { margin-top: 6px; }

/* Davet ekranı */
.actions { position: relative; display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 130px; }
.actions .btn { width: auto; min-width: 130px; white-space: nowrap; }
.yes { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.no { transition: left .28s ease, top .28s ease, transform .28s, opacity .25s; }
.no.free { position: absolute; margin: 0; }
.no.gone { opacity: 0; pointer-events: none; }
.yay { font-family: "Fraunces", Georgia, serif; font-size: 2.4rem; font-weight: 800; padding: 60px 0; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* Seçim ızgaraları */
.grid { display: grid; gap: 10px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
.chip, .pcard {
  min-height: 56px; padding: 8px 4px; border: 2px solid var(--line); border-radius: 18px;
  background: #fff; color: var(--ink); font: 600 .95rem "Inter", sans-serif; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.chip small { display: block; font-weight: 500; font-size: .7rem; color: var(--pink-d); }
.chip.wide { grid-column: 1 / -1; }
.pcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; }
.pcard span { font-size: 2.2rem; line-height: 1; }
.chip:active, .pcard:active { transform: scale(.95); }
.chip.sel, .pcard.sel { border-color: var(--pink); background: var(--soft); box-shadow: 0 6px 16px rgba(255, 93, 143, .3); transform: scale(1.04); }
#in-note { margin: 0 0 4px; }
#btn-place-next { margin-top: 10px; }

/* Bilet */
.ticket { position: relative; filter: drop-shadow(0 10px 18px rgba(230, 62, 117, .18)); text-align: center; }
.t-main, .t-stub { position: relative; padding: 24px 22px; }
.t-main {
  background: #fff; border-radius: 22px 22px 0 0; padding-bottom: 28px;
  -webkit-mask: radial-gradient(circle 13px at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 13px at 0 100%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 100%, #0000 97%, #000) right / 51% 100% no-repeat;
}
.t-stub {
  background: var(--cream); border-radius: 0 0 22px 22px; padding-top: 28px;
  -webkit-mask: radial-gradient(circle 13px at 0 0, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 13px at 0 0, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 13px at 100% 0, #0000 97%, #000) right / 51% 100% no-repeat;
}
.t-stub::before { content: ""; position: absolute; top: 0; left: 18px; right: 18px; border-top: 2px dashed var(--line); }
/* kenarlardaki delikler */
.ticket::before, .ticket::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 12px; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, var(--bg) 4px, transparent 4.6px) 0 0 / 12px 22px repeat-y;
}
.ticket::before { left: -6px; }
.ticket::after { right: -6px; }
.t-label { font-size: .7rem; font-weight: 700; letter-spacing: .18em; color: var(--pink-d); margin-bottom: 10px; }
.t-names { font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: 1.9rem; line-height: 1.15; margin-bottom: 14px; word-break: break-word; }
.t-names .heart { color: var(--pink); }
.t-date { font-size: 1.15rem; font-weight: 700; }
.t-time { font-size: 1rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.t-place { font-size: 1.25rem; font-weight: 700; }
.t-place span { font-size: 2.2rem; display: block; line-height: 1.1; }
.t-note { margin-top: 6px; color: var(--muted); font-weight: 500; word-break: break-word; }

.stamp {
  position: absolute; right: 12px; bottom: 16px; z-index: 3;
  padding: 6px 14px; border: 4px solid var(--pink-d); border-radius: 12px;
  color: var(--pink-d); background: rgba(255, 255, 255, .7);
  font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: 1.5rem; letter-spacing: .08em;
  transform: rotate(-12deg); opacity: 0;
  animation: stamp .45s cubic-bezier(.2, 1.4, .4, 1) .7s both;
}
@keyframes stamp { from { opacity: 0; transform: rotate(-30deg) scale(3); } to { opacity: .92; transform: rotate(-12deg) scale(1); } }

/* Ses butonu, konfeti, footer */
.sound {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 20;
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; font-size: 1.3rem;
  box-shadow: var(--shadow); cursor: pointer;
}
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }
.footer { margin-top: 24px; font-size: .75rem; color: var(--muted); text-align: center; }
html.video .footer, html.video .small-link { display: none; }

@media (prefers-reduced-motion: reduce) {
  .emoji.big { animation: none; }
}
