/* Bilgi yarışması demosu — oyunun soru ekranından sadeleştirilmiş kopya.
   Renkler ve ölçüler oyunun kendi değerleri (trivia_app: lib/tokens/arena.ts, components/joker-button.tsx). */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/fonts/Baloo2-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/fonts/Baloo2-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(/fonts/Nunito-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(/fonts/Nunito-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.tg {
  --ink: #1B1236;
  --cat: #6C5CE7;
  --head: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --text: 'Nunito', system-ui, sans-serif;
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 14px 14px 18px;
  border-radius: 30px;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--cat) 14%, #2A2150), #1C1638);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px -45px rgba(0, 0, 0, 0.95);
  color: #fff;
  font-family: var(--text);
  display: grid;
  gap: 12px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.4s;
}
.tg :where(button) { font: inherit; color: inherit; cursor: pointer; }
.tg [hidden] { display: none !important; }
.tg button:focus-visible { outline: 3px solid #FFD45C; outline-offset: 2px; }
.tg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Oyuncular */
.tg-hud { display: flex; justify-content: center; gap: 14px; }
.tg-p { display: flex; align-items: center; gap: 7px; transition: transform 0.3s; }
.tg-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 14px; line-height: 1; background: var(--pc); box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.22); transition: box-shadow 0.2s; }
.tg-p.me .tg-av { box-shadow: 0 0 0 2.5px #FFC93C; }
.tg-p.done .tg-av { box-shadow: 0 0 0 2.5px #3DBE4E; }
.tg-pn { display: grid; line-height: 1.1; }
.tg-pn b { font-size: 12px; font-weight: 800; }
.tg-pn span { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }

/* Soru kartı */
.tg-card { position: relative; background: linear-gradient(180deg, #F5F1FF, #E6DEFF 55%, #D9CEFF); color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 7px 0 var(--ink); padding: 12px 14px 16px; display: grid; gap: 10px; }
.tg-top { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.tg-timer { flex: 1; height: 14px; border-radius: 99px; background: var(--ink); padding: 2px; }
.tg-timer i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3DBE4E, #B5E83A); transform-origin: left center; }
.tg.low .tg-timer i { background: linear-gradient(90deg, #E04545, #FF8A8A); }
.tg-sec { min-width: 26px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: #fff; font-family: var(--head); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.tg.low .tg-sec { color: #FF8A8A; }
.tg-2x { position: absolute; top: -12px; right: -10px; padding: 2px 9px; border-radius: 10px; background: linear-gradient(180deg, #FFE27A, #FFC93C); border: 2.5px solid var(--ink); font-family: var(--head); font-weight: 800; font-size: 15px; color: var(--ink); transform: rotate(8deg); }
.tg-band { height: 24px; border-radius: 99px; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 13px; letter-spacing: 0.02em; color: #fff; text-shadow: 0 1px 0 rgba(27, 18, 54, 0.45); background: linear-gradient(90deg, #AFA2FF, #6C5CE7); }
.tg-band.ok { background: linear-gradient(90deg, #B8F5A0, #3DBE4E); }
.tg-band.no { background: linear-gradient(90deg, #FF9C9C, #D93838); }
.tg-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tg-count { font-family: var(--head); font-weight: 700; font-size: 13px; color: #5B5480; letter-spacing: 0.03em; }
.tg-cat { padding: 2px 10px 1px; border-radius: 99px; background: var(--cat); color: #fff; font-family: var(--head); font-weight: 700; font-size: 12px; }
.tg-q { margin: 0; min-height: 2.4em; display: grid; place-items: center; text-align: center; font-family: var(--head); font-weight: 700; font-size: 19px; line-height: 1.2; text-wrap: balance; }

/* Jokerler */
.tg-jhead { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px -4px; font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, 0.75); }
.tg-pips { letter-spacing: 2px; color: #FFC93C; }
.tg-jokers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tg-j { position: relative; height: 62px; border-radius: 16px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); background: linear-gradient(180deg, color-mix(in srgb, var(--jc) 70%, #fff), var(--jc) 55%, color-mix(in srgb, var(--jc) 78%, #000)); display: grid; justify-items: center; align-content: center; gap: 1px; padding: 0; overflow: hidden; transition: transform 0.08s, box-shadow 0.08s, filter 0.2s, opacity 0.2s; }
.tg-j img { width: 30px; height: 30px; display: block; }
.tg-j span { font-family: var(--head); font-weight: 800; font-size: 12px; line-height: 1; color: #fff; text-shadow: 0 1.5px 0 var(--ink); }
.tg-j:not(:disabled):active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tg-j:disabled { cursor: default; }
.tg-j.used { filter: grayscale(1); opacity: 0.55; }
.tg-j.used::after { content: "✓"; position: absolute; top: 3px; right: 4px; width: 16px; height: 16px; border-radius: 50%; background: #3DBE4E; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.tg-j.locked { filter: grayscale(0.7); opacity: 0.6; }
.tg.no-jokers .tg-j:not(.used) { filter: grayscale(0.6); opacity: 0.6; }
.tg-j.locked::after { content: "Son soruda yok"; position: absolute; inset: auto 0 3px; font-size: 8px; font-weight: 800; color: #fff; text-align: center; }
@media (hover: hover) { .tg-j:not(:disabled):hover { filter: brightness(1.08); } }

/* Şıklar */
.tg-opts { display: grid; gap: 9px; }
.tg-o { position: relative; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px 0 7px; border-radius: 16px; border: 2.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink); background: linear-gradient(180deg, #FFFFFF, #EEE9FF); color: var(--ink); text-align: left; overflow: hidden; transition: transform 0.08s, box-shadow 0.08s, opacity 0.25s, background 0.2s; }
.tg-o:not(:disabled):active { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); }
.tg-o:disabled { cursor: default; }
.tg-coin { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 16px; color: #fff; text-shadow: 0 1.5px 0 rgba(27, 18, 54, 0.5); border: 2px solid var(--ink); }
.tg-o[data-l="A"] .tg-coin { background: linear-gradient(180deg, #FFC59E, #FF8A3D); }
.tg-o[data-l="B"] .tg-coin { background: linear-gradient(180deg, #9CCBFF, #3B8EF0); }
.tg-o[data-l="C"] .tg-coin { background: linear-gradient(180deg, #D3B8FF, #9A5CF0); }
.tg-o[data-l="D"] .tg-coin { background: linear-gradient(180deg, #FFE58A, #F0A800); }
.tg-ot { flex: 1; min-width: 0; font-family: var(--head); font-weight: 700; font-size: 17px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-pct { font-family: var(--head); font-weight: 800; font-size: 13px; padding: 1px 7px; border-radius: 99px; background: #2ECC71; color: #fff; text-shadow: 0 1px 0 rgba(27, 18, 54, 0.35); }
.tg-bar { position: absolute; left: 0; bottom: 0; height: 6px; width: var(--w, 0%); background: #2ECC71; transition: width 0.6s ease-out; }
.tg-o.lead { box-shadow: 0 0 0 3px #FFD45C, 0 6px 0 var(--ink); }
.tg-o.cut { background: rgba(255, 255, 255, 0.06); border-style: dashed; border-color: rgba(255, 255, 255, 0.35); box-shadow: none; color: rgba(255, 255, 255, 0.45); }
.tg-o.cut .tg-coin, .tg-o.cut .tg-pct, .tg-o.cut .tg-bar { visibility: hidden; }
.tg-o.cut .tg-ot { font-size: 14px; }
.tg-o.correct { background: linear-gradient(180deg, #9CF07E, #2FAE45); color: #fff; text-shadow: 0 1.5px 0 rgba(27, 18, 54, 0.4); }
.tg-o.wrong { background: linear-gradient(180deg, #FF8A8A, #D93838); color: #fff; text-shadow: 0 1.5px 0 rgba(27, 18, 54, 0.4); }
.tg-o.dim { opacity: 0.55; }

/* Açılış ve bitiş katmanı */
.tg-overlay { position: absolute; inset: 58px 0 0; border-radius: 0 0 30px 30px; display: grid; place-items: center; padding: 24px; text-align: center; background: rgba(28, 22, 56, 0.8); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tg-overlay[hidden] { display: none; }
.tg-ov { display: grid; gap: 12px; justify-items: center; max-width: 280px; }
.tg-ov h3 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.05; }
.tg-ov p { margin: 0; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
.tg-go { margin-top: 4px; height: 50px; padding: 0 28px; border-radius: 16px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); background: linear-gradient(180deg, #A79BFF, #6C5CE7 55%, #5443D6); font-family: var(--head); font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 1.5px 0 var(--ink); }
.tg-go:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); }
.tg-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.tg-rank li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-weight: 800; font-size: 14px; }
.tg-rank li.me { background: rgba(255, 201, 60, 0.18); box-shadow: inset 0 0 0 2px #FFC93C; }
.tg-rank em { font-style: normal; color: rgba(255, 255, 255, 0.6); width: 16px; }
.tg-rank b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Küçük açılır yazı (+10 sn, 2x PUAN!) */
.tg-pop { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); padding: 4px 12px; border-radius: 12px; border: 2.5px solid var(--ink); background: #FFC93C; color: var(--ink); font-family: var(--head); font-weight: 800; font-size: 15px; pointer-events: none; animation: tg-pop 1.1s ease-out forwards; z-index: 2; }
@keyframes tg-pop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(0.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -14px); } }

@media (prefers-reduced-motion: no-preference) {
  .tg-o.wrong { animation: tg-shake 0.4s; }
  .tg-o.correct { animation: tg-bounce 0.45s; }
  .tg-o.cut { animation: tg-cut 0.35s ease-out; }
}
@keyframes tg-shake { 0%, 100% { translate: 0; } 20% { translate: -9px; } 40% { translate: 9px; } 60% { translate: -6px; } 80% { translate: 5px; } }
@keyframes tg-bounce { 0% { scale: 1; } 40% { scale: 1.04; } 100% { scale: 1; } }
@keyframes tg-cut { 0% { clip-path: inset(0 0 0 0); } 50% { clip-path: inset(0 48% 0 48%); } 100% { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .tg-pop { animation-duration: 1.4s; } .tg *, .tg { transition: none !important; } }

/* ---------- Rakipten gelen saldırı ---------- */
.tg-attack { position: absolute; left: 14px; right: 14px; top: 38%; z-index: 4; display: grid; justify-items: center; gap: 4px; padding: 16px 14px 14px; border-radius: 18px; border: 3px solid var(--ink); background: linear-gradient(180deg, #3A2E73, #241B4D); box-shadow: 0 7px 0 var(--ink), 0 20px 50px rgba(0, 0, 0, 0.5); text-align: center; }
.tg-attack img { width: 64px; height: 64px; margin-top: -46px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.tg-attack b { font-family: var(--head); font-weight: 800; font-size: 19px; line-height: 1.1; }
.tg-attack span { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.8); max-width: 26ch; }
@media (prefers-reduced-motion: no-preference) { .tg-attack:not([hidden]) { animation: tg-in 0.35s cubic-bezier(.2, 1.4, .4, 1); } }
@keyframes tg-in { from { opacity: 0; transform: scale(0.85) translateY(10px); } }

/* Şık üstündeki etki katmanı (buz, mayın, mürekkep) */
.tg-o.blocked { touch-action: none; }
.tg-fx { position: absolute; inset: -2px; border-radius: 14px; pointer-events: none; background-size: 100% 100%; background-position: center; z-index: 1; transition: opacity 0.4s, transform 0.4s; }
.tg-fx.gone { opacity: 0; transform: scale(1.08); }
.fx-ink { background-size: cover; }
.tg-fxn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 1px 7px; border-radius: 99px; background: #2E6FE0; border: 2px solid var(--ink); color: #fff; font-family: var(--head); font-weight: 800; font-size: 12px; }
.tg-o.hit { animation: tg-hit 0.18s; }
@keyframes tg-hit { 50% { translate: 0 2px; scale: 0.985; } }
.tg-mine { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4)); transition: transform 0.45s ease-in, opacity 0.45s; }
@media (prefers-reduced-motion: no-preference) { .tg-mine { animation: tg-drift 2.8s ease-in-out infinite alternate; } }
@keyframes tg-drift { from { translate: -18px -3px; rotate: -12deg; } to { translate: 18px 3px; rotate: 12deg; } }
.tg-mine.flung { animation: none; transform: translate(140px, -60px) rotate(220deg) scale(0.6); opacity: 0; }
.tg-o.mine-locked { filter: saturate(0.4) brightness(0.85); }
.tg-o.mine-locked::after { content: ""; position: absolute; inset: 0; background: rgba(217, 56, 56, 0.25); z-index: 1; }
.tg-lock { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; padding: 1px 8px; border-radius: 99px; background: #D93838; border: 2px solid var(--ink); color: #fff; font-family: var(--head); font-weight: 800; font-size: 12px; }
.tg-lock::before { content: attr(data-l) " "; }
