/* Onze web — günlük kadro.
   Düzen: tek sütun, mobil önce; tebeşir çizgili grid gece sahasının üstünde,
   altta skor tabelası + kart yuvaları, arama ve sonuç alttan açılan sayfalar. */
:root {
  --night: #0A2219;        /* stadyum gecesi */
  --turf-a: #0F3425;       /* biçme şeridi 1 */
  --turf-b: #123C2B;       /* biçme şeridi 2 */
  --chalk: #EEF3EA;        /* tebeşir, ana metin */
  --chalk-dim: #A9BDB0;    /* ikincil metin */
  --line: rgba(238, 243, 234, .22);
  --kit: #34D27F;          /* Onze yeşili (uygulama teması) */
  --kit-ink: #06261A;
  --yellow: #F6C41B;
  --red: #E2412E;
  --sheet: #15392A;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Public Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
a { color: var(--kit); }
:focus-visible { outline: 2px solid var(--kit); outline-offset: 2px; }

.page {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-block: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Üst bant */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--chalk); }
.brand b { font: 800 30px/1 var(--display); letter-spacing: .04em; }
.brand span { font: 600 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-dim); }
.top nav { display: flex; gap: 6px; }
.chip-btn {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--chalk);
}
.chip-btn:hover { border-color: var(--chalk-dim); }

/* Mod sekmeleri: Kadro / Kariyer */
.tabs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.tab {
  padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--chalk-dim);
  font: 700 13px/1 var(--body); letter-spacing: .02em;
}
.tab.on { background: var(--chalk); color: var(--night); }

/* Saha: grid */
.pitch {
  position: relative;
  border: 2px solid var(--chalk);
  border-radius: 6px;
  padding: 8px;
  background: repeating-linear-gradient(90deg, var(--turf-a) 0 12.5%, var(--turf-b) 12.5% 25%);
  box-shadow: 0 0 0 6px rgba(52, 210, 127, .06), 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.pitch::before { /* orta yuvarlak, tebeşir */
  content: ""; position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border: 1.5px solid var(--line); border-radius: 50%; pointer-events: none;
}
.grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.corner, .head, .cell { aspect-ratio: 1; border-radius: 4px; min-width: 0; }
.corner {
  display: grid; place-content: center; text-align: center; gap: 2px;
  font: 800 13px/1.05 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--chalk-dim);
}
.corner strong { font-size: 22px; color: var(--chalk); letter-spacing: .02em; }
.head {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 4px; text-align: center;
  background: rgba(10, 34, 25, .78);
  border: 1px solid var(--line);
}
.head .ico { font-size: 22px; line-height: 1; }
.head .name {
  font: 700 clamp(12px, 3.4vw, 16px)/1.05 var(--display); letter-spacing: .03em; text-transform: uppercase;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.head .kind { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-dim); }
.cell {
  position: relative; cursor: pointer;
  border: 1.5px dashed var(--line); background: rgba(6, 26, 18, .35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; text-align: center;
  transition: background .15s, border-color .15s, transform .15s;
}
.cell:hover:not(.filled):not([disabled]) { border-color: var(--chalk); background: rgba(6, 26, 18, .55); }
.cell .plus { font: 300 28px/1 var(--body); color: var(--chalk-dim); }
.cell.filled { cursor: default; border: 1.5px solid var(--kit); background: var(--kit); color: var(--kit-ink); }
.cell.filled .pname { font: 800 clamp(12px, 3.3vw, 15px)/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.cell.filled .rar { font-size: 10px; font-weight: 700; margin-top: 4px; opacity: .8; }
.cell.pop { animation: pop .35s ease-out; }
.cell.shake { animation: shake .35s; }
.cell[disabled] { cursor: default; opacity: .55; }
@keyframes pop { 0% { transform: scale(.85); } 70% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Skor tabelası + kartlar */
.board {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 2px;
}
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font: 800 40px/1 var(--display); font-variant-numeric: tabular-nums; }
.score span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-dim); }
.cards { display: flex; gap: 8px; align-items: center; }
.card {
  width: 22px; height: 30px; border-radius: 3px; border: 1.5px dashed var(--line); transform: rotate(-8deg);
}
.card.on.yellow { background: var(--yellow); border: none; animation: flip .4s ease-out; }
.card.on.red { background: var(--red); border: none; animation: flip .4s ease-out; }
@keyframes flip { 0% { transform: rotate(-30deg) scale(.4); } 100% { transform: rotate(-8deg) scale(1); } }
.hint { font-size: 13px; color: var(--chalk-dim); margin: 0; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; padding: 14px 18px; cursor: pointer;
  background: var(--kit); color: var(--kit-ink); font-weight: 800; font-size: 16px; text-decoration: none;
}
.cta.ghost { background: transparent; color: var(--chalk); border: 1.5px solid var(--line); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

/* Alt sayfalar (arama, sonuç, nasıl oynanır) */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-width: 560px; margin: 0 auto; max-height: 88vh; overflow: auto;
  background: var(--sheet); border-top: 2px solid var(--chalk); border-radius: 14px 14px 0 0;
  padding: 16px max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 -20px 50px rgba(0,0,0,.5);
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet h2 { margin: 0; font: 800 26px/1.05 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.sheet .crit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--chalk-dim); }
.sheet .crit b { color: var(--chalk); font-weight: 700; }
.close { margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 18px; line-height: 1; }
.search {
  width: 100%; border: 1.5px solid var(--kit); background: var(--night); color: var(--chalk);
  border-radius: 10px; padding: 13px 14px; font: 600 17px/1.2 var(--body);
}
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.results button {
  width: 100%; text-align: start; display: flex; align-items: center; gap: 10px;
  background: none; border: none; border-radius: 8px; padding: 11px 10px; cursor: pointer; font-size: 16px;
}
.results button:hover, .results button.active { background: rgba(238, 243, 234, .08); }
.results .flag { width: 24px; text-align: center; }
.results .used { margin-inline-start: auto; font-size: 12px; color: var(--chalk-dim); }
.muted { color: var(--chalk-dim); font-size: 14px; margin: 0; }

.final { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.final .big { font: 800 64px/1 var(--display); }
.final .emoji { font-size: 26px; line-height: 1.15; letter-spacing: 2px; white-space: pre; }
.countdown { font: 700 22px/1 var(--display); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.stats { display: flex; gap: 18px; justify-content: center; }
.stats div { display: flex; flex-direction: column; align-items: center; }
.stats b { font: 800 26px/1 var(--display); }
.stats span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-dim); }
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  background: var(--chalk); color: var(--night); font-weight: 700; padding: 10px 16px; border-radius: 999px;
}
.steps { margin: 0; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: 6px; }
footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 12px; color: var(--chalk-dim); }
footer a { color: var(--chalk-dim); }
.loading { padding: 40px 0; text-align: center; color: var(--chalk-dim); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.cta.wide { width: 100%; }

/* Günün Kariyeri */
.bands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.band {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 8px;
  border: 1px solid var(--line); font: 700 14px/1 var(--body); color: var(--chalk-dim);
}
.band b { font-weight: 800; }
.band.on { border-color: var(--chalk); color: var(--chalk); }
.band.won { background: rgba(52, 210, 127, .15); border-color: var(--kit); color: var(--chalk); }
.band.lost { background: rgba(226, 65, 46, .12); border-color: rgba(226, 65, 46, .6); }
.puzzle {
  display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 6px;
  border: 2px solid var(--chalk);
  background: repeating-linear-gradient(0deg, var(--turf-a) 0 40px, var(--turf-b) 40px 80px);
}
/* Kulüp yolu: gerçek kronolojik sıra, bu yüzden numaralı */
.trail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.trail li { display: flex; align-items: center; gap: 12px; position: relative; padding: 7px 0; }
.trail li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 15px; top: 36px; bottom: -8px; border-inline-start: 2px dashed var(--line);
}
.trail .dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); font: 800 15px/1 var(--display); color: var(--chalk-dim); background: var(--night);
}
.trail .club { font: 800 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--chalk-dim); }
.trail li.open .dot { border-color: var(--kit); background: var(--kit); color: var(--kit-ink); }
.trail li.open .club { color: var(--chalk); }
.clues { display: flex; flex-wrap: wrap; gap: 8px; }
.clue { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(10, 34, 25, .7); border: 1px solid var(--line); }
.clue.dim { color: var(--chalk-dim); }
.wrongs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--red); }
.worth { margin: 0; font: 700 14px/1.2 var(--body); color: var(--yellow); }
.answer { margin: 0; font-size: 16px; }
.answer b { font: 800 24px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.recap { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.recap div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: start; }
.recap .sq { letter-spacing: 1px; }
.recap small { color: var(--chalk-dim); font-size: 12px; }

/* Dil seçimi */
.langs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.langs a {
  display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--chalk); font-weight: 700;
}
.langs a.on { border-color: var(--kit); background: rgba(52, 210, 127, .12); }
.langhint {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px;
  border: 1px solid var(--kit); background: rgba(52, 210, 127, .1); font-size: 14px; font-weight: 700;
}
.langhint a { color: var(--chalk); text-decoration: none; }
.langhint .close { width: 28px; height: 28px; font-size: 15px; }
/* Arapça: Latin yazılı futbolcu/kulüp adları kendi yönünde kalır */
[dir="rtl"] [lang="en"] { unicode-bidi: isolate; }
[dir="rtl"] .final .emoji, [dir="rtl"] .recap .sq { direction: ltr; }
[dir="rtl"] .pitch { direction: ltr; } /* paylaşım emojisiyle aynı sütun sırası */
[dir="rtl"] .pitch .head, [dir="rtl"] .pitch .cell { direction: rtl; }
