:root {
  --bg: #0a1811;
  --bg-glow: #1b4a31;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef5ef;
  --muted: #98b0a2;
  --accent: #c8f53a;
  --accent-ink: #11210a;
  --p1: #ff5d4f;
  --p1-soft: rgba(255, 93, 79, 0.15);
  --p2: #3fa7ff;
  --p2-soft: rgba(63, 167, 255, 0.15);
  --good: #3ddc84;
  --bad: #ff4d6a;
  --radius: 18px;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--body);
  background:
    radial-gradient(1100px 520px at 50% -8%, var(--bg-glow) 0%, transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 90px, transparent 90px 180px),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--panel-2);
  font-family: var(--body);
  font-size: 0.85em;
  font-weight: 700;
  text-align: center;
}
.p1 { --pc: var(--p1); --pc-soft: var(--p1-soft); }
.p2 { --pc: var(--p2); --pc-soft: var(--p2-soft); }
span.p1, span.p2, i.p1, i.p2 { color: var(--pc); }

/* Üst bar */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
}
.brand {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 2px;
  color: var(--accent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; }
.brand-logo { flex: none; width: 38px; height: 38px; }
.brand-text span { color: var(--muted); margin: 0 3px; }
.icon-btn {
  grid-column: -2; /* skor tablosu gizliyken de sağda kalsın */
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  font-size: 18px;
}
.scoreboard {
  justify-self: center;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.scoreboard[hidden] { display: none; }
.sb { display: flex; align-items: center; gap: 12px; padding: 6px 14px; }
.sb-name { font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-score {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  min-width: 40px;
  padding: 4px 8px 0;
  border-radius: 8px;
  background: var(--pc);
  color: #fff;
  text-align: center;
}
.sb-score.bump { animation: bump 0.5s ease; }
.sb-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-inline: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
}
.sb-mid small { color: var(--muted); font-weight: 500; font-size: 11px; }

/* Ekranlar */
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 8px 24px 32px; }
.screen { display: none; }
.screen.active { display: block; animation: enter 0.25s ease; }
.screen-title { text-align: center; font-size: 22px; margin: 18px 0 26px; }
.actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.14); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.big { display: block; margin: 30px auto 0; padding: 16px 48px; font-size: 18px; border-radius: 14px; }
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Kurulum */
.hero { text-align: center; padding: 24px 0 8px; }
.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(84px, 16vw, 150px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 6px;
  color: var(--accent);
  text-shadow: 0 8px 40px rgba(200, 245, 58, 0.25);
}
.hero-title.long { font-size: clamp(56px, 15vw, 150px); } /* uzun ad telefona sığsın */
.hero-sub { max-width: 520px; margin: 14px auto 0; color: var(--muted); font-size: 17px; line-height: 1.5; }

/* Lider tablosu: geniş ekranda ortadaki sütunun sağında (orta içerik kaymaz), dar ekranda kurulumun altında */
.setup-layout { position: relative; }
.leaderboard { max-width: 560px; margin: 28px auto 0; padding: 18px 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.leaderboard[hidden] { display: none; }
.leaderboard h3 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 400; letter-spacing: 1px; color: var(--accent); }
.lb-sub { margin: 2px 0 12px; color: var(--muted); font-size: 13px; }
.lb-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lb-list li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-weight: 600; }
.lb-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.lb-rank { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--muted); text-align: center; }
.lb-list li:nth-child(-n + 3) .lb-rank { color: var(--accent); }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lb-list .lb-empty { display: block; background: none; color: var(--muted); font-weight: 500; font-size: 14px; line-height: 1.5; }
/* Sütun 932px + iki yanda 48px boşluk + 280px kutu + kenar payı sığınca */
@media (min-width: 1640px) {
  .leaderboard { position: absolute; top: 24px; left: calc(100% + 48px); width: 280px; margin: 0; }
}
.players-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.player-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--pc);
  border-radius: var(--radius);
  background: var(--pc-soft);
}
.pc-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--pc); }
.player-card input {
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  padding: 4px 0;
  font-size: 22px;
  font-weight: 700;
  outline: none;
}
.player-card input:focus { border-bottom-color: var(--pc); }
.settings { display: flex; justify-content: center; gap: 28px; margin-top: 24px; flex-wrap: wrap; }
.setting { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.seg button { border: 0; background: none; white-space: nowrap; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--text); color: var(--bg); }
.howto { max-width: 560px; margin: 28px auto 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.howto summary { cursor: pointer; font-weight: 700; }
.howto ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.data-status { margin-top: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.data-status.bad { color: var(--bad); }
.data-status code { color: var(--text); }

/* Geri sayım */
.count {
  font-family: var(--display);
  font-size: clamp(180px, 38vw, 340px);
  line-height: 0.85;
  color: var(--text);
}
.count.go { color: var(--accent); font-size: clamp(110px, 22vw, 210px); }
.count.pop { animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.count-hint { color: var(--muted); font-size: 18px; margin-top: 10px; }

/* Takım seçimi */
.vs { align-self: center; margin-top: 30px; font-family: var(--display); font-size: 40px; color: var(--muted); }
.picker { position: relative; }
.picker-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); }
.picker-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.picker-box:focus-within { border-color: var(--pc); }
.picker.chosen .picker-box { border-color: var(--pc); background: var(--pc-soft); }
.picker-box input { flex: 1; min-width: 0; border: 0; background: none; padding: 16px; font-size: 20px; font-weight: 700; outline: none; }
.dice { border: 0; background: none; padding: 0 14px; font-size: 22px; cursor: pointer; opacity: 0.7; }
.dice:hover { opacity: 1; }
.suggest {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #142a1e;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.suggest[hidden] { display: none; }
.suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li small { color: var(--muted); white-space: nowrap; }
.suggest li.active, .suggest li:hover { background: var(--pc-soft); }
.msg { min-height: 24px; margin: 22px 0 0; text-align: center; font-weight: 600; }
.msg.bad { color: var(--bad); }

/* Yarış */
.matchup { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center; gap: 16px; margin-top: 10px; }
.team-badge { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.team-badge .crest svg { filter: drop-shadow(0 0 10px var(--pc)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.team-name { font-weight: 800; font-size: 18px; }
.matchup-mid { text-align: center; }
.common-count { color: var(--muted); font-weight: 600; }
.common-count b { color: var(--text); font-size: 20px; }
.timer { height: 10px; margin: 12px 0 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.timer-bar { height: 100%; background: var(--accent); transform-origin: left; transition: transform 0.1s linear; }
.timer-bar.low { background: var(--bad); }
.timer-text { font-family: var(--display); font-size: 40px; line-height: 1; }

.answer { display: none; flex: 1; flex-direction: column; justify-content: center; gap: 12px; padding: 22px; }
.answer-who { font-weight: 800; color: var(--pc); }
.answer-row { display: flex; gap: 10px; }
.answer-row input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--pc);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px;
  font-size: 20px;
  font-weight: 700;
  outline: none;
}
.answer-timer { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.answer-timer div { height: 100%; background: var(--pc); transform-origin: left; transition: transform 0.1s linear; }

/* Sonuç */
.result { margin-top: 14px; padding: 26px; border-radius: 22px; text-align: center; border: 2px solid var(--pc, var(--line)); background: var(--pc-soft, var(--panel)); }
.result-kicker { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--pc, var(--muted)); }
.result-main { font-family: var(--display); font-size: 64px; line-height: 1; margin-top: 6px; }
.result-sub { margin-top: 6px; font-size: 18px; font-weight: 600; }
.attempts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.attempts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; }
.attempts .why { color: var(--muted); }
.list-title { margin: 30px 0 12px; font-size: 16px; }
.common-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
.common-list li { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.common-list li.hit { border-color: var(--good); background: rgba(61, 220, 132, 0.12); }
.cl-name { font-weight: 700; }
.common-list li.cl-more { justify-content: center; color: var(--muted); font-weight: 600; border-style: dashed; }
.cl-spans { display: flex; gap: 12px; font-size: 13px; font-style: normal; }
.cl-spans i { font-style: normal; font-weight: 600; }
#show-all-btn { display: block; margin: 12px auto 0; }
#show-all-btn[hidden] { display: none; }

/* Oyun sonu */
.trophy { font-size: 80px; margin-top: 20px; }
.winner { font-family: var(--display); font-weight: 400; font-size: 64px; margin: 8px 0 0; }
.final-score { font-family: var(--display); font-size: 40px; color: var(--muted); margin: 0; }
.history { max-width: 560px; margin: 24px auto 0; padding: 0; list-style: none; text-align: left; display: grid; gap: 6px; }
.history li { padding: 10px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; }
.history em { color: var(--muted); }

/* Kulüp arması: logo ya da kulüp renkleriyle baş harfler */
/* Kulüp forması (arma yerine, js/ui.js crest): kare kutuda forma çizimi */
.crest { position: relative; display: inline-grid; place-items: center; flex: none; width: 52px; height: 52px; }
.crest svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.crest .kit-text { font-family: var(--display); letter-spacing: 0.3px; }
.crest.sm { width: 30px; height: 30px; font-size: 12px; }
.crest.lg { width: 96px; height: 96px; font-size: 36px; }

.picker-crest { display: flex; padding-left: 12px; }
.picker-crest:empty { display: none; }
.suggest li { align-items: center; }
.sg-name { flex: 1; min-width: 0; }

/* Takım vitrini */
.showcase { margin-top: 36px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.showcase-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.showcase-head h3 { margin: 0; font-size: 16px; }
.showcase-hint { font-size: 13px; font-weight: 600; color: var(--pc); }
.league-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.league-tabs button {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: none;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.league-tabs button.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.club-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px 10px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease, transform 0.08s ease;
}
.club-tile:hover { background: rgba(255, 255, 255, 0.08); }
.club-tile:active { transform: scale(0.96); }
.club-tile.pick-p1 { border-color: var(--p1); background: var(--p1-soft); }
.club-tile.pick-p2 { border-color: var(--p2); background: var(--p2-soft); }
.ct-name { line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-more { display: block; margin: 14px auto 0; }
.grid-more[hidden] { display: none; }
.showcase.disabled { opacity: 0.45; pointer-events: none; }

/* Online oyun */
.og-phase[hidden] { display: none; }
.og-phase[data-phase="over"] { text-align: center; }
.og-count-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58vh; }
.og-pick { max-width: 560px; margin: 18px auto 0; }
#og-pick-bar { transition: transform 0.1s linear; }
.og-notice { font-size: 20px; margin-top: 28px; }
.og-count-teams { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 26px; }
.og-count-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 120px; text-align: center; font-weight: 700; }
.og-count-side .random-tag { color: var(--muted); font-size: 12px; font-weight: 600; }
.og-count-teams .vs { margin-top: 0; font-size: 28px; }
.og-mystery {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px dashed var(--pc);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 30px;
  color: var(--pc);
}
.og-answer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
  margin: 30px auto 0;
  padding: 22px;
  border: 2px solid var(--pc);
  border-radius: 22px;
  background: var(--pc-soft);
  box-shadow: 0 0 0 6px var(--pc-soft), 0 0 50px var(--pc-soft);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.og-answer .answer-timer { visibility: hidden; }
.og-answer.penalty .answer-timer { visibility: visible; }
.og-answer.penalty .answer-row { opacity: 0.45; filter: saturate(0.4); }
.og-answer.shake { animation: shake 0.4s ease; }
.og-answer-msg { min-height: 20px; margin: 0; text-align: center; font-weight: 600; font-size: 14px; }
.og-answer-msg.bad { color: var(--bad); }
.og-answer-msg.good { color: var(--good); }
.og-feed { max-width: 620px; margin: 16px auto 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.og-feed li { padding: 9px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; }
.og-feed .why { color: var(--muted); }
.og-feed .good { color: var(--good); font-weight: 700; }
.og-status { min-height: 20px; margin: 12px 0 0; text-align: center; color: var(--muted); font-weight: 600; }
.team-badge .team-owner { color: var(--pc); font-size: 13px; font-weight: 700; }
.team-badge .random-tag { color: var(--muted); font-size: 12px; }

/* Oyun seçimi: sayfa seçili oyuna göre değişir */
body[data-game="classic"] [data-only]:not([data-only~="classic"]),
body[data-game="xox"] [data-only]:not([data-only~="xox"]),
body[data-game="lineup"] [data-only]:not([data-only~="lineup"]),
body[data-game="ten"] [data-only]:not([data-only~="ten"]),
body[data-game="guess"] [data-only]:not([data-only~="guess"]),
body[data-game="career"] [data-only]:not([data-only~="career"]),
body[data-game="auction"] [data-only]:not([data-only~="auction"]),
body[data-game="hex"] [data-only]:not([data-only~="hex"]) { display: none !important; }
body[data-game="xox"] {
  --p1: #f4f7f1;
  --p1-soft: rgba(244, 247, 241, 0.13);
  --p2: #ffb020;
  --p2-soft: rgba(255, 176, 32, 0.15);
}
body[data-game="xox"] .sb-score { color: var(--bg); }
.game-switch { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; width: fit-content; margin: 10px auto 0; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.game-switch button { border: 0; background: none; white-space: nowrap; padding: 8px 16px; border-radius: 10px; cursor: pointer; font-family: var(--display); font-size: 22px; letter-spacing: 1px; color: var(--muted); }
.game-switch button.on { background: var(--text); color: var(--bg); }

/* XOX */
.xox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.xox-board { display: grid; grid-template-columns: 0.8fr repeat(3, 1fr); gap: 6px; }
.xox-corner { min-height: 0; }
.xox-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 6px 4px; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.xox-flag { width: 46px; height: 34px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.xox-face { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--panel-2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 0 2px var(--line); }
.xox-trophy { width: 64px; height: 64px; object-fit: contain; }
.xox-icon { font-size: 30px; line-height: 1.1; }
.xox-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  aspect-ratio: 1.15;
  padding: 6px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
  text-align: center;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}
button.xox-cell:not(:disabled) { cursor: pointer; }
button.xox-cell:not(:disabled):hover { background: rgba(255, 255, 255, 0.08); }
button.xox-cell:not(:disabled):active { transform: scale(0.97); }
.xox-board.turn-p1 button.xox-cell:not(:disabled):hover, .xox-board.turn-p1 .xox-cell.sel { border-color: var(--p1); }
.xox-board.turn-p2 button.xox-cell:not(:disabled):hover, .xox-board.turn-p2 .xox-cell.sel { border-color: var(--p2); }
.xox-cell.sel { background: rgba(255, 255, 255, 0.1); }
.xox-cell.taken { border-color: var(--pc); background: var(--pc); color: var(--bg); }
.xox-mark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: clamp(60px, 9vw, 104px); line-height: 1; opacity: 0.14; }
.xox-name { position: relative; font-size: 14px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.xox-cell small { position: relative; font-size: 10px; font-weight: 600; opacity: 0.75; }
.xox-cell.open { color: var(--muted); }
.xox-cell.open b { color: var(--text); font-size: 12px; }
.xox-cell.open small { font-size: 11px; line-height: 1.25; opacity: 1; }
.xox-cell.win { box-shadow: 0 0 0 3px var(--accent), 0 0 26px rgba(200, 245, 58, 0.45); }
.xox-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.xox-play { text-align: center; }
.xox-play[hidden], .xox-answer[hidden], #xox-end[hidden], #xox-result[hidden], #xox-pass[hidden], #xox-menu[hidden] { display: none; }
.xox-turn { padding: 10px 12px; border-radius: 12px; background: var(--pc-soft); font-size: 18px; }
.xox-turn b { color: var(--pc); }
.xox-answer { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 14px; border: 2px solid var(--pc); border-radius: 16px; background: var(--pc-soft); text-align: left; }
.xox-answer .answer-who { font-size: 14px; line-height: 1.3; }
.xox-answer .answer-row input { padding: 11px 12px; font-size: 17px; }
.xox-answer .answer-row input:disabled { opacity: 0.5; }
.xox-answer .btn { padding: 10px 14px; }
.xox-side .actions { margin-top: 10px; }
.xox-side .attempts { margin: 0; }
.xox-side .attempts li { flex-wrap: wrap; }
.xox-side .result { margin-top: 0; padding: 18px; }
.xox-side .result-main { font-size: 44px; overflow-wrap: anywhere; }
.xox-side .result-sub { font-family: var(--display); font-size: 30px; color: var(--muted); }

/* İlk 11 */
.lu-home { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; }
.lu-home p { margin: 0; color: var(--muted); font-weight: 600; }
.lu-home .btn.big { margin-top: 6px; }
.lu-home .btn[hidden] { display: none; }
/* Günlük oyunlar (10 Numara, İlk 11): ana sayfada günün konusu ve yeni güne kalan süre, oyunda gün etiketi */
.lu-home .home-left { color: var(--accent); font-size: 14px; }
.lu-home .home-left:empty { display: none; }
.day-tag { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-align: center; text-transform: uppercase; }
.day-left { margin: 0; color: var(--accent); font-weight: 700; text-align: center; }
.day-left[hidden] { display: none; }

.lu-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 4px 0 16px; }
.lu-team { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 18px; }
.lu-team:first-child { justify-content: flex-end; }
.lu-team:last-child { flex-direction: row-reverse; justify-content: flex-end; }
.lu-flag { width: 44px; height: 32px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.lu-score { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.lu-score b { font-family: var(--display); font-size: 34px; font-weight: 400; line-height: 1; }
.lu-score small { color: var(--muted); }
.lu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.lu-pitch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 6px;
  min-height: 600px;
  padding: 18px 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: repeating-linear-gradient(0deg, #1f6a3f 0 12.5%, #1c6039 12.5% 25%);
}
.lu-mark { position: absolute; border: 2px solid rgba(255, 255, 255, 0.22); }
.lu-half { top: 50%; left: 0; right: 0; border-width: 2px 0 0; }
.lu-circle { top: 50%; left: 50%; width: 110px; height: 110px; border-radius: 50%; transform: translate(-50%, -50%); }
.lu-box-top, .lu-box-bottom { left: 22%; right: 22%; height: 15%; }
.lu-box-top { top: -2px; }
.lu-box-bottom { bottom: -2px; }
.lu-line { position: relative; display: flex; justify-content: space-evenly; gap: 4px; }
.lu-player { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 0 1 112px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.lu-player:not(.open) { cursor: default; }
.lu-shirt { width: 46px; height: 43px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4)); transition: transform 0.12s ease; }
.lu-no { font-family: var(--display); font-size: 24px; fill: #fff; stroke: rgba(0, 0, 0, 0.6); stroke-width: 3px; paint-order: stroke; }
.lu-player.open:hover .lu-shirt { transform: translateY(-2px); }
.lu-player.sel .lu-shirt { transform: scale(1.14); filter: drop-shadow(0 0 7px var(--accent)); }
.lu-name { max-width: 100%; padding: 2px 7px; border-radius: 6px; background: rgba(5, 18, 11, 0.82); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lu-player.sel .lu-name { box-shadow: 0 0 0 2px var(--accent); }
.lu-player.found .lu-name { background: var(--good); color: var(--bg); letter-spacing: 0; }
.lu-player.failed .lu-name { background: rgba(255, 77, 106, 0.9); color: #fff; letter-spacing: 0; }
.lu-left { position: absolute; top: -2px; left: calc(50% + 15px); min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; background: var(--bg); color: var(--text); font-size: 11px; font-style: normal; font-weight: 800; line-height: 17px; }
.lu-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lu-title { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 400; letter-spacing: 1px; color: var(--accent); }
.lu-progress { color: var(--muted); font-weight: 600; }
.lu-progress b { color: var(--text); font-size: 20px; }
.lu-guess { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); --pc: var(--accent); }
.lu-guess[hidden], #lu-result[hidden], #lu-giveup[hidden], #lu-next[hidden] { display: none; }
.lu-guess .answer-who { font-size: 14px; }
.lu-guess .answer-row input { padding: 11px 12px; font-size: 17px; text-transform: uppercase; }
.lu-guess .btn { padding: 10px 16px; }
.lu-rows { display: grid; gap: 4px; }
.lu-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.lu-word { display: flex; gap: 3px; }
.lu-tile { display: grid; place-items: center; width: 24px; height: 28px; border: 1px solid var(--line); border-radius: 5px; font-size: 14px; font-weight: 800; }
.lu-tile.typed { border-color: var(--muted); }
.lu-tile.hit { border-color: var(--good); background: var(--good); color: var(--bg); }
.lu-tile.near { border-color: #e8b339; background: #e8b339; color: var(--bg); }
.lu-tile.miss { border-color: transparent; background: rgba(255, 255, 255, 0.16); color: var(--muted); }
.lu-side .actions { margin-top: 2px; }
.lu-side .result { margin-top: 0; padding: 18px; }
.lu-side .result-main { font-size: 48px; }

/* Mod seçimi ve online giriş */
.mode-switch {
  display: flex;
  width: fit-content;
  margin: 28px auto 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.mode-switch button { border: 0; background: none; padding: 10px 20px; border-radius: 10px; font-weight: 700; color: var(--muted); cursor: pointer; }
.mode-switch button.on { background: var(--accent); color: var(--accent-ink); }
.mode-pane[hidden] { display: none; }
.online-name { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin: 28px auto 0; --pc: var(--accent); }
.online-name input, .join-row input {
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  font-size: 20px;
  font-weight: 700;
  outline: none;
}
.online-name input:focus, .join-row input:focus { border-color: var(--accent); }
.online-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.online-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.online-card h3 { margin: 0; font-size: 18px; }
.online-card p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }
/* Rakip bul: aynı oyunu arayan biriyle eşleşme (js/online.js) */
.match-card { align-items: center; margin-top: 22px; text-align: center; border-color: rgba(200, 245, 58, 0.35); }
.match-card .btn.big { margin: 4px 0 0; }
.match-settings { gap: 10px 22px; margin: 2px 0 6px; }
.match-card .btn.big[hidden] { display: none; }
.match-wait { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; font-weight: 700; color: var(--accent); }
.match-wait[hidden] { display: none; }
.match-wait b { font-variant-numeric: tabular-nums; }
.or-line { margin: 18px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.join-row { display: flex; gap: 10px; }
.join-row input { flex: 1; min-width: 0; font-family: var(--display); font-size: 28px; letter-spacing: 6px; text-transform: uppercase; padding: 8px 14px 4px; }
.msg.good { color: var(--good); }

/* Lobi */
.lobby-code { text-align: center; margin-top: 18px; --pc: var(--accent); }
.lc-code {
  margin: 6px 0 14px;
  font-family: var(--display);
  font-size: 104px;
  line-height: 1;
  letter-spacing: 14px;
  color: var(--accent);
  text-shadow: 0 8px 40px rgba(200, 245, 58, 0.25);
  user-select: all;
}
.lc-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.lc-link { margin: 10px 0 0; color: var(--muted); font-size: 13px; word-break: break-all; }
.lobby-players { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.lp {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--pc);
  border-radius: var(--radius);
  background: var(--pc-soft);
}
.lp.empty { border-style: dashed; border-left-style: solid; background: transparent; justify-content: center; color: var(--muted); font-weight: 600; }
.lp.away { opacity: 0.55; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18); }
.lp.away .lp-dot { background: var(--muted); box-shadow: none; }
.lp-name { font-size: 20px; font-weight: 800; }
.lp-tags { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.lp-tags i { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.lp-tags i.warn { color: var(--bad); }
.dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: 0.45; }

.footer { padding: 18px 24px; text-align: center; color: var(--muted); font-size: 12px; }
.footer a { color: inherit; }
.footer-links { margin: 0 0 6px; font-size: 13px; font-weight: 600; }


/* Gizlilik ve hakkında sayfaları */
body.doc .topbar { justify-content: flex-start; }
.brand:link, .brand:visited { text-decoration: none; }
.page { width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; line-height: 1.65; }
.page h1 { margin: 8px 0 4px; font-family: var(--display); font-size: 48px; font-weight: 400; letter-spacing: 1px; color: var(--accent); }
.page h2 { margin: 28px 0 8px; font-size: 19px; }
.page p, .page li { color: #d4e0d8; }
.page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.page a { color: var(--accent); }
.page-date { margin-top: 0; font-size: 13px; color: var(--muted) !important; }
.page-mail { font-size: 20px; font-weight: 700; }
.page-links { margin-top: 32px; font-weight: 600; }

@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bump { 50% { transform: scale(1.35); } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* 10 Numara */
.ten-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 560px; margin: 0 auto; }
.ten-wrap .actions { margin-top: 8px; }
.ten-wrap .result { margin-top: 0; padding: 14px; }
.ten-title { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 400; line-height: 1.1; letter-spacing: 1px; text-align: center; color: var(--accent); }
.ten-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ten-lives { display: flex; gap: 4px; font-size: 24px; line-height: 1; color: var(--bad); }
.ten-lives .gone { color: var(--panel-2); }
.ten-guess[hidden] { display: none; }
.ten-guess .og-answer-msg { min-height: 20px; margin: 6px 0 0; }
.ten-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ten-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 4px 12px 4px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.ten-rank { font-family: var(--display); font-size: 24px; font-weight: 400; text-align: center; color: var(--muted); }
.ten-name { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.ten-flag { display: block; width: 26px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.ten-value { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.ten-row.found { border-color: var(--good); background: rgba(61, 220, 132, 0.14); }
.ten-row.found .ten-rank { color: var(--good); }
.ten-row.missed { border-color: rgba(255, 77, 106, 0.5); }
.ten-row.missed .ten-rank { color: var(--bad); }
.ten-row.missed .ten-name { font-weight: 600; color: var(--muted); }
.ten-row.new { animation: ten-open 0.3s ease; }
@keyframes ten-open { 50% { transform: scale(1.02); } }
.ten-wrong { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ten-wrong:empty { display: none; }
.ten-wrong li { padding: 2px 8px; border-radius: 6px; font-size: 13px; text-decoration: line-through; color: var(--muted); background: var(--panel-2); }
.ten-source { margin: 0; font-size: 12px; text-align: center; color: var(--muted); }

/* Açık artırma (özel tahta): dikey saha, üst ve alt yarıda kutular; kutu içinde değer, altında ad. Ayarlar düğmeyle açılır. */
.au-wrap { width: 100%; max-width: 560px; margin: 0 auto; }
.au-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.au-gear.on { border-color: var(--accent); color: var(--accent); }
.au-stage { position: relative; }
.au-pitch { position: relative; width: 100%; aspect-ratio: 100 / 140; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(180deg, #2f7a2c 0 7.14%, #39892f 7.14% 14.28%); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.au-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.au-lines rect, .au-lines path, .au-lines circle { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 0.6; }
.au-lines .dot { fill: #fff; }
.au-lines .goal { fill: rgba(255, 255, 255, 0.25); }
.au-half { --ball: var(--p1); --ink: #fff; position: absolute; left: 4%; right: 4%; display: flex; flex-direction: column; justify-content: space-evenly; }
.au-half.top { top: 6%; bottom: 52%; }
.au-half.bottom { top: 52%; bottom: 6%; }
.au-row { display: flex; justify-content: space-evenly; }
.au-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 25%; min-width: 0; }
.au-ball { display: grid; place-items: center; width: 62px; height: 62px; border: 3px solid var(--ring, #f3c623); border-radius: 50%; background: var(--ball); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); cursor: text; }
.au-value { width: 100%; padding: 0 4px; border: 0; background: none; outline: none; text-align: center; font-family: var(--display); font-size: 28px; line-height: 1; color: var(--ink); }
.au-value.mid { font-size: 21px; }
.au-value.small { font-size: 15px; }
.au-value::placeholder { color: var(--ink); opacity: 0.45; }
.au-ball:focus-within { outline: 3px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
.au-label { width: 100%; padding: 2px 4px; border: 1px solid transparent; border-radius: 6px; background: none; outline: none; text-align: center; font-size: 14px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); }
.au-label:hover { border-color: rgba(255, 255, 255, 0.35); }
.au-label:focus { border-color: #fff; background: rgba(0, 0, 0, 0.35); }
.au-settings { position: absolute; z-index: 6; top: 10px; right: 10px; display: grid; gap: 14px; width: min(290px, calc(100% - 20px)); padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #142a1e; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.au-settings[hidden] { display: none; }
.au-settings-head { display: flex; align-items: center; justify-content: space-between; }
.au-settings h3 { margin: 0; font-size: 18px; }
.au-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: 14px; cursor: pointer; }
.au-close:hover { color: var(--text); }
.au-group { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.au-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; color: var(--muted); }
.au-step { display: flex; align-items: center; gap: 6px; }
.au-step button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); font-size: 20px; font-weight: 700; cursor: pointer; }
.au-step button:hover { border-color: var(--accent); }
.au-step b { min-width: 26px; text-align: center; font-family: var(--display); font-size: 26px; font-weight: 400; color: var(--text); }
.au-colors { display: flex; flex-wrap: wrap; gap: 7px; }
.au-swatch { position: relative; width: 24px; height: 24px; padding: 0; border: 2px solid rgba(255, 255, 255, 0.25); border-radius: 50%; background: var(--sw); cursor: pointer; }
.au-swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.au-custom { display: grid; place-items: center; overflow: hidden; background: conic-gradient(#ff5d4f, #f3c623, #3ddc84, #3fa7ff, #a66bff, #ff5d4f); }
.au-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.au-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Kariyer yolu: kulüpler soldan sağa oklarla, altında adları; her futbolcu için 20 saniye */
.cr-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 760px; margin: 0 auto; }
.cr-wrap .actions { margin-top: 8px; }
.cr-wrap .result { margin-top: 0; padding: 16px; }
.cr-dots { display: flex; justify-content: center; gap: 8px; }
.cr-dot { width: 14px; height: 14px; border: 2px solid var(--line); border-radius: 50%; background: var(--panel); }
.cr-dot.now { border-color: var(--accent); }
.cr-dot.found { border-color: var(--good); background: var(--good); }
.cr-dot.missed { border-color: var(--bad); background: var(--bad); }
.cr-timer { display: flex; align-items: center; gap: 12px; }
.cr-timer[hidden], .cr-path[hidden], .cr-form[hidden], .cr-reveal[hidden], .cr-next[hidden] { display: none; }
.cr-timer .timer { flex: 1; margin: 0; }
.cr-timer b { min-width: 34px; font-family: var(--display); font-size: 34px; font-weight: 400; line-height: 1; text-align: right; }
.cr-path { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 10px 6px; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cr-step { display: flex; align-items: flex-start; gap: 6px; animation: ten-open 0.3s ease both; }
.cr-club { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; text-align: center; }
.cr-club small { font-size: 12px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; color: var(--text); }
.cr-arrow { margin-top: 12px; font-size: 22px; font-weight: 800; color: var(--accent); }
.cr-form .og-answer-msg { min-height: 20px; margin: 6px 0 0; }
.cr-reveal { display: grid; justify-items: center; gap: 4px; padding: 12px; border: 2px solid; border-radius: 16px; text-align: center; }
.cr-reveal span { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.cr-reveal b { font-family: var(--display); font-size: 40px; font-weight: 400; line-height: 1; }
.cr-reveal.ok { border-color: var(--good); background: rgba(61, 220, 132, 0.12); color: var(--good); }
.cr-reveal.no { border-color: var(--bad); background: rgba(255, 77, 106, 0.1); color: var(--bad); }
.cr-reveal b { color: var(--text); }
.cr-next { justify-self: center; }
.cr-summary { display: grid; gap: 4px; max-width: 320px; margin: 12px auto 0; padding: 0; list-style: none; text-align: left; font-weight: 700; }
.cr-summary li { display: flex; gap: 10px; }
.cr-summary li span { width: 18px; text-align: center; }
.cr-summary li.found span { color: var(--good); }
.cr-summary li.missed { color: var(--muted); }
.cr-summary li.missed span { color: var(--bad); }

/* Futbolcuyu bil: her tahmin bir satır, altı kutu (takım, lig, uyruk, yaş, mevki, forma). Tutan yeşil, tutmayan kırmızı. */
.gs-wrap { --gs-ok: #1f9d57; --gs-no: #b8323f; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 680px; margin: 0 auto; }
.gs-wrap .actions { margin-top: 8px; }
.gs-wrap .result { margin-top: 0; padding: 14px; }
.gs-leagues { display: grid; justify-items: center; gap: 10px; max-width: 620px; margin: 18px auto 0; padding: 14px 16px; border: 1px solid rgba(200, 245, 58, 0.35); border-radius: 16px; background: rgba(200, 245, 58, 0.06); }
.gs-leagues-title { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.5px; text-align: center; text-transform: uppercase; color: var(--accent); }
.gs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.gs-chips li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); font-size: 14px; font-weight: 700; white-space: nowrap; }
.gs-chips img { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.gs-leagues.compact { gap: 8px; width: 100%; margin: 0; padding: 10px 12px; }
.gs-leagues.compact .gs-leagues-title { font-size: 11px; }
.gs-leagues.compact .gs-chips li { padding: 3px 9px; font-size: 12px; }
.gs-progress { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.gs-progress b { color: var(--text); }
.gs-progress:empty, .gs-form[hidden], .gs-board[hidden] { display: none; }
.gs-picker { position: relative; --pc-soft: var(--panel-2); }
.gs-picker .suggest li { justify-content: flex-start; align-items: center; }
.gs-picker .suggest .sg-name { flex: 1; min-width: 0; font-weight: 700; }
.gs-form .og-answer-msg { min-height: 20px; margin: 6px 0 0; }
.gs-head, .gs-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.gs-head span { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-align: center; text-transform: uppercase; color: var(--muted); }
.gs-rows { display: grid; gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.gs-row { display: grid; gap: 6px; }
.gs-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 15px; }
.gs-name b { font-weight: 800; }
.gs-name small { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 600; } /* telefonda kulüp adı burada */
.gs-row.win .gs-name b { color: var(--good); }
.gs-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 78px; padding: 6px 4px; border-radius: 12px; text-align: center; color: #fff; }
.gs-cell.ok { background: var(--gs-ok); }
.gs-cell.no { background: var(--gs-no); }
.gs-cell small { display: -webkit-box; max-width: 100%; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 11px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.gs-cell b { font-family: var(--display); font-size: 32px; font-weight: 400; line-height: 1; }
.gs-arrow { font-style: normal; font-size: 18px; font-weight: 800; line-height: 1; }
.gs-flag { width: 30px; height: 21px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.gs-row.new .gs-cell { animation: gs-flip 0.4s ease both; }
.gs-row.new .gs-cell:nth-child(2) { animation-delay: 0.08s; }
.gs-row.new .gs-cell:nth-child(3) { animation-delay: 0.16s; }
.gs-row.new .gs-cell:nth-child(4) { animation-delay: 0.24s; }
.gs-row.new .gs-cell:nth-child(5) { animation-delay: 0.32s; }
.gs-row.new .gs-cell:nth-child(6) { animation-delay: 0.4s; }
@keyframes gs-flip { from { opacity: 0; transform: rotateX(90deg); } to { opacity: 1; transform: none; } }
.gs-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; font-size: 12px; color: var(--muted); }
.gs-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.gs-legend i.ok { background: var(--gs-ok); }
.gs-legend i.no { background: var(--gs-no); }
.result.gs-won { --pc: var(--good); --pc-soft: rgba(61, 220, 132, 0.12); }
.result.gs-lost { --pc: var(--bad); --pc-soft: rgba(255, 77, 106, 0.1); }
.gs-answer { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.gs-answer span { display: grid; text-align: left; }
.gs-answer b { font-family: var(--display); font-size: 38px; font-weight: 400; line-height: 1; }
.gs-answer small { color: var(--muted); font-weight: 600; }

/* Petek: altıgen kutular. Kutu dıştan kenar rengi, içten (::before) dolgu rengidir; ikisi de altıgen kesilir.
   Parlama, kesilmiş kutuya değil düğmenin kendisine drop-shadow ile verilir. */
/* Petek yalnızca online: kurulumda oda kur / katıl bölümü her zaman açık */
body[data-game="classic"] #pane-online[hidden], body[data-game="hex"] #pane-online[hidden] { display: block; } /* yalnızca online */
.hx-play[hidden], #hx-answer[hidden], #hx-end[hidden], #hx-result[hidden], #hx-pass[hidden], #hx-menu[hidden] { display: none; }
.hx-score { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 14px; max-width: 880px; margin: 4px auto 18px; }
.hx-player-box { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 14px; border: 2px solid var(--pc); border-radius: 14px; background: var(--pc-soft); }
.hx-player-box.p2 { justify-content: flex-end; }
.hx-player-box span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.hx-player-box b { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--pc); }
.hx-meter { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hx-meter small { color: var(--muted); font-size: 12px; font-weight: 600; }
.hx-bar { position: relative; width: 100%; height: 12px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.hx-bar i { position: absolute; top: 0; bottom: 0; background: var(--pc); transition: width 0.3s ease; }
.hx-bar i.p1 { left: 0; border-radius: 99px 0 0 99px; }
.hx-bar i.p2 { right: 0; border-radius: 0 99px 99px 0; }
.hx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; max-width: 960px; margin: 0 auto; }
@media (max-width: 960px) {
  .hx-layout { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
.hx-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hx-board {
  --hx-w: clamp(58px, 17.4vw, 92px);
  --hx-h: calc(var(--hx-w) * 1.1547);
  --hx-gap: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
}
.hx-row { display: flex; gap: var(--hx-gap); }
.hx-row + .hx-row { margin-top: calc(var(--hx-h) * -0.25 + var(--hx-gap) * 0.87); }
.hx-cell {
  --hx-edge: rgba(255, 255, 255, 0.14);
  --hx-fill: #10251a;
  --hx-ink: var(--text);
  position: relative;
  width: var(--hx-w);
  height: var(--hx-h);
  padding: 0;
  border: 0;
  background: none;
  color: var(--hx-ink);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.hx-hex, .hx-hex::before { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hx-hex {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4%;
  background: var(--hx-edge);
  text-align: center;
  transition: background 0.15s ease;
}
.hx-hex::before { content: ""; position: absolute; inset: 2px; background: var(--hx-fill); transition: background 0.15s ease; }
.hx-hex > * { position: relative; }
.hx-hex .crest.sm { width: calc(var(--hx-w) * 0.36); height: calc(var(--hx-w) * 0.36); font-size: calc(var(--hx-w) * 0.13); }
.hx-trophy { width: calc(var(--hx-w) * 0.34); height: calc(var(--hx-w) * 0.38); object-fit: contain; }
.hx-icon { font-size: calc(var(--hx-w) * 0.3); line-height: 1; }
.hx-cell.cup .hx-team { font-size: clamp(8px, calc(var(--hx-w) * 0.115), 11px); }
.hx-flag { width: calc(var(--hx-w) * 0.4); height: calc(var(--hx-w) * 0.28); object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.hx-team { max-width: 100%; font-size: clamp(9px, calc(var(--hx-w) * 0.13), 12px); font-weight: 700; line-height: 1.1; letter-spacing: -0.2px; }
button.hx-cell:not(:disabled):hover { transform: translateY(-2px); }
.hx-board.turn-p1 button.hx-cell:not(:disabled):hover { --hx-edge: var(--p1); }
.hx-board.turn-p2 button.hx-cell:not(:disabled):hover { --hx-edge: var(--p2); }
.hx-cell.own-p1 { --hx-edge: var(--p1); --hx-fill: #5c241f; }
.hx-cell.own-p2 { --hx-edge: var(--p2); --hx-fill: #173c5e; }
.hx-cell:disabled { cursor: default; }
.hx-cell.near { --hx-edge: rgba(200, 245, 58, 0.6); }
.hx-cell.sel { z-index: 2; transform: scale(1.07); filter: drop-shadow(0 0 12px rgba(200, 245, 58, 0.55)); --hx-edge: var(--accent); }
.hx-cell.sel .hx-hex::before { inset: 3px; }
.hx-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.hx-legend li { display: flex; align-items: center; gap: 6px; }
.hx-legend i { width: 14px; height: 16px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: #10251a; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.hx-legend i.painted { background: linear-gradient(90deg, #5c241f 50%, #173c5e 50%); }
.hx-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hx-turn { padding: 10px 12px; border-radius: 12px; background: var(--pc-soft); font-size: 18px; text-align: center; }
.hx-turn b { color: var(--pc); }
.hx-answer { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 2px solid var(--pc); border-radius: 16px; background: var(--pc-soft); }
.hx-pick { margin: 0; font-size: 14px; line-height: 1.35; }
.hx-answer .answer-row input { padding: 11px 12px; font-size: 17px; }
.hx-answer .answer-row input:disabled, .hx-answer .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hx-log-title { margin: 6px 0 0; font-family: var(--display); font-size: 22px; letter-spacing: 1px; color: var(--muted); }
.hx-log { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hx-log li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--panel); font-size: 14px; }
.hx-log li i { width: 10px; height: 12px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--pc); }
.hx-log li b { color: var(--pc); }
.hx-log li small { display: block; color: var(--muted); font-size: 12px; }
.hx-log li em { font-style: normal; font-family: var(--display); font-size: 22px; color: var(--pc); }

/* Sohbet (online oda): dar ekranda sol alttaki düğmeyle açılan pencere, geniş ekranda sütunun solunda sabit kutu */
.chat {
  position: fixed;
  z-index: 20;
  left: 16px;
  bottom: 80px;
  display: none;
  flex-direction: column;
  width: min(320px, calc(100vw - 32px));
  height: min(420px, calc(100vh - 120px));
  height: min(420px, calc(100dvh - 120px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 30, 20, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.chat.open { display: flex; }
.chat[hidden] { display: none !important; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 16px; border-bottom: 1px solid var(--line); }
.chat-head h3 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: 1px; color: var(--accent); }
.chat-close { padding: 2px 9px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.chat-close:hover { background: var(--panel-2); color: var(--text); }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 10px 12px; list-style: none; }
.chat-list li { display: grid; gap: 2px; padding: 6px 10px; border-radius: 12px; background: var(--panel); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.chat-list li.mine { background: var(--panel-2); }
.chat-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; }
.chat-meta b { color: var(--pc, var(--text)); font-weight: 800; }
.chat-meta time { color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-list .chat-empty { margin: auto 0; background: none; color: var(--muted); font-size: 13px; text-align: center; }
.chat-form { display: flex; gap: 6px; padding: 10px 12px 2px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.25); font-size: 15px; }
.chat-form .btn { padding: 9px 14px; }
.chat-note { min-height: 16px; margin: 0; padding: 2px 14px 8px; color: var(--bad); font-size: 12px; }
.chat-toggle {
  position: fixed;
  z-index: 21;
  left: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(12, 30, 20, 0.95);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.chat-toggle.on { border-color: var(--accent); }
.chat-toggle[hidden] { display: none; }
.chat-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; }
.chat-badge[hidden] { display: none; }
body.has-chat main { padding-bottom: 88px; } /* sayfanın en altındaki düğmeler sohbet düğmesinin altında kalmasın */
/* Sütun 932 px + 48 px boşluk + 280 px kutu iki yana sığınca (lider tablosuyla aynı ölçü, sağ yerine sol) */
@media (min-width: 1640px) {
  .chat { display: flex; top: 96px; bottom: auto; left: calc(50% - 794px); width: 280px; height: min(460px, calc(100vh - 120px)); background: var(--panel); box-shadow: none; }
  .chat-close, .chat-toggle { display: none !important; }
  body.has-chat main { padding-bottom: 32px; }
}

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; padding: 10px 16px; gap: 10px; }
  .brand { justify-self: start; gap: 8px; font-size: 24px; }
  .brand-logo { width: 30px; height: 30px; }
  .scoreboard { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .sb { flex: 1; min-width: 0; padding: 4px 8px; gap: 8px; }
  .sb.p2 { justify-content: flex-end; }
  .sb-name { max-width: none; min-width: 0; font-size: 13px; }
  .sb-score { font-size: 24px; min-width: 32px; }
  .sb-mid { padding: 0 10px; }
  .sb-mid small { display: none; }
  main { padding: 4px 16px 24px; }
  .players-setup { grid-template-columns: 1fr; }
  .vs { margin: 0; text-align: center; font-size: 30px; }
  .matchup { grid-template-columns: 1fr 1fr; }
  .matchup-mid { grid-column: 1 / -1; grid-row: 2; }
  .crest.lg { width: 72px; height: 72px; font-size: 28px; }
  .club-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  /* Telefonda sekmeler yana kaydırılır */
  .league-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .league-tabs::-webkit-scrollbar { display: none; }
  .lc-code { font-size: 72px; letter-spacing: 8px; }
  .online-grid, .lobby-players { grid-template-columns: minmax(0, 1fr); } /* kod kutusu kartı ekrandan taşırmasın */
  .team-name { font-size: 15px; }
  .result-main { font-size: 48px; }
  .lu-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .lu-pitch { min-height: 470px; padding: 12px 2px; }
  .game-switch { flex-wrap: wrap; justify-content: center; } /* altı sekme telefonda iki satıra iner */
  .game-switch button { padding: 8px 9px; font-size: 18px; white-space: nowrap; }
  .hx-score { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; margin-bottom: 12px; }
  .hx-meter { grid-column: 1 / -1; grid-row: 2; }
  .hx-player-box { padding: 6px 10px; }
  .hx-player-box b { font-size: 28px; }
  .hx-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hx-board { --hx-gap: 4px; }
  .lu-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
  .lu-team { flex-direction: column !important; align-items: center; gap: 4px; font-size: 14px; text-align: center; }
  .lu-score b { font-size: 26px; }
  .lu-score small { font-size: 11px; }
  .lu-shirt { width: 36px; height: 34px; }
  .lu-name { padding: 2px 4px; font-size: 10px; letter-spacing: 1px; }
  .lu-left { left: calc(50% + 11px); }
  .lu-tile { width: 21px; height: 26px; font-size: 13px; }
  .xox-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .xox-board { grid-template-columns: 0.72fr repeat(3, 1fr); gap: 4px; width: 100%; max-width: 460px; margin: 0 auto; }
  .xox-head { font-size: 10px; padding: 3px 1px; gap: 3px; }
  .xox-head .crest, .xox-face { width: 34px; height: 34px; font-size: 13px; }
  .xox-flag { width: 34px; height: 25px; }
  .xox-trophy { width: 44px; height: 44px; }
  .xox-icon { font-size: 22px; }
  .xox-cell { border-radius: 10px; padding: 3px; aspect-ratio: 1; }
  .xox-name { font-size: 12px; }
  .xox-cell.open small { font-size: 10px; }
  .page h1 { font-size: 40px; }
  .au-ball { width: 44px; height: 44px; border-width: 2px; }
  .au-value { font-size: 20px; }
  .au-value.mid { font-size: 15px; }
  .au-value.small { font-size: 11px; }
  .au-label { padding: 1px 2px; font-size: 10.5px; }
  .cr-path { gap: 8px 2px; padding: 14px 6px; }
  .cr-club { width: 74px; }
  .cr-club small { font-size: 10.5px; }
  .cr-step { gap: 2px; }
  .cr-arrow { font-size: 18px; margin-top: 14px; }
  .gs-head, .gs-cells { gap: 4px; }
  .gs-head span { font-size: 9px; letter-spacing: 0; }
  .gs-cell { min-height: 62px; padding: 5px 1px; border-radius: 9px; }
  .gs-cell small { font-size: 9px; letter-spacing: -0.2px; }
  .gs-cell b { font-size: 24px; }
  .gs-cell .crest.sm { width: 30px; height: 30px; }
  .gs-cell.club small { display: none; } /* uzun kulüp adı kutuya sığmıyor: adın yanına taşınır */
  .gs-name small { display: inline; }
  .gs-flag { width: 24px; height: 17px; }
}

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