/* Wrapped: tam ekran hikâye (temadan bağımsız koyu, Spotify Wrapped gibi). Her kartın kendi tonu (data-tone): koyu
   bir zemin ve üstünde yavaşça akan, bulanık üç ışık. İçerik sırayla belirir (--i), sayılar kayan rakamlarla gelir
   (genişlik baştan son hâlinde: yazı oynamaz). Tahmin kartları, sıralama çubukları. Üstte kart sayısı kadar ilerleme
   çubuğu; basılı tutunca durur. */

.wr {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 0%, #15121c, #050506 70%); color: #fff;
  user-select: none; touch-action: manipulation; cursor: pointer;
}
.wr-stage { position: relative; width: min(440px, 100vw); height: min(800px, 100dvh); }
.wr-loading { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0.75; font-size: 13px; letter-spacing: 0.1em; }

.wr-slide {
  --base1: #1a1030; --base2: #0b0814; --a: #ffb648; --b: #ff3d6e; --c: #7c3aed;
  position: absolute; inset: 0; overflow: hidden; border-radius: 22px;
  background: linear-gradient(165deg, var(--base1), var(--base2));
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8), inset 0 0 0 1px rgb(255 255 255 / 0.06);
  animation: wr-enter 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes wr-enter { from { opacity: 0; transform: scale(0.97); } }
.wr-slide[data-tone="dawn"] { --base1: #241034; --base2: #0e0817; --a: #ffb648; --b: #ff4d7d; --c: #8b5cf6; }
.wr-slide[data-tone="ocean"] { --base1: #0a1c38; --base2: #060c1a; --a: #22d3ee; --b: #6366f1; --c: #0ea5e9; }
.wr-slide[data-tone="berry"] { --base1: #2c0b2a; --base2: #110612; --a: #f472b6; --b: #a855f7; --c: #fb7185; }
.wr-slide[data-tone="forest"] { --base1: #06261f; --base2: #03110e; --a: #34d399; --b: #0ea5e9; --c: #a3e635; }
.wr-slide[data-tone="ember"] { --base1: #2e1006; --base2: #140703; --a: #fb923c; --b: #f43f5e; --c: #facc15; }
.wr-slide[data-tone="gold"] { --base1: #2b1d05; --base2: #120c02; --a: #fde047; --b: #f59e0b; --c: #fb923c; }
.wr-slide[data-tone="indigo"] { --base1: #15123d; --base2: #08071a; --a: #818cf8; --b: #ec4899; --c: #22d3ee; }
.wr-slide[data-tone="lime"] { --base1: #142407; --base2: #070f03; --a: #a3e635; --b: #14b8a6; --c: #facc15; }
.wr-slide[data-tone="fire"] { --base1: #2a0d04; --base2: #0f0502; --a: #fb923c; --b: #fde047; --c: #ef4444; }
.wr-slide[data-tone="night"] { --base1: #0b1022; --base2: #04060e; --a: #a5b4fc; --b: #f0abfc; --c: #38bdf8; }

/* Işıklar: büyük, bulanık, yavaş; yazının okunması için üstte ve altta hafif gölge */
.wr-aurora { position: absolute; inset: -20%; pointer-events: none; filter: blur(60px); opacity: 0.7; }
.wr-aurora i { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; mix-blend-mode: screen; }
.wr-aurora i:nth-child(1) { top: 4%; left: 6%; background: var(--a); animation: wr-drift-1 16s ease-in-out infinite alternate; }
.wr-aurora i:nth-child(2) { right: 0; bottom: 8%; background: var(--b); animation: wr-drift-2 19s ease-in-out infinite alternate; }
.wr-aurora i:nth-child(3) { top: 40%; left: 30%; width: 42%; background: var(--c); opacity: 0.6; animation: wr-drift-3 23s ease-in-out infinite alternate; }
@keyframes wr-drift-1 { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes wr-drift-2 { to { transform: translate(-20%, -16%) scale(0.9); } }
@keyframes wr-drift-3 { to { transform: translate(-24%, 18%) scale(1.25); } }
.wr-slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.35), transparent 22%, transparent 70%, rgb(0 0 0 / 0.45));
}

.wr-body {
  position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 60px 28px 34px; overflow: hidden;
}
.wr-in { animation: wr-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
@keyframes wr-rise { from { opacity: 0; transform: translateY(14px); } }

/* İlerleme ve kapat */
.wr-bars { position: fixed; top: 12px; left: 50%; z-index: 2; display: flex; gap: 4px; width: min(416px, calc(100vw - 24px)); transform: translateX(-50%); }
.wr-bars span { flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: rgb(255 255 255 / 0.25); }
.wr-bars i { display: block; width: 0; height: 100%; border-radius: 2px; background: #fff; }
.wr.held .wr-bars i { opacity: 0.6; }
.wr-close {
  position: fixed; top: 24px; right: max(12px, calc(50vw - 208px)); z-index: 3; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; background: rgb(0 0 0 / 0.35); color: #fff; font-size: 14px;
  backdrop-filter: blur(6px); transition: background 0.15s;
}
.wr-close:hover { background: rgb(0 0 0 / 0.55); }

/* Yazı */
.wr-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.78; }
.wr-title { display: grid; font-size: 54px; line-height: 0.95; font-weight: 800; letter-spacing: 0.02em; }
.wr-title-2 {
  background: linear-gradient(90deg, #fff, var(--a), #fff, var(--b), #fff); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: wr-shine 9s linear infinite;
}
@keyframes wr-shine { to { background-position: -300% 0; } }
.wr-head { font-size: 28px; line-height: 1.12; font-weight: 800; }
.wr-head.big { font-size: 40px; }
.wr-lead { font-size: 14px; line-height: 1.55; opacity: 0.9; }
.wr-sub { font-size: 12px; line-height: 1.5; opacity: 0.7; }
.wr-hint { margin-top: 8px; font-size: 11px; letter-spacing: 0.06em; opacity: 0.55; }

/* Dönem seçimi */
.wr-seg { align-self: flex-start; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgb(255 255 255 / 0.12); backdrop-filter: blur(6px); }
.wr-seg button { height: 32px; padding: 0 16px; border-radius: 999px; color: rgb(255 255 255 / 0.8); font-size: 12px; font-weight: 700; transition: background 0.2s, color 0.2s; }
.wr-seg button.on { background: #fff; color: #111; }
.wr-seg button:not(.on):hover { color: #fff; }

/* Kayan rakamlar: her rakam 0-9 şeridinde iki tur dönüp yerine oturur; ayraçlar sabit */
.wr-roll { display: inline-flex; max-width: 100%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wr-roll > span { display: block; height: 1.12em; line-height: 1.12em; }
.wr-sep { white-space: pre; }
.wr-digit { overflow: hidden; }
.wr-strip { display: flex; flex-direction: column; transform: translateY(calc(var(--to) * -1.12em)); animation: wr-roll 1.4s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--d, 0ms) + 260ms); }
.wr-strip span { display: block; height: 1.12em; text-align: center; }
@keyframes wr-roll { from { transform: translateY(0); } }

/* Büyük sayı ve istatistik kartları */
.wr-hero { display: grid; gap: 4px; }
.wr-hero-num { font-size: 52px; font-weight: 800; letter-spacing: -0.01em; }
.wr-hero-num.quiet { line-height: 1.05; }
.wr-hero-label { font-size: 14px; line-height: 1.45; opacity: 0.88; }
.wr-hero-num.quiet { font-size: 34px; }
.wr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-grid.three { grid-template-columns: repeat(3, 1fr); }
.wr-stat {
  display: grid; align-content: start; gap: 3px; min-width: 0; padding: 11px 12px; border-radius: 14px;
  background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); backdrop-filter: blur(8px);
}
.wr-stat-label { font-size: 11px; opacity: 0.75; }
.wr-stat b { font-size: 21px; font-weight: 800; overflow: hidden; }
.wr-stat.zero b { opacity: 0.35; }
.wr-stat-foot { display: flex; flex-wrap: wrap; gap: 4px; }
.wr-rank,
.wr-delta { padding: 1px 7px; border-radius: 999px; background: rgb(255 255 255 / 0.12); font-size: 10px; font-weight: 700; opacity: 0.9; }
.wr-rank.first { background: linear-gradient(90deg, #fde047, #f59e0b); color: #2a1a00; }
.wr-delta.up { color: #86efac; }
.wr-delta.down { color: #fca5a5; }
.wr-hero .wr-delta { justify-self: start; margin-top: 6px; font-size: 11px; }

/* Kişilik */
.wr-persona { width: 112px; height: 112px; filter: drop-shadow(0 14px 30px rgb(0 0 0 / 0.45)); animation: wr-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both, wr-float 5s ease-in-out 0.8s infinite; }
@keyframes wr-float { 50% { transform: translateY(-8px) rotate(-2deg); } }

/* Saatin: 24 çubuk, en yoğun saat parlak */
.wr-chart { width: 100%; height: auto; overflow: visible; }
.wr-chart rect { fill: rgb(255 255 255 / 0.32); transform-origin: center bottom; transform-box: fill-box; animation: wr-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--d) + 300ms); }
.wr-chart rect.none { fill: rgb(255 255 255 / 0.12); }
.wr-chart rect.peak { fill: #fff; filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.6)); }
.wr-chart text { fill: rgb(255 255 255 / 0.55); font-size: 8px; text-anchor: middle; }
@keyframes wr-grow { from { transform: scaleY(0); } }
.wr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-fact { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.wr-fact span { font-size: 11px; opacity: 0.75; }
.wr-fact b { font-size: 20px; font-weight: 800; white-space: nowrap; }
.wr-fact small { font-size: 10px; opacity: 0.7; }
.wr-emoji { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wr-emoji-label { width: 100%; font-size: 11px; opacity: 0.75; }
.wr-emoji-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.1); }
.wr-emoji-chip i { font-size: 24px; font-style: normal; }
.wr-emoji-chip small { font-size: 11px; opacity: 0.75; }

/* Oyunlar */
.wr-games { display: flex; gap: 12px; }
.wr-game { width: 58px; height: 58px; padding: 8px; border-radius: 16px; background: rgb(255 255 255 / 0.08); opacity: 0.55; }
.wr-game.fav { opacity: 1; background: rgb(255 255 255 / 0.18); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.7); }

/* Ödüllerin */
.wr-trophy { width: 84px; height: 84px; filter: drop-shadow(0 12px 26px rgb(0 0 0 / 0.4)); }
.wr-won { display: grid; gap: 8px; }
.wr-won-row {
  display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
}
.wr-won-icon { grid-row: 1 / 3; width: 36px; height: 36px; }
.wr-won-row b { font-size: 15px; }
.wr-won-row small { font-size: 11px; opacity: 0.75; }

/* Tüm ödüller (17'ye kadar): sıkı iki sütun */
.wr-awards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wr-award {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 8px; align-content: center;
  min-width: 0; padding: 7px 9px; border-radius: 12px; background: rgb(255 255 255 / 0.07); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  animation: wr-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--d, 0ms) + 260ms);
}
.wr-award-icon { grid-row: 1 / 4; width: 26px; height: 26px; align-self: center; }
.wr-award-title { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-award-winner { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-award small { font-size: 10px; opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-award.mine { background: rgb(255 255 255 / 0.18); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.75), 0 0 24px -6px var(--a); }

/* Hep birlikte */
.wr-facts { list-style: none; display: grid; gap: 6px; font-size: 13px; }
.wr-facts li { padding-left: 16px; position: relative; opacity: 0.92; }
.wr-facts li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--a); }
.wr-group-emoji { font-size: 28px; letter-spacing: 6px; }
.wr-moments { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-moment {
  display: grid; align-content: start; gap: 4px; min-width: 0; padding: 11px 12px; border-radius: 14px;
  background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}
.wr-moment small { font-size: 10px; letter-spacing: 0.04em; opacity: 0.75; }
.wr-moment b { font-size: 20px; font-weight: 800; }
.wr-moment span { font-size: 11px; line-height: 1.35; opacity: 0.85; }
.wr-duo { display: flex; height: 28px; }
.wr-duo .wr-av + .wr-av { margin-left: -8px; box-shadow: 0 0 0 2px #142407; }

/* Avatar: adın baş harfi, renk addan */
.wr-av {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: hsl(var(--h) 62% 52%); color: #fff; font-size: 13px; font-style: normal; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
}
.wr-av.big { width: 44px; height: 44px; font-size: 18px; }

/* Tahmin: seçenekler; cevaplayınca doğru yeşil, yanlış kırmızımsı, diğerleri soluk ve küçülür */
.wr-quiz { display: grid; gap: 8px; }
.wr-option {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-radius: 14px;
  background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16); color: #fff;
  font-size: 15px; font-weight: 700; text-align: left; transition: background 0.15s, transform 0.08s, opacity 0.3s, height 0.3s;
}
.wr-option:hover:not(:disabled) { background: rgb(255 255 255 / 0.18); }
.wr-option:active:not(:disabled) { transform: scale(0.98); }
.wr-option:disabled { cursor: default; }
.wr-quiz.answered .wr-option { height: 40px; }
.wr-quiz.answered .wr-option:not(.right, .wrong) { opacity: 0.4; }
.wr-option.right { background: rgb(134 239 172 / 0.2); box-shadow: inset 0 0 0 1.5px #86efac; }
.wr-option.wrong { background: rgb(252 165 165 / 0.16); box-shadow: inset 0 0 0 1.5px #fca5a5; }
.wr-option.right::after,
.wr-option.wrong::after { margin-left: auto; font-size: 14px; }
.wr-option.right::after { content: "✓"; color: #86efac; }
.wr-option.wrong::after { content: "✕"; color: #fca5a5; }
.wr-quiz-result { display: grid; gap: 10px; animation: wr-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wr-quiz-result[hidden] { display: none; }
.wr-verdict { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.wr-verdict.yes { color: #86efac; }
.wr-verdict.no { color: #fde68a; }

/* Sıralama: sıra, avatar, ad, çubuk, değer */
.wr-board { list-style: none; display: grid; gap: 8px; }
.wr-board li { display: grid; grid-template-columns: 12px 28px minmax(0, 1fr) minmax(0, 1fr) 76px; align-items: center; gap: 9px; }
.wr-board-n { font-size: 11px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.wr-board-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-board li.me .wr-board-name { color: var(--a); }
.wr-bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgb(255 255 255 / 0.1); }
.wr-bar i {
  display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--a), var(--b));
  transform-origin: left; transform: scaleX(var(--w)); animation: wr-bar 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d);
}
@keyframes wr-bar { from { transform: scaleX(0); } }
.wr-board small { font-size: 11px; opacity: 0.85; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

/* Pango: en isabetli tahmin */
.wr-pin { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); }
.wr-pin-icon { width: 34px; height: 34px; flex: none; }
.wr-pin div { display: grid; gap: 1px; min-width: 0; }
.wr-pin small { font-size: 10px; opacity: 0.75; }
.wr-pin b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-pin span { font-size: 12px; font-weight: 700; color: var(--a); }

/* Özet kartı */
.wr-card {
  display: grid; gap: 14px; padding: 18px; border-radius: 20px;
  background: linear-gradient(160deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.05)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18), 0 20px 50px -24px rgb(0 0 0 / 0.7);
  backdrop-filter: blur(14px);
}
.wr-card-head { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; letter-spacing: 0.18em; opacity: 0.8; text-transform: uppercase; }
.wr-card-who { display: flex; align-items: center; gap: 12px; }
.wr-card-who b { display: block; font-size: 18px; }
.wr-card-who small { font-size: 12px; opacity: 0.8; }
.wr-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.wr-card-grid div { display: grid; gap: 1px; }
.wr-card-grid small { font-size: 10px; opacity: 0.7; }
.wr-card-grid b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wr-card-badges { display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / 0.15); }
.wr-card-badges img { width: 26px; height: 26px; }

/* Düğmeler */
.wr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wr-share,
.wr-ghost { height: 38px; padding: 0 18px; border-radius: 999px; font-size: 13px; font-weight: 700; transition: transform 0.08s, background 0.15s; }
.wr-share { background: #fff; color: #111; }
.wr-share:disabled { opacity: 0.8; cursor: default; }
.wr-ghost { background: rgb(255 255 255 / 0.14); color: #fff; }
.wr-ghost:hover { background: rgb(255 255 255 / 0.22); }
.wr-share:active:not(:disabled),
.wr-ghost:active { transform: scale(0.97); }

@media (max-width: 480px) {
  .wr-stage { height: 100dvh; }
  .wr-slide { border-radius: 0; }
  .wr-body { padding: 58px 20px 28px; }
  .wr-title { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .wr-aurora i, .wr-title-2, .wr-persona, .wr-in, .wr-award, .wr-chart rect, .wr-slide, .wr-strip, .wr-bar i, .wr-quiz-result { animation: none !important; }
}
