/* Sihirli Kitaplar — açılış sayfası. Dış yazı tipi veya kaynak yüklenmez. */
:root {
  --night: #1c0e3a;
  --night-2: #2b1660;
  --purple: #6b3fc6;
  --lilac: #c9b4ff;
  --gold: #f7c948;
  --gold-2: #e9a91d;
  --cream: #fff8ec;
  --cream-2: #f6ecff;
  --ink: #2a1f3d;
  --ink-soft: #54486b;
  --ok: #1f8a5b;
  --err: #c0392b;
  --radius: 22px;
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Palatino Linotype", "Book Antiqua", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.hidden { display: none !important; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 12px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Üst çubuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(28, 14, 58, .86);
  backdrop-filter: blur(10px);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: .2px; }
.brand-mark { color: var(--gold); font-size: 1.3rem; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { text-decoration: none; opacity: .85; font-weight: 600; }
.nav a:hover { opacity: 1; color: var(--gold); }
@media (max-width: 760px) { .nav { display: none; } .topbar .btn-small { margin-left: auto; } }
.topbar-end { margin-left: auto; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-small { min-height: 48px; padding: 0 18px; background: var(--gold); color: var(--ink); }
.btn-gold {
  background: linear-gradient(180deg, #ffd969, var(--gold-2));
  color: #3a2300;
  box-shadow: 0 6px 0 #b67b05, 0 10px 24px rgba(247, 201, 72, .35);
}
.btn-gold:hover { box-shadow: 0 6px 0 #b67b05, 0 12px 30px rgba(247, 201, 72, .55); }
.btn-gold:disabled { opacity: .7; cursor: progress; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 2px solid rgba(255,255,255,.35); margin-top: 14px; }
.btn-ghost-dark { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-ghost-dark:hover { background: var(--purple); color: #fff; }

/* ---------- Karşılama alanı ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 68px); /* üst çubuk: 10 + 48 + 10 px */
  display: grid; align-items: center;
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px) 72px;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 75% 30%, rgba(155, 98, 255, .45), transparent 60%),
    radial-gradient(800px 500px at 10% 90%, rgba(247, 201, 72, .18), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.sky {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 15%, #ffe9a8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 80% 60%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 25%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 45%, #d9c8ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 85%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 20% 50%, #ffe9a8 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

.hero-inner {
  position: relative; z-index: 1;
  width: min(1180px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 64px); align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { min-height: 340px; }
  .hero { min-height: auto; }
}

.eyebrow { margin: 0 0 10px; color: var(--lilac); font-weight: 700; letter-spacing: .4px; }
h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.4vw, 3.9rem); line-height: 1.08;
}
.glow {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(247, 201, 72, .55), 0 0 42px rgba(247, 201, 72, .25);
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 34em; color: #efe7ff; margin: 0 0 26px; }

/* Kod kartı */
.code-card {
  background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 560px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.code-label { display: block; font-weight: 700; margin-bottom: 8px; }
.code-row { display: flex; gap: 10px; flex-wrap: wrap; }
#code-input {
  flex: 1 1 220px; min-width: 0; min-height: 54px;
  padding: 0 18px;
  border-radius: 16px; border: 2px solid transparent;
  background: #fff; color: var(--ink);
  font: 700 1.3rem/1 ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  letter-spacing: 2px; text-transform: uppercase;
}
#code-input::placeholder { color: #a99cc0; letter-spacing: 2px; }
#code-input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px rgba(247, 201, 72, .35); }
#code-input.shake { animation: shake .4s; border-color: #ff8a80; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }
.code-help { margin: 10px 0 0; font-size: .95rem; color: #e3d9ff; }
.code-status { margin: 8px 0 0; min-height: 1.4em; font-weight: 700; }
.code-status.ok { color: #8cf0b9; }
.code-status.err { color: #ffd0cb; }
.code-alt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.25); font-size: .98rem; }
.link-arrow { color: var(--gold); font-weight: 700; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Kapak ve Lila */
.hero-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.book-stage {
  position: relative;
  width: min(360px, 64vw);
  perspective: 1100px;
}
.cover {
  width: 100%;
  border-radius: 10px 18px 18px 10px;
  box-shadow: -10px 0 0 #3d2380 inset, 0 30px 60px rgba(0, 0, 0, .5), 0 0 80px rgba(201, 180, 255, .35);
  transform: rotateY(calc(var(--ry, -10) * 1deg)) rotateX(calc(var(--rx, 4) * 1deg));
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
  animation: bob 6s ease-in-out infinite;
}
.cover-shine {
  position: absolute; inset: 0; border-radius: 10px 18px 18px 10px; pointer-events: none;
  background: radial-gradient(240px 240px at var(--sx, 30%) var(--sy, 20%), rgba(255, 255, 255, .28), transparent 60%);
  mix-blend-mode: screen;
}
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.lila-fly {
  position: absolute; right: -4%; bottom: -4%;
  width: clamp(104px, 12vw, 160px);
  padding: 0; border: 0; background: none; cursor: pointer;
  animation: fly 5s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)) drop-shadow(0 0 22px rgba(255, 220, 140, .35));
}
.lila-fly img { width: 100%; }
@keyframes fly { 0%,100% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(-8px, -18px) rotate(3deg); } }
.lila-fly.spin { animation: twirl .9s ease-in-out; }
@keyframes twirl { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(-12deg) scale(1.12); } 100% { transform: rotate(0) scale(1); } }

.bubble, .cast-bubble {
  position: absolute; z-index: 3;
  background: #fff; color: var(--ink);
  font-weight: 700; font-size: .95rem; line-height: 1.3;
  padding: 10px 14px; border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateY(6px) scale(.95);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.bubble { right: 30%; bottom: 100%; width: max-content; max-width: 220px; }
.bubble::after, .cast-bubble::after {
  content: ""; position: absolute; bottom: -8px; right: 22px;
  border: 8px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.bubble.show, .cast-bubble.show { opacity: 1; transform: none; }

.floating-letters { position: absolute; inset: 0; pointer-events: none; }
.fl {
  position: absolute; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--gold); text-shadow: 0 0 14px rgba(247, 201, 72, .6);
  animation: drift 7s ease-in-out infinite;
}
.fl1 { left: 4%; top: 12%; } .fl2 { left: 12%; top: 64%; color: #ff9bd2; animation-delay: -1s; }
.fl3 { right: 8%; top: 6%; color: #8fe3ff; animation-delay: -2s; } .fl4 { left: 0; top: 40%; animation-delay: -3s; }
.fl5 { right: 2%; top: 38%; color: #b5f0a0; animation-delay: -4s; } .fl6 { left: 20%; top: 2%; color: #ffb38a; animation-delay: -5s; }
.fl7 { right: 22%; bottom: 0; color: #ff9bd2; animation-delay: -6s; }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 16px; translate: -50% 0;
  color: #fff; text-decoration: none; font-size: 1.5rem; opacity: .7;
  animation: bob 2.4s ease-in-out infinite;
}

/* Parıltı izi */
.spark {
  position: fixed; z-index: 40; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: var(--c, var(--gold));
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: spark .8s ease-out forwards;
}
@keyframes spark { to { transform: translate(var(--dx, 0), var(--dy, 20px)) scale(.2) rotate(140deg); opacity: 0; } }

/* ---------- Bölümler ---------- */
.section { padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 48px); }
.section-tint { background: linear-gradient(180deg, var(--cream-2), var(--cream)); }
.section-night { background: linear-gradient(180deg, var(--night-2), var(--night)); color: #fff; }
.wrap { width: min(1100px, 100%); margin: 0 auto; }
h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; color: var(--purple); }
.section-night h2 { color: var(--gold); }
.section-lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 46em; margin: 0 0 24px; }
.section-night .section-lead { color: #e9e0ff; }
.fine { font-size: .9rem; opacity: .8; }

.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: #fff; border: 2px solid #e6dafc; color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .95rem;
  transition: transform .15s ease, background .15s ease;
}
.chips li:hover { transform: translateY(-3px) rotate(-1deg); background: #fff4cc; border-color: var(--gold); }

.facts {
  margin: 0; background: #fff; border-radius: var(--radius); padding: 22px 24px;
  box-shadow: 0 14px 40px rgba(60, 30, 120, .12); border: 2px solid #efe6ff;
}
.facts div { display: grid; grid-template-columns: 132px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #e4d9f7; }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 700; color: var(--purple); }
.facts dd { margin: 0; font-weight: 600; }
.facts .dd-note { display: block; margin-top: 2px; font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
/* Künye kartı darsa (tablet ve telefon) etiket değerin üstüne geçer. */
.facts { container-type: inline-size; }
@container (max-width: 330px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* Karakterler */
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
@media (max-width: 760px) { .cast { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; } }
.cast-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 18px 22px;
  border: 0; border-radius: var(--radius);
  background: #fff; color: var(--ink); font: inherit; cursor: pointer;
  box-shadow: 0 14px 40px rgba(60, 30, 120, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cast-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(60, 30, 120, .2); }
.cast-card img { height: 260px; width: auto; object-fit: contain; transition: transform .3s ease; }
.cast-card.jump img { animation: jump .6s ease; }
@keyframes jump { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-22px) rotate(-3deg); } 70% { transform: translateY(0) scale(1.03, .97); } }
.cast-name { margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--purple); }
.cast-role { margin-top: 6px; color: var(--ink-soft); font-size: .98rem; }
.cast-bubble { top: -12px; left: 50%; translate: -50% -50%; width: max-content; max-width: 92%; }
.cast-bubble::after { right: auto; left: 50%; translate: -50% 0; }

/* Mini oyun */
.game {
  background: #fff; border-radius: var(--radius); padding: clamp(16px, 3vw, 28px);
  box-shadow: 0 14px 40px rgba(60, 30, 120, .12); border: 2px solid #efe6ff;
  display: grid; gap: 16px; justify-items: center;
}
.game-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg-btn {
  min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); font: inherit; font-weight: 700;
}
.seg-btn small { font-weight: 600; opacity: .7; margin-left: 4px; }
.seg-btn.is-on { background: var(--purple); color: #fff; }
.game-score { margin: 0; font-weight: 800; font-size: 1.2rem; color: var(--gold-2); }

.balloons { display: grid; grid-template-columns: repeat(6, minmax(52px, 1fr)); gap: 14px; width: min(720px, 100%); }
@media (max-width: 560px) { .balloons { grid-template-columns: repeat(4, 1fr); } }
.balloon {
  position: relative; aspect-ratio: 1 / 1.15; min-height: 60px;
  border: 0; border-radius: 50% 50% 46% 46%; cursor: pointer;
  font: 800 clamp(1.5rem, 3.4vw, 2.1rem)/1 var(--font-display);
  color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .6), transparent 32%), var(--bg, var(--purple));
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .12), 0 8px 16px rgba(60, 30, 120, .18);
  animation: float 3.2s ease-in-out infinite; animation-delay: var(--d, 0s);
  transition: transform .15s ease;
}
.balloon::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 2px; height: 12px; background: #b9a8d8; translate: -50% 0;
}
.balloon:hover { transform: scale(1.06); }
.balloon.found { animation: pop .45s ease forwards; pointer-events: none; }
.balloon.wrong { animation: shake .4s; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(0); opacity: 0; } }
.game-feedback { margin: 0; min-height: 1.6em; font-weight: 800; font-size: 1.1rem; text-align: center; }
.game-feedback.ok { color: var(--ok); }
.game-feedback.err { color: var(--err); }
.game-note { color: var(--ink-soft); text-align: center; margin-top: 14px; }

/* Mağazalar */
.stores { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.store {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; padding: 0 20px; border-radius: 18px;
  background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .25);
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.store:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); transform: translateY(-3px); }
#satin-al.flash .store { animation: glowpulse 1.2s ease 2; }
@keyframes glowpulse { 50% { box-shadow: 0 0 0 6px rgba(247, 201, 72, .55); } }

/* Güven */
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.trust li { background: #fff; border-radius: 18px; padding: 18px 20px; border: 2px solid #efe6ff; }
.trust strong { display: block; color: var(--purple); margin-bottom: 4px; }
.trust li.trust-wide { grid-column: 1 / -1; background: var(--cream-2); }
.trust a { color: var(--purple); font-weight: 700; overflow-wrap: anywhere; }

/* Alt bilgi */
.footer { background: var(--night); color: #d9cfee; padding: 32px clamp(16px, 4vw, 48px); font-size: .95rem; }
.footer p { margin: 4px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 6px 0 2px; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--gold); font-weight: 700; text-decoration: none; overflow-wrap: anywhere;
}
.footer-links a:hover { text-decoration: underline; }

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Bölümler sayfası (yer tutucu) */
.lila-static { width: min(240px, 50vw); filter: drop-shadow(0 0 30px rgba(255, 220, 140, .35)); animation: fly 5s ease-in-out infinite; }

/* ---------- Metin sayfaları (KVKK) ---------- */
.doc-wrap { width: min(820px, 100%); margin: 0 auto; }
.doc .eyebrow { color: var(--purple); }
.doc-title { color: var(--purple); font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: 8px; }
.doc-meta { color: var(--ink-soft); font-size: .95rem; margin: 0 0 22px; }
.doc h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 44px 0 12px; }
.doc p, .doc li { max-width: 46em; }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc a { color: var(--purple); font-weight: 700; overflow-wrap: anywhere; }
.doc code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; font-size: .92em;
  background: var(--cream-2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere;
}
.doc-callout {
  background: #fff; border: 2px solid #efe6ff; border-left: 6px solid var(--gold);
  border-radius: 18px; padding: 16px 20px; margin: 0 0 8px;
}
.data-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 14px 0 0; }
.data-item { background: #fff; border: 2px solid #efe6ff; border-radius: 18px; padding: 16px 18px; }
.data-item h3 { margin: 0 0 4px; font-size: 1.08rem; color: var(--purple); }
.data-item p { margin: 0 0 10px; color: var(--ink-soft); font-size: .95rem; }
.data-item dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .95rem; }
.data-item dt { font-weight: 700; }
.data-item dd { margin: 0; }
.device-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: #fff; border: 2px dashed var(--lilac); border-radius: 18px; padding: 14px 18px; margin: 14px 0 0;
}
.device-box-label { font-weight: 700; color: var(--purple); }
.device-box code { font-size: 1rem; }
