:root {
  --bg: #0f1117;
  --bg-2: #161926;
  --panel: #1b1f2e;
  --panel-2: #232839;
  --line: #2e3446;
  --text: #eef1f8;
  --muted: #99a1b8;
  --accent: #6c8cff;
  --accent-2: #8b6cff;
  --green: #2fbf71;
  --red: #ef4a5b;
  --amber: #f5a623;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  /* Telefonda aşağı çekip yenileme AÇIK kalsın: takılan bir istemciyi
     kurtarmanın en kolay yolu bu. Yenileme oyunu bozmuyor, puanlar
     sunucuda ve isim zaten hatırlanıyor. */
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: .35rem 0; line-height: 1.5; }
code {
  background: var(--panel-2);
  padding: .15em .4em;
  border-radius: 5px;
  font-size: .85em;
}

/* ------------------------------- giriş ------------------------------- */

.join {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: radial-gradient(1000px 600px at 50% -10%, #232a45 0%, var(--bg) 60%);
}

.join-box {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
}

.logo { display: flex; align-items: center; gap: .6rem; justify-content: center; }
.logo-mark { font-size: 2rem; }
.logo h1 { font-size: 1.6rem; letter-spacing: -.02em; }
.logo h1 span { color: var(--accent); }
.tagline { text-align: center; color: var(--muted); margin-bottom: 1.5rem; font-size: .9rem; }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }

input[type=text], input[type=password], input[type=search], input[type=number],
select, textarea {
  width: 100%;
  padding: .8rem .9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.5; }

#join-form > * + * { margin-top: 1rem; }
.error { color: var(--red); font-size: .875rem; min-height: 1.2em; text-align: center; }

/* ------------------------------- butonlar ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.1rem;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: transform .08s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { width: 100%; padding: .95rem; font-size: 1.05rem; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; }
.btn-success { background: var(--green); border: none; color: #04220f; }
.btn-danger  { background: var(--red); border: none; }
.btn-ghost   { background: transparent; }
.btn:hover:not(:disabled) { filter: brightness(1.12); }

/* ------------------------------- iskelet ------------------------------- */

.app { min-height: 100dvh; display: flex; flex-direction: column; }

/* Başlık + sekmeler tek blok hâlinde yapışır. Ayrı ayrı sticky olurlarsa
   ikisi de top:0'a oturur ve sekme çubuğu başlığın altında kaybolur. */
.app-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-2);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 1rem;
  padding-top: calc(.7rem + env(safe-area-inset-top));
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; flex-direction: column; min-width: 0; }
.brand { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.deck-info { font-size: .75rem; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
/* Oyundan çıkış hep sağ üstte — aramak gerekmesin */
.icon-btn {
  padding: .3rem .45rem;
  font-size: 1.1rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { border-color: var(--red); }
.my-name { font-size: .85rem; color: var(--muted); max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-score {
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--panel-2);
  padding: .2rem .6rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.clock {
  font-weight: 800;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  padding: .2rem .5rem;
  border-radius: 8px;
  background: var(--panel-2);
}
/* Son bir dakika: göz kaçırmasın */
.clock.urgent {
  background: rgba(239, 74, 91, .22);
  color: #ffb3bb;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .45; } }

.tabs {
  display: flex;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1;
  padding: .8rem .4rem;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.content { flex: 1; padding: 1rem; max-width: 760px; width: 100%; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.view > * + * { margin-top: 1rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.panel + .panel, .panel + .word-grid, .word-grid + .panel { margin-top: 1rem; }

.row { display: flex; gap: .6rem; align-items: center; margin-top: .75rem; }
.row.wrap { flex-wrap: wrap; }
.row > input[type=search], .row > input[type=text] { flex: 1; }
.field { display: block; margin-top: .75rem; }
.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.checkbox {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--muted); margin: .75rem 0 0; cursor: pointer;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ------------------------------- kart ------------------------------- */

.card {
  background: linear-gradient(160deg, #262c44, var(--panel));
  border: 1px solid #3a4160;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.card-chapter { font-size: .75rem; color: var(--muted); }
.card-word {
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: .75rem 0 .25rem;
  line-height: 1.1;
  word-break: break-word;
}
.card-article { color: var(--accent); margin-right: .3em; }
.card-meaning { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }

.badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge {
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.badges.big .badge { font-size: 1rem; padding: .5rem 1rem; }
.badge.der { background: rgba(108,140,255,.2); border-color: var(--accent); color: #b9c8ff; }
.badge.die { background: rgba(239,74,91,.18); border-color: var(--red); color: #ffb3bb; }
.badge.das { background: rgba(47,191,113,.18); border-color: var(--green); color: #a6ecc6; }

.taboo-block {
  background: rgba(239, 74, 91, .09);
  border: 1px solid rgba(239, 74, 91, .35);
  border-radius: 12px;
  padding: .85rem;
}
.taboo-title {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .5rem;
}
.taboo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.taboo-list li {
  font-size: 1.05rem;
  font-weight: 600;
  padding-left: 1.3rem;
  position: relative;
}
.taboo-list li::before { content: "✕"; position: absolute; left: 0; color: var(--red); font-size: .85em; }
.taboo-list li.empty { color: var(--muted); font-weight: 400; padding-left: 0; }
.card-role { margin-top: .9rem; font-size: .8rem; color: var(--muted); text-align: center; }

/* ------------------------------- buzzer ------------------------------- */

/* Buton, kelime listesi kaydırılırken bile ekranda kalır: başlığın hemen
   altına yapışır. --head-h'yi app.js ölçüp yazar. */
.guess-area {
  position: sticky;
  top: var(--head-h, 104px);
  z-index: 10;
  margin-inline: -1rem;
  /* Alt boşluk + kırpma, butonun kırmızı gölgesini içeride tutar;
     yoksa gölge kayan kelimelerin üstüne leke gibi düşüyor */
  padding: .5rem 1rem 1.4rem;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.hint-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .5rem;
}
.hint-who { font-size: .85rem; color: var(--muted); }
.hint-who b { color: var(--text); }

.buzzer {
  width: 100%;
  min-height: clamp(120px, 26vh, 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: none;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 35%, #ff6b7d, #d0243a 70%);
  box-shadow: 0 12px 0 #8e1526, 0 18px 40px rgba(208, 36, 58, .4);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: transform .06s, box-shadow .06s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.buzzer:active:not(:disabled) {
  transform: translateY(9px);
  box-shadow: 0 3px 0 #8e1526, 0 6px 20px rgba(208, 36, 58, .35);
}
.buzzer:disabled {
  background: radial-gradient(circle at 50% 35%, #4a5068, #333849 70%);
  box-shadow: 0 8px 0 #22252f;
  color: var(--muted);
  cursor: not-allowed;
}
.buzzer-label { font-size: clamp(2.2rem, 11vw, 3.2rem); font-weight: 900; letter-spacing: .05em; }
.buzzer-sub { font-size: .85rem; opacity: .8; }
#buzz-note { margin: .35rem 0 0; min-height: 1.1em; }
.kbd-tip { display: none; }   /* sadece klavyesi olan ekranlarda */

/* Öğretmen kumandası — oyun ekranında, öğrenciye görünmez */
.admin-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0 0;
}
.btn-finish {
  background: linear-gradient(135deg, var(--amber), #e0761a);
  border: none;
  color: #2d1a00;
  font-weight: 800;
}

/* ------------------------------- buzzed ------------------------------- */

.buzzed-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(160deg, #2a3150, var(--panel));
  border: 1px solid var(--accent);
  border-radius: 18px;
  animation: pop .3s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.buzzed-label { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.buzzed-name {
  font-size: clamp(2.2rem, 11vw, 3.5rem);
  font-weight: 900;
  margin: .35rem 0;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
}
.buzzed-time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.judge-box { margin-top: 1rem; }
.judge-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .5rem; }

/* ------------------------------- kelime listesi ------------------------------- */

.live-words { margin-top: 1rem; }
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .6rem;
}
.list-title { display: flex; flex-direction: column; gap: .1rem; }
.list-tools {
  display: flex; align-items: center; gap: .5rem;
  flex: 1; min-width: 11rem; justify-content: flex-end;
}
.list-tools input[type=search] {
  flex: 1; max-width: 14rem; padding: .5rem .7rem; font-size: .9rem;
}
.filter-btn {
  padding: .5rem .85rem;
  white-space: nowrap;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.filter-btn.on { background: rgba(108,140,255,.2); border-color: var(--accent); color: var(--text); }

.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.word-chip {
  padding: .65rem .7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  cursor: default;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.word-chip { cursor: pointer; }
button.word-chip:hover { border-color: var(--accent); }
.word-chip .w { display: block; }
.word-chip.used {
  color: #5b6178;
  background: #14171f;
  border-color: #22262f;
}
/* Cizgi sadece kelimenin uzerinde; kapitel etiketi okunur kalsin */
.word-chip.used .w { text-decoration: line-through; }
.word-chip.skipped .w { text-decoration-color: var(--amber); }
.word-chip small { display: block; font-size: .68rem; color: var(--muted); }
/* Artikel ipucu açıkken kelimenin önünde renkli artikel durur */
.word-chip .art { font-weight: 800; }
.art-der { color: #b9c8ff; }
.art-die { color: #ffb3bb; }
.art-das { color: #a6ecc6; }
.word-chip.used .art { color: inherit; }

/* ------------------------------- skor ------------------------------- */

.scoreboard { display: grid; gap: .5rem; }
.score-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.score-row.me { border-color: var(--accent); background: var(--panel-2); }
.score-row.explaining { border-color: var(--amber); }
.score-rank { width: 1.5rem; font-weight: 800; color: var(--muted); text-align: center; }
.score-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-tag {
  font-size: .7rem; padding: .15rem .45rem; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
/* Deneme puanı farklı bir bilgi türü — kendi satır zemininde de okunsun */
.score-tag.attempts {
  background: rgba(245, 166, 35, .14);
  border-color: rgba(245, 166, 35, .35);
  color: var(--amber);
}
.score-value { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.score-row.offline { opacity: .45; }

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .75rem; }
.chip {
  padding: .35rem .7rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .85rem;
}
.chip.admin { border-color: var(--amber); color: var(--amber); }
/* Bağlantısı kopan oyuncu odada duruyormuş gibi görünmesin */
.chip.offline { opacity: .45; border-style: dashed; }
.chip.offline small { font-size: .7em; text-transform: uppercase; letter-spacing: .06em; }
.score-tag.gone { background: transparent; border-style: dashed; }

.podium { display: grid; gap: 1rem; margin-top: 1.25rem; }
.podium-row { display: flex; align-items: center; gap: .75rem; padding: .8rem; background: var(--panel-2); border-radius: 12px; }
.podium-row .medal { font-size: 1.5rem; min-width: 2rem; }
.podium-row .p-name { flex: 1; font-weight: 700; text-align: left; }
.podium-row .p-score { font-weight: 800; font-variant-numeric: tabular-nums; }

/* İlk üç: gerçek podyum (2 - 1 - 3 sırasıyla) */
.podium-top { display: flex; align-items: flex-end; justify-content: center; gap: .5rem; }
.podium-col { flex: 1; max-width: 7.5rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.podium-medal { font-size: 1.7rem; line-height: 1; }
.podium-who {
  font-weight: 700; font-size: .9rem; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium-bar {
  width: 100%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  display: flex; justify-content: center;
  padding-top: .45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.podium-col.gold .podium-bar { background: linear-gradient(180deg, #f7c948, #e39e12); color: #3a2600; }
.podium-rest { display: grid; gap: .4rem; }

/* ------------------------------- kapitel seçici ------------------------------- */

.chapter-picker { display: flex; flex-direction: column; gap: .75rem; margin-top: .5rem; }

/* Kitap → kapitel: iki seviyeli seçim */
.chapter-book { display: flex; flex-direction: column; gap: .4rem; }
.chapter-book-row { display: flex; flex-wrap: wrap; gap: .5rem; padding-left: .25rem; }
.chapter-book-title {
  align-self: flex-start;
  padding: .3rem .7rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
}
.chapter-book-title.on { background: rgba(139,108,255,.18); border-color: var(--accent-2); color: var(--text); }
.chapter-book-title small { opacity: .65; margin-left: .4rem; font-weight: 500; }
.chapter-btn.wide { align-self: stretch; text-align: center; }
.chapter-btn {
  padding: .55rem .9rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .875rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
}
.chapter-btn.on { background: rgba(108,140,255,.2); border-color: var(--accent); color: var(--text); }
.chapter-btn small { opacity: .7; margin-left: .3rem; }

.chapter-admin { display: grid; gap: .5rem; margin-top: .5rem; }
.chapter-admin { display: grid; gap: .9rem; margin-top: .5rem; }
.chapter-admin-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .8rem; background: var(--panel-2); border-radius: 10px;
}
.chapter-admin-row span { flex: 1; }
.chapter-admin-row span.muted { flex: 0 0 auto; }
/* Kitap başlığı satırı, altındaki kapitellerden ayrılsın */
.chapter-admin-row.book {
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-left: 0;
}
.chapter-admin .chapter-book-row,
.chapter-admin .chapter-book { gap: .4rem; }
.chapter-admin .chapter-book > .chapter-admin-row:not(.book) { margin-left: .75rem; }
.field.grow { flex: 1; min-width: 8rem; }

/* ------------------------------- kelime yönetimi ------------------------------- */

.btn-mini {
  font-size: .75rem; padding: .35rem .6rem; background: transparent;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.btn-mini:hover { border-color: var(--accent); color: var(--text); }
.btn-mini.kick:hover { border-color: var(--red); color: #ffb3bb; }

/* Artikel seçici: yazmak yerine dokunmak. Büyük hedefler, renkli. */
.art-picker { display: flex; gap: .4rem; flex-wrap: wrap; }
.art-picker.dimmed { opacity: .35; pointer-events: none; }
.art-btn {
  flex: 1;
  min-width: 4rem;
  padding: .7rem .5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.art-btn.on { color: var(--text); border-width: 2px; }
.art-btn.art-der.on { background: rgba(108,140,255,.22); border-color: var(--accent); }
.art-btn.art-die.on { background: rgba(239,74,91,.20);  border-color: var(--red); }
.art-btn.art-das.on { background: rgba(47,191,113,.20); border-color: var(--green); }
.art-btn[data-art=""].on { background: var(--panel-2); border-color: var(--muted); }

.edit-note {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: 0 0 .75rem;
  padding: .5rem .7rem;
  font-size: .85rem;
  background: rgba(245,166,35,.12);
  border: 1px solid rgba(245,166,35,.35);
  border-radius: 10px;
  color: var(--amber);
}
.edit-note #edit-word { flex: 1; }

.manage-list { display: grid; gap: .4rem; margin: .5rem 0 .75rem; max-height: 55vh; overflow-y: auto; }
.manage-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .7rem;
  background: var(--panel-2);
  border-radius: 10px;
}
.manage-main { flex: 1; min-width: 0; }
.manage-word { font-weight: 700; }
.manage-taboo {
  font-size: .78rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ------------------------------- akış / toast ------------------------------- */

.feed { margin-top: .6rem; display: grid; gap: .35rem; }
.feed:empty::before { content: "Henüz bir şey olmadı."; color: var(--muted); font-size: .85rem; }
.feed-item {
  font-size: .8rem;
  color: var(--muted);
  padding: .45rem .7rem;
  background: var(--panel);
  border-left: 3px solid var(--line);
  border-radius: 6px;
}
.feed-item.correct { border-left-color: var(--green); }
.feed-item.wrong   { border-left-color: var(--red); }
.feed-item.taboo   { border-left-color: var(--red); color: #ffb3bb; }
.feed-item.skip    { border-left-color: var(--amber); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 200%);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, 1.3, .4, 1);
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.err { border-color: var(--red); }

/* ------------------------------- çarkıfelek ------------------------------- */

.wheel-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(8, 10, 16, .9);
  backdrop-filter: blur(4px);
}
.wheel-box { width: 100%; max-width: 380px; text-align: center; }
.wheel-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; color: var(--muted); }
.wheel-stage { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 0 auto; }
.wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid var(--panel-2);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
  overflow: hidden;
}
/* Her isim kendi diliminin ortasına döndürülüp çemberin üst kenarına yazılır */
.wheel-name {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  padding-top: 14px;
  font-size: .78rem;
  font-weight: 800;
  color: #0b0d14;
}
.wheel-name b { max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid var(--text);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .7));
}
.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  background: var(--panel);
  border: 3px solid var(--panel-2);
  border-radius: 50%;
}
.wheel-winner {
  margin-top: 1.1rem;
  min-height: 2.4rem;
  font-size: clamp(1.3rem, 7vw, 2rem);
  font-weight: 900;
}

.pulse-dot {
  width: 14px; height: 14px; margin: 0 auto 1rem;
  background: var(--accent); border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(108,140,255,.5); }
  50% { transform: scale(1.15); opacity: .8; box-shadow: 0 0 0 14px rgba(108,140,255,0); }
}

@media (min-width: 640px) {
  .content { padding: 1.5rem; }
  .guess-area { margin-inline: -1.5rem; padding-inline: 1.5rem; }
  /* Bilgisayarda fare zaten hedefi buluyor; buton ekranı kaplamasın */
  .buzzer { max-width: 420px; margin-inline: auto; min-height: clamp(110px, 18vh, 160px); }
  .kbd-tip {
    display: block; text-align: center; margin: .4rem 0 0;
    font-size: .78rem; color: var(--muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
