/* Kişiselleştirme ve keşif bileşenleri (public/js/kisisel.js). Renkler sade.css belirteçlerinden. */

/* ------------------------------------------------ tazelik göstergesi */
.fresh { margin: -6px 0 10px; font-size: 12.5px; color: var(--chalk-3); display: flex; align-items: center; gap: 6px; min-height: 18px; }
.fresh::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(var(--ink-rgb), 0.25); flex: none; }
.fresh.ok::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.fresh.old::before { background: var(--yellow); }
.fresh.off { color: var(--red); font-weight: 600; }
.fresh.off::before { background: var(--red); }

/* ------------------------------------------------ ilk açılış: takım seçimi */
.onb h3 { margin: 0 0 4px; font-size: 18px; }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), 0.45); background: rgba(var(--accent-rgb), 0.08); color: var(--chalk); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: rgba(var(--accent-rgb), 0.16); }
.chip.ghost { border-color: rgba(var(--ink-rgb), 0.2); background: transparent; }
.chip svg { width: 14px; height: 14px; }
.onb-skip { margin-top: 4px; font-size: 13px; color: var(--chalk-3); min-height: 32px; }

/* ------------------------------------------------ takım takip düğmesi */
.tfollow { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(var(--ink-rgb), 0.2); background: var(--surface); color: var(--chalk-2); font-weight: 600; font-size: 13px; flex: none; }
.tfollow svg { width: 15px; height: 15px; color: rgba(var(--ink-rgb), 0.45); }
.tfollow.on { border-color: var(--amber); color: var(--accent-text); background: rgba(var(--accent-rgb), 0.08); }
.tfollow.on svg { color: var(--yellow); }
.tfollow.small { min-height: 34px; padding: 4px 10px; font-size: 12.5px; }
.tfollow.big { min-height: 44px; padding: 8px 18px; font-size: 15px; }

/* ------------------------------------------------ gün sayfası ekleri */
.next-match { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(var(--accent-rgb), 0.35); color: var(--chalk); text-decoration: none; box-shadow: var(--shadow); }
.next-match > svg:first-child { width: 20px; height: 20px; color: var(--yellow); flex: none; }
.next-match > svg:last-child { width: 14px; height: 14px; margin-left: auto; color: var(--chalk-3); flex: none; }
.next-match span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.next-match small { font-size: 12.5px; color: var(--chalk-3); }
.next-match b { font-size: 16px; }

.card.best h3, .card.qpred h3 { margin: 0 0 8px; }
.card.best ol { list-style: none; margin: 0; padding: 0; }
.card.best li + li { border-top: 1px solid var(--chalk-4); }
.card.best a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m p" "y p"; column-gap: 12px; padding: 9px 0; color: var(--chalk); text-decoration: none; }
.card.best .b-m { grid-area: m; font-weight: 600; font-size: 14.5px; }
.card.best .b-m small { margin-left: 8px; color: var(--chalk-3); font-weight: 400; }
.card.best .b-y { grid-area: y; font-size: 13.5px; color: var(--accent-text); }
.card.best b { grid-area: p; align-self: center; font-size: 18px; color: var(--accent-text); }

.card.qpred ul { list-style: none; margin: 0; padding: 0; }
.card.qpred li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.card.qpred li + li { border-top: 1px solid var(--chalk-4); }
.q-m { font-weight: 600; font-size: 14.5px; min-width: 0; }
.q-m small { display: block; font-weight: 400; color: var(--chalk-3); font-size: 12.5px; }
.q-b { display: flex; gap: 6px; flex: none; }
.q-b button { width: 44px; height: 40px; border-radius: 10px; border: 1px solid rgba(var(--ink-rgb), 0.2); background: var(--surface-2); font-weight: 700; font-size: 15px; color: var(--chalk); }
.q-b button:hover { border-color: var(--amber); }
.q-b button:disabled { opacity: 0.5; }
.q-ok { font-size: 13.5px; color: var(--accent-text); }
.week-karne { margin: 0 0 12px; font-size: 13px; color: var(--chalk-2); }
.week-karne b { color: var(--accent-text); }

/* ------------------------------------------------ lig kutusu: katla, takibindekiler */
.box-fold { margin-left: 8px; min-width: 36px; min-height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid rgba(var(--ink-rgb), 0.15); background: transparent; color: var(--chalk-3); font-size: 12.5px; font-weight: 600; flex: none; }
.box-fold:hover { color: var(--chalk); border-color: rgba(var(--ink-rgb), 0.3); }
.box.folded .box-head { border-bottom: 0; }
.box.mine { border: 1px solid rgba(var(--accent-rgb), 0.45); }
.box.mine .box-title h2::before { content: '★ '; color: var(--yellow); }

/* ------------------------------------------------ genel arama / hata bildir penceresi */
.srch { position: fixed; inset: 0; z-index: 80; background: rgba(5, 20, 11, 0.45); display: flex; justify-content: center; align-items: flex-start; padding: 8vh 16px 16px; }
.srch-box { position: relative; width: 100%; max-width: 560px; max-height: 80vh; overflow: auto; background: var(--surface); color: var(--chalk); border-radius: 16px; padding: 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3); }
.srch-in { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-right: 44px; border: 1px solid rgba(var(--ink-rgb), 0.18); border-radius: 12px; }
.srch-in svg { width: 18px; height: 18px; color: var(--chalk-3); flex: none; }
.srch-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--chalk); font-size: 16px; }
.srch-in:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }
.srch-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--chalk); font-size: 16px; }
.srch-res h4 { margin: 14px 4px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--chalk-3); }
.srch-res ul { list-style: none; margin: 0; padding: 0; }
.srch-res li { display: flex; align-items: center; gap: 8px; }
.srch-res li > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 10px; color: var(--chalk); text-decoration: none; min-height: 44px; }
.srch-res li > a:hover { background: var(--surface-2); }
.srch-res img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.srch-res span { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.srch-res small { font-weight: 400; font-size: 12.5px; color: var(--chalk-3); }
.srch-res .note { margin: 12px 4px 4px; }
.fb-box h3 { margin: 0 0 4px; }
.fb-box textarea { width: 100%; box-sizing: border-box; margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(var(--ink-rgb), 0.2); background: var(--surface-2); color: var(--chalk); font: inherit; font-size: 16px; resize: vertical; }
.fb-act { display: flex; justify-content: flex-end; gap: 8px; }

/* ------------------------------------------------ takım sayfası */
.thero { display: flex; align-items: center; gap: 16px; margin: 6px 0 16px; flex-wrap: wrap; }
.t-logo { width: 72px; height: 72px; object-fit: contain; flex: none; }
.thero > div { flex: 1; min-width: 180px; }
.thero h1 { margin: 0; font-size: 28px; }
.thero p { margin: 4px 0 0; color: var(--chalk-2); font-size: 14px; }
.thero p a { color: var(--accent-text); }
.t-form { display: flex; align-items: center; gap: 4px; }
.t-form small { margin-left: 6px; color: var(--chalk-3); }
.frm { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-style: normal; font-weight: 700; font-size: 12px; color: #fff; }
.frm.w { background: #0a7d42; }
.frm.d { background: #6b7a72; }
.frm.l { background: #c2383d; }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li + li { border-top: 1px solid var(--chalk-4); }
.tlist li > a, .tlist li > div { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: var(--chalk); text-decoration: none; min-height: 44px; }
.tlist .t-m { flex: 1; min-width: 0; font-weight: 600; }
.tlist .t-m small { display: block; font-weight: 400; font-size: 12.5px; color: var(--chalk-3); }
.tlist .t-m em { font-style: normal; color: var(--accent-text); }
.tlist .t-time { font-size: 13px; color: var(--chalk-2); white-space: nowrap; }
.tlist .t-score { font-size: 17px; white-space: nowrap; }
.tlist .t-score.live { color: var(--live-text); }

/* ------------------------------------------------ tercihler */
.page-h { margin: 6px 0 14px; font-size: 26px; }
.myteams { list-style: none; margin: 0 0 12px; padding: 0; }
.myteams li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.myteams li + li { border-top: 1px solid var(--chalk-4); }
.myteams a { font-weight: 600; color: var(--chalk); }
.prefs { border: 0; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.prefs[disabled] { opacity: 0.5; }
.prefs .chk { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14.5px; }
.prefs .chk input { width: 20px; height: 20px; accent-color: var(--amber); }
.note.ok { color: var(--accent-text); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid rgba(var(--ink-rgb), 0.18); border-radius: 12px; overflow: hidden; }
.seg button { min-height: 40px; padding: 0 16px; border: 0; background: transparent; color: var(--chalk-2); font-weight: 600; }
.seg button + button { border-left: 1px solid rgba(var(--ink-rgb), 0.18); }
.seg button.on { background: var(--amber); color: var(--grass-ink); }

/* ------------------------------------------------ ana ekrana ekle şeridi */
.inst { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar, 0px) + env(safe-area-inset-bottom) + 12px); z-index: 70; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--chalk); border: 1px solid rgba(var(--accent-rgb), 0.4); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); }
.inst p { margin: 0; flex: 1; font-size: 13.5px; }
.inst div { display: flex; gap: 6px; flex: none; }

/* ------------------------------------------------ maç sayfası */
.b-name a { color: inherit; text-decoration: none; }
.b-name a:hover { text-decoration: underline; text-underline-offset: 4px; }
.b-share svg { width: 14px; height: 14px; }

/* ------------------------------------------------ üst bant arama düğmesi, alt bilgi */
.mast-right #search-tg { margin-left: auto; }
.mast-right #search-tg + #theme-tg { margin-left: 6px; }
.foot-links .linkbtn { font: inherit; color: inherit; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }

/* ------------------------------------------------ yönetim: hata bildirimleri */
.adm-fb { list-style: none; margin: 0; padding: 0; }
.adm-fb li { padding: 10px 0; border-top: 1px solid var(--chalk-4); }
.adm-fb li.done { opacity: 0.55; }
.adm-fb p { margin: 0 0 4px; white-space: pre-wrap; }

@media (max-width: 640px) {
  .thero h1 { font-size: 22px; }
  .t-logo { width: 56px; height: 56px; }
  .srch { padding-top: 12px; }
  .card.best b { font-size: 16px; }
}
