/* Sanal Hediye Kutusu — açık, sıcak görünüm. Kutu rengi --kutu / --kutu2, kurdele --kurdele (JS ile). */
:root {
  --zemin: #fff1f5; --kart: #ffffff; --cizgi: #f1dbe3; --yazi: #2b1d24; --soluk: #7a6570;
  --vurgu: #d9386f; --r: 18px;
  --kutu: #e0457b; --kutu2: #b92c5e; --kurdele: #f4c542; --kurdele2: #c99a1e;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh; color: var(--yazi); overflow-x: hidden;
  background: radial-gradient(ellipse at 50% -20%, #ffe3c9, var(--zemin) 55%) fixed var(--zemin);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sar { max-width: 520px; margin: 0 auto; padding: 14px 16px 28px; position: relative; }
.gizli { display: none !important; }
.soluk { color: var(--soluk); font-weight: 500; }
#konfeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.ust { display: flex; justify-content: center; margin-bottom: 10px; }
.hap { text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--cizgi); color: var(--soluk); }
.hap b { color: var(--yazi); }

.giris { text-align: center; }
h1 { font-size: clamp(30px, 8.8vw, 42px); line-height: 1.06; margin: 8px 0 10px; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--vurgu); }
h2 { font-size: 28px; margin: 8px 0; }
.alt { color: var(--soluk); margin: 0 auto 10px; max-width: 420px; }
.not { font-size: 13px; color: var(--soluk); margin: 12px 0 0; }

/* ---------- form ---------- */
.onizle-alan { display: flex; justify-content: center; padding: 26px 0 6px; }
.form { display: grid; gap: 12px; }
fieldset { margin: 0; border: 1px solid var(--cizgi); background: #fff; border-radius: 20px; padding: 14px 14px 16px; min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-weight: 800; font-size: 15px; }
legend.ic { margin-top: 14px; }
legend label { cursor: pointer; }
fieldset > :not(legend) { clear: both; }
input, textarea {
  width: 100%; padding: 13px 14px; border: 2px solid var(--cizgi); border-radius: 14px; font-size: 17px;
  background: #fffafb; outline: none; resize: none; display: block;
}
input { font-weight: 700; }
input:focus, textarea:focus { border-color: var(--vurgu); }
.sayac { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--soluk); margin-top: 6px; }
.ornek-yaz { background: none; border: 0; padding: 4px 0; color: var(--vurgu); font-weight: 700; font-size: 13px; }

.cipler { display: flex; flex-wrap: wrap; gap: 8px; }
.cip {
  padding: 10px 14px; border-radius: 99px; border: 2px solid var(--cizgi); background: #fff;
  font-weight: 700; font-size: 15px; line-height: 1.1;
}
.cip[aria-pressed="true"] { border-color: var(--vurgu); background: #ffe8f0; color: #9c1f4b; }

.renkler { display: flex; flex-wrap: wrap; gap: 10px; }
.renk {
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; padding: 0;
  box-shadow: 0 0 0 2px var(--cizgi); background: var(--c);
}
.renk[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--yazi); }

.emojiler { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emoji { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: #fff6f8; font-size: 24px; padding: 0; line-height: 1; }
.emoji[aria-pressed="true"] { border-color: var(--vurgu); background: #ffe1eb; }

.hata { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fff0e6; color: #8f3b00; font-weight: 700; font-size: 14px; }

.gizlilik { font-size: 13px; color: var(--soluk); background: #fff; border: 1px dashed var(--cizgi); border-radius: 14px; padding: 10px 12px; margin: 14px 0 0; }
.gizlilik code { background: #ffe8f0; padding: 0 4px; border-radius: 4px; }

.dugme {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 16px 18px; border: 0; border-radius: var(--r); background: var(--vurgu); color: #fff;
  font-weight: 800; font-size: 17px; text-decoration: none; text-align: center; line-height: 1.2;
  box-shadow: 0 6px 18px -8px var(--vurgu);
}
.dugme:active { transform: scale(.98); }
.dugme.ikincil { background: #fff; color: var(--yazi); border: 1px solid var(--cizgi); box-shadow: none; }
.dugme.wa { background: #1faa59; box-shadow: 0 6px 18px -8px #1faa59; }
.dugmeler { display: grid; gap: 10px; margin-top: 16px; }
.link-kutu { width: 100%; padding: 10px 12px; border: 1px solid var(--cizgi); border-radius: 12px; font-size: 13px; color: var(--soluk); background: #fff; font-weight: 400; }
.geri { background: none; border: 0; color: var(--soluk); font-weight: 700; padding: 8px 0; }

#hazir, #bozuk { text-align: center; padding-top: 6px; }
.hazir-kutu { background: #fff; border: 2px dashed var(--vurgu); border-radius: 24px; padding: 18px 16px 8px; }
.buyuk-emoji { font-size: 60px; line-height: 1; animation: zipla 2.2s ease-in-out infinite; }
@keyframes zipla { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }

/* ---------- kutu (CSS ile çizilir) ---------- */
.kutu {
  --g: 180px; /* genişlik */
  position: relative; display: block; width: var(--g); height: calc(var(--g) * 1.02);
  border: 0; background: none; padding: 0; margin: 0 auto; font-size: 0;
}
.kutu.mini { --g: 120px; }
.kutu.buyuk { --g: min(230px, 62vw); }
.govde, .kapak { position: absolute; left: 50%; transform: translateX(-50%); display: block; }
.govde {
  bottom: 0; width: 100%; height: 70%; border-radius: 6px 6px 12px 12px;
  background: linear-gradient(90deg, var(--kutu2) 0 8%, var(--kutu) 22% 78%, var(--kutu2) 92%);
  box-shadow: 0 18px 30px -18px #0007, inset 0 10px 14px -10px #0005;
}
.kapak {
  bottom: 66%; width: 112%; height: 24%; border-radius: 8px; z-index: 2;
  background: linear-gradient(180deg, var(--kutu) 0 60%, var(--kutu2));
  box-shadow: 0 6px 10px -6px #0006;
}
.k-dikey { position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; transform: translateX(-50%); background: linear-gradient(90deg, var(--kurdele2), var(--kurdele) 30% 70%, var(--kurdele2)); transform-origin: top; }
.kapak .k-yatay { position: absolute; left: 0; right: 0; top: 50%; height: 0; }
.fiyonk { position: absolute; left: 50%; bottom: 86%; width: 74%; height: 30%; transform: translateX(-50%); z-index: 3; display: block; }
.fiyonk b {
  position: absolute; bottom: 4%; width: 46%; height: 78%; display: block; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, var(--kurdele2) 0 30%, var(--kurdele) 33% 80%, var(--kurdele2) 100%);
}
.fiyonk b:first-child { right: 48%; transform: rotate(-22deg); transform-origin: right bottom; }
.fiyonk b:nth-child(2) { left: 48%; transform: rotate(22deg); transform-origin: left bottom; }
.fiyonk s { position: absolute; left: 50%; bottom: 0; width: 20%; height: 40%; z-index: 1; transform: translateX(-50%); background: var(--kurdele); border-radius: 40%; box-shadow: inset 0 -3px 0 var(--kurdele2); display: block; }

.kutu.mini { animation: sallan 3s ease-in-out infinite; }
.kutu.salla { animation: salla 1.6s ease-in-out infinite; cursor: pointer; }
@keyframes sallan { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes salla {
  0%, 55%, 100% { transform: rotate(0) translateY(0); }
  8% { transform: rotate(-7deg) translateY(-6px); } 16% { transform: rotate(6deg) translateY(-10px); }
  24% { transform: rotate(-5deg) translateY(-6px); } 32% { transform: rotate(4deg) translateY(-2px); } 40% { transform: rotate(-2deg); }
}

/* açılış: .coz → kurdele çözülür, .uc → kapak uçar, .bitti → kutu aşağı iner */
.kutu.coz, .kutu.uc, .kutu.bitti { animation: none; cursor: default; }
.kutu.coz .fiyonk b:first-child { transition: transform .55s cubic-bezier(.5,-0.4,.7,1), opacity .55s; transform: translate(-70%, -40%) rotate(-120deg) scale(.4); opacity: 0; }
.kutu.coz .fiyonk b:nth-child(2) { transition: transform .55s cubic-bezier(.5,-0.4,.7,1), opacity .55s; transform: translate(70%, -40%) rotate(120deg) scale(.4); opacity: 0; }
.kutu.coz .fiyonk s { transition: transform .5s .1s, opacity .5s .1s; transform: translateX(-50%) scale(0); opacity: 0; }
.kutu.coz .k-dikey { transition: transform .45s .25s ease-in; transform: translateX(-50%) scaleY(0); }
.kutu.uc .kapak { transition: transform .75s cubic-bezier(.2,.7,.3,1), opacity .75s; transform: translate(-30%, -340%) rotate(-38deg); opacity: 0; }
.kutu.bitti .govde { transition: transform .6s ease-in, opacity .6s; transform: translate(-50%, 40%) scale(.85); opacity: 0; }

.kimden { text-align: center; font-weight: 800; font-size: 20px; margin: 10px 0 0; overflow-wrap: anywhere; }
.sahne { position: relative; min-height: 400px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 50px 0 10px; }
.dokun {
  margin: 30px 0 0; font-weight: 900; font-size: 22px; color: var(--vurgu);
  animation: nabiz 1.2s ease-in-out infinite;
}
@keyframes nabiz { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .75; } }
.sahne.acildi .dokun { opacity: 0; animation: none; transition: opacity .2s; }
.sahne.acildi .kutu.bitti { position: absolute; top: 50px; left: 0; right: 0; pointer-events: none; }

/* ---------- kart (el yazısı) ---------- */
.kart {
  position: relative; width: 100%; padding: 26px 22px 22px; border-radius: 6px 6px 20px 20px;
  background: linear-gradient(180deg, #fffdf8, #fff7f0);
  box-shadow: 0 24px 40px -24px #6b1a3a88, 0 0 0 1px #f2dfe4;
  transform-origin: 50% 100%; animation: kart-cik .8s cubic-bezier(.2,1.3,.4,1) both;
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", "Apple Chancery", "Comic Sans MS", "Dancing Script", cursive;
  color: #3b2330; overflow-wrap: anywhere;
}
.kart::before { content: ""; position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in srgb, var(--kurdele) 60%, transparent); border-radius: 3px; }
@keyframes kart-cik { from { opacity: 0; transform: translateY(120px) scale(.4) rotate(-4deg); } }
.kart p { margin: 0; }
.k-baslik { font-family: system-ui, -apple-system, sans-serif; font-weight: 900; font-size: 26px; text-align: center; color: var(--kutu2); margin-bottom: 12px !important; line-height: 1.15; }
.k-hitap { font-size: 24px; margin-bottom: 6px !important; }
.k-mesaj { font-size: 22px; line-height: 34px; min-height: 68px; white-space: pre-wrap; background: repeating-linear-gradient(180deg, transparent 0 33px, #f3d7e1 33px 34px); }
.k-mesaj .imlec { display: inline-block; width: 2px; height: 22px; background: #3b2330; margin-left: 2px; vertical-align: -3px; animation: yanip .7s steps(1) infinite; }
@keyframes yanip { 50% { opacity: 0; } }
.k-emoji { font-size: 38px; text-align: center; margin: 12px 0 4px !important; letter-spacing: 6px; font-family: system-ui, sans-serif; }
.k-emoji span { display: inline-block; animation: emoji-pop .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes emoji-pop { from { transform: scale(0) rotate(-30deg); } }
.k-imza { text-align: right; font-size: 24px; margin-top: 8px !important; opacity: 0; transition: opacity .5s; }
.k-imza.goster { opacity: 1; }

.sonra { animation: belir .6s both; }
@keyframes belir { from { opacity: 0; transform: translateY(14px); } }
.kendi { margin-top: 16px; }

/* ---------- öneri ---------- */
.oneri { margin-top: 26px; background: #fff; border: 1px solid var(--cizgi); border-radius: 22px; padding: 16px 14px; }
.oneri h3 { margin: 0 0 4px; font-size: 18px; }
.oneri-alt { margin: 0 0 12px; color: var(--soluk); font-size: 14px; }
.urunler { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.urun { display: flex; flex-direction: column; text-decoration: none; border: 1px solid var(--cizgi); border-radius: 16px; overflow: hidden; background: #fff; }
.urun img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #f8eef1; }
.urun .ad { font-size: 13px; font-weight: 800; padding: 9px 10px 2px; line-height: 1.25; }
.urun .renk { font-size: 12px; color: var(--soluk); padding: 0 10px; }
.urun .git { margin: auto 8px 8px; margin-top: 10px; padding: 10px 4px; white-space: nowrap; border-radius: 12px; background: #f27a1a; color: #fff; font-weight: 800; font-size: 14px; text-align: center; }

.imza { text-align: center; font-size: 12px; color: var(--soluk); margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  .kutu.salla, .kutu.mini, .dokun, .buyuk-emoji { animation: none; }
}
