/* Takım oyunları: takım rozetleri, harita ve çizim tuvali. Telefon, perde ve düzenleyici aynı dosyayı kullanır. */

/* ---------- takımlar ---------- */
.takim-rozet { display: inline-block; margin: -10px 0 14px; border: 2px solid var(--line); border-radius: 999px; padding: 3px 14px; font-size: .88rem; font-weight: 650; }
.takim-cipleri { display: flex; gap: .4em; flex-wrap: wrap; }
.takim-cip { border: 2px solid var(--line); border-radius: 999px; padding: .1em .7em; font: 600 .82em var(--mono); white-space: nowrap; }
.takim-cip b { font-family: system-ui, sans-serif; font-weight: 650; }
.lider-duzen { display: grid; gap: 1.4em; width: 100%; justify-items: center; }
/* Takım varsa asıl tablo takımlarındır; yanında en çok puan alan altı kişi küçük yazıyla durur. */
.lider-duzen.takimli { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
.lider-duzen.takimli .puan-tablosu:not(.takim-tablosu) li { font-size: 1.05em; padding: .5em 1em; }
.lider-duzen.takimli .puan-tablosu:not(.takim-tablosu) li:nth-child(n+7) { display: none; }
.lider-duzen.takimli .takim-tablosu li { font-size: 1.5em; border-width: 3px; }
.lider-duzen.takimli .takim-tablosu li:nth-child(1) { font-size: 1.9em; background: var(--night-2); color: var(--ink); }
.takim-tablosu small { color: var(--dim); font-weight: 400; font-size: .6em; }

/* ---------- harita ---------- */
.harita { display: block; width: 100%; height: auto; border-radius: 10px; }
.harita-yukleniyor { padding: 2em 1em; text-align: center; color: var(--dim); }
.harita .deniz { fill: color-mix(in srgb, var(--accent) 7%, var(--night)); }
.harita .ulke { fill: var(--night-3); stroke: var(--line); stroke-width: 1.2; }
.harita .ulke.ana, .harita.vurgusuz .ulke { fill: color-mix(in srgb, var(--accent) 24%, var(--night-3)); }
.harita .ulke.ana { stroke: var(--dim); }
.harita.secilebilir { cursor: crosshair; }
.harita .isaret.tahmin { fill: var(--ink); fill-opacity: .8; stroke: var(--night); stroke-width: 1.5; }
.harita .isaret.benim { fill: var(--accent); stroke: var(--ink); stroke-width: 3; }
.harita .isaret.dogru { fill: var(--ok); stroke: var(--ink); stroke-width: 4; }
.harita .isaret-etiket { font: 700 26px system-ui, sans-serif; fill: var(--ink); paint-order: stroke; stroke: var(--night); stroke-width: 6px; }
.harita .uzaklik-cizgisi { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 8 7; opacity: .8; }

/* Telefonda harita ekrandan geniştir; yatay kaydırılır. */
.harita-kaydir { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.harita-kaydir.turkiye .harita { width: 190%; }
.harita-kaydir.dunya .harita { width: 320%; }

/* Perdede harita, başlık ve geri sayımdan kalan yüksekliğe sığar; oranı bozulmadan ortalanır. */
.adim-govde.oyun-govde { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.harita-duzen { flex: 1 1 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 1.2em; width: 100%; min-height: 0; align-items: center; }
.harita-duzen:has(.en-yakinlar:not(:empty)) { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.harita-duzen .harita-kutu { min-width: 0; min-height: 0; height: 100%; }
.harita-duzen .harita { width: 100%; height: 100%; }
.en-yakinlar { display: grid; gap: .4em; align-content: center; }
.en-yakinlar:empty { display: none; }
.en-yakinlar li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; gap: .6em; padding: .5em .8em; border: 1px solid var(--line); border-radius: 10px;
  background: var(--night-2); font-size: 1.05em; font-weight: 600; }
.en-yakinlar .yer { font-family: var(--mono); color: var(--dim); }
.en-yakinlar .puan { font: 600 .9em var(--mono); color: var(--accent); white-space: nowrap; }

/* ---------- çizim ---------- */
.tuval { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; border: 2px solid var(--line); background: #fff; touch-action: none; display: block; }
.tuval-araclari { display: flex; gap: 6px; flex-wrap: wrap; }
.renk-dugme { flex: 1 1 0; max-width: 34px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); padding: 0; }
.renk-dugme[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.tuval-satir { display: flex; gap: 6px; flex-wrap: wrap; }
.tuval-satir .kucuk-dugme { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: .9rem; color: var(--dim); }
.tuval-satir .kucuk-dugme[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
.tuval-satir .kucuk-dugme.tehlike { color: var(--bad); margin-left: auto; }
.cizim-ipucu { font: 700 1.6rem var(--mono); letter-spacing: .12em; text-align: center; white-space: pre-wrap; }

.cizim-ust { display: flex; align-items: center; justify-content: center; gap: 2em; }
.cizim-ust .cizim-ipucu { font-size: 2.6em; }
.cizim-ust .cizim-ipucu.acik { color: var(--ok); letter-spacing: .04em; }
.cizim-ust .geri-sayim { font-size: 2.6em; }
.cizim-duzen { flex: 1 1 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(11em, 16em); grid-template-rows: minmax(0, 1fr); gap: 1.2em; width: 100%; min-height: 0; }
/* Sütun sayısı ve kart genişliği sahne-adim.js içinde, kalan alana göre hesaplanır. */
.tuvaller { display: grid; gap: .8em; height: 100%; min-height: 0; justify-content: center; align-content: center; overflow: hidden; }
.tuval-kart { margin: 0; border: 3px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.tuval-kart canvas { display: block; width: 100%; aspect-ratio: 4 / 3; }
.tuval-kart figcaption { background: var(--night-2); color: var(--ink); padding: .35em .7em; font-size: .95em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bilenler { display: grid; gap: .35em; align-content: start; max-height: 100%; overflow: hidden; }
.bilenler li { display: flex; justify-content: space-between; gap: .8em; padding: .4em .7em; border: 2px solid var(--ok-line); border-radius: 10px; background: var(--ok-bg);
  color: var(--ok); font-weight: 600; }
.bilenler .puan { font-family: var(--mono); }
.bilenler:empty::before { content: 'Henüz bilen yok'; color: var(--dim); }

/* ---------- fotoğraftan bul ---------- */
.foto-sahne { flex: 1 1 0; min-height: 0; width: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; gap: .4em; }
.foto-sahne[hidden] { display: none; }
.foto-sahne img { flex: 1 1 0; min-height: 0; width: 100%; object-fit: contain; border-radius: 12px; }
.foto-kaynak { font-size: .72em; color: var(--dim); text-align: center; overflow-wrap: anywhere; }
.harita-duzen { position: relative; }
.foto-kose { position: absolute; left: .6em; top: .6em; width: 21%; max-height: 45%; object-fit: cover; border-radius: 8px;
  border: 3px solid var(--ink); box-shadow: 0 6px 22px rgb(0 0 0 / .45); z-index: 1; }

.foto-telefon { margin: 0; cursor: zoom-in; }
.foto-telefon img { display: block; width: 100%; max-height: 30vh; object-fit: contain; border-radius: 10px; background: var(--night-2); }
.foto-telefon .foto-kaynak { margin-top: 4px; font-size: .7rem; text-align: left; }
.foto-telefon.buyuk { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; justify-content: center;
  padding: 12px; cursor: zoom-out; }
.foto-telefon.buyuk img { max-height: 88vh; background: transparent; }

.foto-secici { display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.foto-secici h3 { font-size: 1rem; margin: 0; }
.foto-secili img { display: block; max-width: 100%; max-height: 240px; border-radius: 10px; }
.foto-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; max-height: 340px; overflow-y: auto; }
.foto-izgara button { padding: 0; border: 3px solid transparent; border-radius: 9px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--night-3); cursor: pointer; }
.foto-izgara button[aria-pressed="true"] { border-color: var(--accent); }
.foto-izgara img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- kaç? (sayı tahmini) ---------- */
.sayi-alan { flex: 1 1 0; min-height: 0; width: 100%; display: grid; align-content: center; gap: 1.4em; }
.sayi-bekle { font-size: 1.6em; color: var(--dim); text-align: center; }
.sayi-ust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2em; align-items: center; }
.sayi-dogru { display: grid; justify-items: center; gap: .2em; }
.sayi-dogru span { font: 600 .9em var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.sayi-dogru strong { font: 700 4.2em/1 var(--mono); color: var(--ok); font-variant-numeric: tabular-nums; }
.sayi-dogrusu { width: 100%; max-height: 26vh; }
.sayi-dogrusu .eksen { stroke: var(--line); stroke-width: 3; }
.sayi-dogrusu .nokta { fill: var(--ink); fill-opacity: .85; stroke: var(--night); stroke-width: 1.5; }
.sayi-dogrusu .dogru-cizgi { stroke: var(--ok); stroke-width: 5; }
.sayi-dogrusu .eksen-yazi { font: 600 22px var(--mono); fill: var(--dim); }

/* ---------- dokunma yarışı ---------- */
.yaris-aciklama { font: 600 .9em var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.yaris { width: min(100%, 60em); display: grid; gap: .7em; }
.yaris-satir { display: grid; grid-template-columns: minmax(6em, 14em) minmax(0, 1fr) 4.5em; gap: 1em; align-items: center; font-size: 1.3em; font-weight: 650; }
.yaris-satir .ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yaris-satir .serit { height: 1.5em; border-radius: 999px; background: var(--night-3); overflow: hidden; }
.yaris-satir .serit i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .25s ease-out; }
.yaris-satir .sayi { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

.dokunma-sayac { font: 700 3.2rem/1 var(--mono); text-align: center; font-variant-numeric: tabular-nums; }
.dokunma-dugme { display: block; width: min(76vw, 300px); aspect-ratio: 1; margin: 6px auto 0; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 60%);
  color: var(--accent-ink, #160803); font: 800 2.1rem system-ui, sans-serif; letter-spacing: .04em;
  box-shadow: 0 10px 30px rgb(0 0 0 / .35); touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.dokunma-dugme.vur { animation: vur .12s ease-out; }
.dokunma-dugme.hizli { background: radial-gradient(circle at 35% 30%, #ff9a9a, #e5484d 60%); color: #fff; }
.dokunma-dugme:disabled { opacity: .55; }
@keyframes vur { 50% { transform: scale(.93); } }

/* ---------- hızlı parmak ---------- */
.basanlar { width: min(100%, 52em); display: grid; gap: .5em; }
.basanlar li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto 4.5em auto auto; gap: .8em; align-items: center; padding: .55em 1em;
  border: 2px solid var(--line); border-radius: 12px; background: var(--night-2); font-size: 1.25em; font-weight: 600; }
.basanlar li.ilk { font-size: 1.7em; border-color: var(--accent); background: var(--accent-bg); color: var(--accent-fg); }
.basanlar .yer, .basanlar .sure { font-family: var(--mono); color: var(--dim); }
.basanlar li.ilk .yer, .basanlar li.ilk .sure { color: inherit; }
.basanlar .ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basanlar .puan { font-family: var(--mono); color: var(--ok); text-align: right; }
.basanlar .puan-ver { font: 600 .62em var(--mono); padding: .35em .6em; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); cursor: pointer; }
.basanlar .puan-ver:hover { color: var(--ink); border-color: var(--accent); }
