/* Paylaşım sitesi — `npm run paylasim` paylasim-sitesi/ köküne kopyalar.
 * 2026-10-06: uygulamanın yeni tasarımıyla aynı dil (src/app/globals.css'teki
 * anlamsal renkler, hep aydınlık). Renk değiştirirken İKİ dosyayı birlikte değiştir.
 * Yazı tipi sistem fontu: telefonda ek indirme olmadan anında açılsın. */
* { box-sizing: border-box; }
:root {
  --canvas: #fcfaff;
  --surface: #ffffff;
  --surface-2: #f5f1fe;
  --line: #ece6f8;
  --ink: #2b2142;
  --muted: #7a7190;
  --faint: #a49cb8;
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: #f2ecff;
  /* Hep aydınlık: tarayıcı kendi karanlık temasını uygulamasın. */
  color-scheme: light;
}
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
/* Film greni — uygulamadaki body::before ile aynı. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.45  0 0 0 0 0.6  0 0 0 1.4 -0.35'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
/* viewport-fit=cover ile sayfa çentiğin ve alt çubuğun altına uzanır; env() payı
 * yazıları güvenli alanda tutar (yan tutuşta çentik, altta ana ekran çubuğu). */
main {
  max-width: 460px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(40px, calc(env(safe-area-inset-bottom) + 16px)) max(20px, env(safe-area-inset-left));
}

/* Kulüp rozeti (quiz.meta.club) — sayfanın en üstü. */
.marka {
  display: block;
  width: max-content;
  margin: 0 auto 18px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--accent);
  background: var(--accent-soft);
}

.ust { margin: 0; text-align: center; font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---------- Sonuç kartı (uygulamadaki sonuç sayfasının telefon hâli) ---------- */
.kart { text-align: center; }
.portre-alan { position: relative; width: max-content; margin: 22px auto 0; }
.yorunge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  color: var(--accent);
  opacity: .25;
  pointer-events: none;
}
.portre {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 192px;
  height: 192px;
  overflow: hidden;
  border-radius: 34px;
  font-size: 72px;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  /* Kişinin kart renginde yumuşak gölge: her sonuç kendi tonunu taşır. */
  box-shadow: 0 26px 56px -28px var(--g1);
}
.portre img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Uyum halkası (yalnızca ?p varken; paylas.js doldurur) */
.halka {
  position: absolute;
  right: -30px;
  bottom: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 12px 30px -14px rgba(43, 33, 66, .45);
}
.halka svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.halka .iz-halka { stroke: var(--accent-soft); }
.halka .dolu-halka { stroke: var(--accent); transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1); }
.halka p { position: relative; margin: 0; line-height: 1; }
.halka b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.halka span { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }

.kunye { margin: 26px auto 0; max-width: 320px; text-align: center; font-size: 11px; line-height: 1.5; color: var(--faint); }
.kunye a { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }

.kart .kisi-adi { margin: 16px 0 0; font-size: 34px; font-weight: 800; line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.kart .unvan { margin: 8px 0 0; font-size: 15px; font-weight: 500; color: var(--muted); line-height: 1.45; }
.kart .slogan { margin: 16px auto 0; max-width: 340px; font-size: 17px; font-style: italic; line-height: 1.4; text-wrap: pretty; }
.etiketler { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.etiketler li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Paylaşım sayfası (2026-10-08): hikâye en üstte ---------- */
.baslik { margin: 0; text-align: center; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.alt-baslik { margin: 8px auto 0; max-width: 340px; text-align: center; font-size: 15px; line-height: 1.45; color: var(--muted); }

/* Kaydırılabilir şablonlar: ortadaki seçili, yanındaki kenardan görünür
 * (kaydırılabildiği anlaşılsın). Kütüphane yok: scroll-snap. */
.sablonlar {
  display: flex;
  gap: 14px;
  margin: 18px -20px 0;
  padding: 6px 15% 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sablonlar::-webkit-scrollbar { display: none; }
.sablonlar:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(124, 58, 237, .35); border-radius: 18px; }
.sablon { flex: 0 0 70%; margin: 0; scroll-snap-align: center; }
.sablon img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px -20px rgba(43, 33, 66, .55);
}
.sablon figcaption { margin-top: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.noktalar { display: flex; justify-content: center; gap: 4px; margin-top: 2px; }
/* Görünen nokta 8 px; dokunma alanı 44 px (buton çevresi şeffaf). */
.nokta {
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.nokta::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--line);
  transition: width .2s, background-color .2s;
}
.nokta.aktif::after { width: 22px; background: var(--accent); }

.eylemler { margin-top: 6px; }
.link-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.link-ikon { display: flex; flex-shrink: 0; color: var(--accent); }
.link-metin { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.kopyala {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
}
.kopyala.tamam { color: #047857; background: #d1fae5; }
.link-yedek { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.secilebilir { user-select: all; -webkit-user-select: all; font-weight: 700; color: var(--ink); word-break: break-all; }
.etiketle { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* Sonuç ayrıntıları: açılır kutu (paylaşmaya gelen kişinin önünü kesmesin). */
.detay {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.detay summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.detay summary::-webkit-details-marker { display: none; }
.detay summary::after { content: "⌄"; font-size: 20px; color: var(--muted); transition: transform .2s; }
.detay[open] summary::after { transform: rotate(180deg); }
.detay .kart { padding: 4px 18px 22px; }

/* ---------- Kartlar ---------- */
.profil {
  margin: 0 18px 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: transform .2s, background-color .2s, border-color .2s;
}
.btn svg { flex-shrink: 0; }
.btn.ana {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 28px -14px rgba(124, 58, 237, .8);
}
.btn.ana:hover { background: var(--accent-strong); }
.btn:not(.ana):hover { border-color: var(--accent); color: var(--accent); }
.btn + .btn { margin-top: 10px; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(124, 58, 237, .3); }

.ipucu {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, .45);
  border-radius: 16px;
  background: rgba(251, 191, 36, .1);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
.ipucu p { margin: 0 0 8px; }
.ipucu a { color: var(--accent); font-weight: 700; }

/* ---------- Profil çubukları (uygulamadaki ui/axis-bar.tsx ile aynı) ---------- */
.profil h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.profil .alt { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
/* --renk her satırda eksenin rengi (paylas.js verir). Her eksen kendi rengini korur
 * (kullanıcı kararı). color-mix desteklemeyen eski tarayıcılar önceki satırdaki yedeği kullanır. */
.cubuk { --renk: #7c3aed; padding: 10px 0; }
.cubuk-ust { display: flex; align-items: center; gap: 12px; }
.ikon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: var(--renk);
  background: #f5f1fe;
  background: color-mix(in srgb, var(--renk) 15%, transparent);
}
.ad { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.rozet-tepe {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--renk);
  border-color: color-mix(in srgb, var(--renk) 45%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--renk);
  color: color-mix(in srgb, var(--renk) 72%, var(--ink));
}
.deger {
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--renk);
  color: color-mix(in srgb, var(--renk) 72%, var(--ink));
}
.iz {
  height: 10px;
  margin: 8px 0 0 48px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--renk) 12%, var(--surface-2));
}
.dolgu {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--renk);
  opacity: .8;
  transition: width .9s cubic-bezier(.2, .8, .2, 1);
}
.cubuk.tepe .dolgu { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dolgu, .halka .dolu-halka { transition: none; } }

/* ---------- Ana sayfa (QR'sız gelenler) ---------- */
.giris { position: relative; padding-top: 24px; }
.giris .yorunge { left: auto; right: -110px; top: -40px; transform: none; width: 280px; height: 280px; }
.giris .etiket { position: relative; margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.giris h1 { position: relative; margin: 10px 0 0; font-size: 46px; font-weight: 800; line-height: .98; letter-spacing: -.035em; }
.giris p.metin { position: relative; margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); }

footer { margin-top: 28px; text-align: center; font-size: 12px; line-height: 1.6; color: var(--faint); }

[hidden] { display: none !important; }
