/* Siralama sayfasi: puan tablosu ve satir alti detay paneli.
   Yalnizca renk/yazi tipi degiskenlerini kullanir; bu yuzden tum tasarimlarda (temalarda) uyumlu kalir. */

.lb-new { border-collapse: separate; border-spacing: 0 8px; width: 100%; }
.lb-new thead th { padding: 0 14px 6px; font: 500 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; white-space: nowrap; }
.lb-new thead th.num { text-align: right; }
.lb-new .lb-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; letter-spacing: inherit; text-transform: inherit; font: inherit; color: inherit; transition: color .2s; }
.lb-new .lb-sort:hover { color: var(--text); }
.lb-new .lb-sort:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 3px; border-radius: 4px; }
.lb-new th.on .lb-sort { color: var(--orange-2); }
.lb-new th.on .lb-sort::after { content: ""; width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }

.lb-new tbody tr.lbrow { cursor: pointer; }
.lb-new tbody tr.lbrow > td {
  padding: 14px; background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border-block: 1px solid var(--line); transition: background-color .2s, border-color .2s;
}
.lb-new tbody tr.lbrow > td:first-child { border-left: 1px solid var(--line); border-radius: 14px 0 0 14px; }
.lb-new tbody tr.lbrow > td:last-child { border-right: 1px solid var(--line); border-radius: 0 14px 14px 0; }
.lb-new tbody tr.lbrow:hover > td, .lb-new tbody tr.lbrow:focus-visible > td { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.lb-new tbody tr.lbrow:focus-visible { outline: none; }
.lb-new tbody tr.lbrow:focus-visible > td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.lb-new tbody tr.lbrow.open > td { border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); }
.lb-new tbody tr.lbrow.open > td:first-child { border-bottom-left-radius: 0; }
.lb-new tbody tr.lbrow.open > td:last-child { border-bottom-right-radius: 0; }
.lb-new tbody tr.me > td { background: linear-gradient(165deg, color-mix(in srgb, var(--orange) 10%, var(--surface-2)), var(--surface)); }
.lb-new td.rk { width: 64px; font: 800 24px var(--font-display); font-variant-numeric: tabular-nums; color: var(--soft); }
.lb-new td.rk.top1 { color: #f5c542; }
.lb-new td.rk.top2 { color: #cfd5dc; }
.lb-new td.rk.top3 { color: #d4915a; }
.lb-new td.c { text-align: right; white-space: nowrap; font: 600 17px var(--font-body); font-variant-numeric: tabular-nums; color: var(--soft); }
.lb-new td.c.on { color: var(--orange-2); font-weight: 800; }
.lb-new td.c-score { color: var(--text); font-weight: 800; font-size: 19px; }
.lb-new td.c-score.on { color: var(--orange-2); }
.lb-new td.who-cell { width: 100%; max-width: 0; }
.lb-new .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-new .who b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-new td.caret { width: 36px; padding-left: 4px; text-align: center; }
.lb-new .chev { display: inline-block; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s, border-color .2s; }
.lb-new tr.open .chev { transform: rotate(225deg) translate(-2px, -2px); border-color: var(--orange-2); }

/* Detay paneli */
.lb-new tr.lb-more > td { padding: 0; background: transparent; border: 0; }
.lb-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.2, .8, .2, 1); }
.lb-more.open .lb-panel { grid-template-rows: 1fr; }
.lb-panel > .in { overflow: hidden; min-height: 0; }
.lbd {
  margin-top: -8px; padding: 20px; display: grid; gap: 18px;
  background: color-mix(in srgb, var(--surface) 88%, #000); border: 1px solid color-mix(in srgb, var(--orange) 40%, var(--line)); border-top-color: var(--line);
  border-radius: 0 0 14px 14px;
}
.lbd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; justify-content: space-between; }
.lbd-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lbd-id b { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbd-id small { display: block; font: 500 11.5px var(--font-mono); color: var(--muted); }
.lbd-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; }
.lbd-meta b { color: var(--text); font-weight: 700; }
.lbd-share { display: grid; gap: 8px; }
.lbd-bar { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: var(--line); }
.lbd-bar i { display: block; height: 100%; min-width: 2px; }
.lbd-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 12px var(--font-mono); color: var(--muted); }
.lbd-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 2px; background: var(--c); }
.lbd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.lbd-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .22); border-top: 3px solid var(--c, var(--orange)); }
.lbd-card h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 500 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lbd-card h4 em { font-style: normal; color: var(--soft); letter-spacing: .06em; }
.lbd-pts { display: block; margin: 6px 0 10px; font: 800 34px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.lbd-pts small { font: 500 12px var(--font-mono); color: var(--muted); letter-spacing: .08em; margin-left: 4px; }
.lbd-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px dashed color-mix(in srgb, var(--line-2) 60%, transparent); font-size: 14.5px; color: var(--soft); }
.lbd-row b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.lbd-row.zero b { color: var(--muted); font-weight: 500; }
.lbd-acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* Aciklama */
.lb-how { margin-top: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lb-how summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--soft); }
.lb-how summary:hover { color: var(--text); }
.lb-how > div { padding: 4px 18px 18px; display: grid; gap: 6px; color: var(--soft); font-size: 15px; }
.lb-how code { font: 500 13px var(--font-mono); color: var(--orange-2); }

/* Dar ekran: yalnizca # / oyuncu / skor / secili sutun kalir; ayrintilar acilir panelde */
@media (max-width: 860px) {
  .lb-new thead th.c, .lb-new tbody td.c { display: none; }
  .lb-new thead th.c.on, .lb-new tbody td.c.on, .lb-new thead th.c-score, .lb-new tbody td.c-score { display: table-cell; }
  .lb-new td.rk { width: 44px; font-size: 20px; }
  .lbd { padding: 14px; }
  .lbd-pts { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-panel, .lb-new .chev { transition: none; }
}
