/* ═══════════════════════════════════════════════════════════
   GLICKO — puan durumu, maç geçmişi, kitap puan kartı
   siralama.php · maclar.php · kitap.php
═══════════════════════════════════════════════════════════ */
:root, [data-theme="dark"], [data-theme="anthracite"]{
  --gl-win:#5fbf87; --gl-win-bg:rgba(95,191,135,.12);
  --gl-loss:#e0705f; --gl-loss-bg:rgba(224,112,95,.12);
  --gl-surprise:#c39cf0; --gl-surprise-bg:rgba(195,156,240,.13);
}
[data-theme="light"]{
  --gl-win:#23804d; --gl-win-bg:rgba(35,128,77,.10);
  --gl-loss:#b8402e; --gl-loss-bg:rgba(184,64,46,.09);
  --gl-surprise:#7a4cb8; --gl-surprise-bg:rgba(122,76,184,.10);
}

.gl-page{ max-width:1100px; margin:0 auto; padding:2rem 16px 4rem; }
.gl-head{ margin-bottom:1.4rem; }
.gl-head .eyebrow{ font-family:'Space Grotesk',sans-serif; font-size:.74rem; letter-spacing:.24em; text-transform:uppercase; color:var(--accent); }
.gl-head h1{ font-size:clamp(1.8rem,4vw,2.6rem); margin:.3rem 0 .4rem; }
.gl-head p{ color:var(--text-muted); max-width:62ch; margin:0; }
.gl-muted{ color:var(--text-dim); }

/* kitap / film anahtarı */
.gl-switch{ display:inline-flex; gap:3px; padding:3px; border:1px solid var(--border); border-radius:999px; background:var(--surface); margin-top:.4rem; }
.gl-switch a{ padding:.38rem .95rem; border-radius:999px; color:var(--text-muted); text-decoration:none; font-size:.86rem; font-weight:500; }
.gl-switch a:hover{ color:var(--text); }
.gl-switch a.active{ background:var(--accent); color:#1a1206; }

/* sekmeler */
.gl-tabs{ display:flex; gap:.3rem; border-bottom:1px solid var(--border); margin:1.2rem 0 1rem; overflow-x:auto; scrollbar-width:none; }
.gl-tabs a{ padding:.6rem .95rem; color:var(--text-muted); text-decoration:none; font-size:.9rem; font-weight:500; border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; }
.gl-tabs a:hover{ color:var(--text); }
.gl-tabs a.active{ color:var(--accent); border-bottom-color:var(--accent); }

/* araç çubuğu */
.gl-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:.6rem 1rem; margin-bottom:1rem; }
.gl-note{ display:inline-flex; align-items:center; gap:.45rem; font-size:.86rem; color:var(--text-muted); background:var(--accent-light); border:1px solid var(--border); border-radius:999px; padding:.3rem .8rem; }
.gl-note b{ color:var(--accent); font-weight:600; }
.gl-bar form{ display:flex; align-items:center; gap:.45rem; font-size:.85rem; color:var(--text-muted); margin-left:auto; }
.gl-bar select, .gl-bar input[type=search]{ background:var(--surface-2, var(--surface)); border:1px solid var(--border); color:var(--text); border-radius:var(--radius-sm); padding:.38rem .6rem; font-size:.85rem; font-family:inherit; }
.gl-bar input[type=search]{ min-width:220px; }
.gl-bar button{ background:var(--accent); color:#1a1206; border:0; border-radius:var(--radius-sm); padding:.4rem .8rem; font-weight:600; cursor:pointer; font-size:.85rem; }

/* tablo */
.gl-table-wrap{ border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); overflow-x:auto; }
.gl-table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.gl-table th{ text-align:left; font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); font-weight:600; padding:.75rem .8rem; border-bottom:1px solid var(--border); white-space:nowrap; }
.gl-table th[data-sort]{ cursor:pointer; user-select:none; }
.gl-table th[data-sort]:hover{ color:var(--text); }
.gl-table th.sorted{ color:var(--accent); }
.gl-table th.sorted::after{ content:' ↓'; }
.gl-table th.sorted.asc::after{ content:' ↑'; }
.gl-table td{ padding:.62rem .8rem; border-bottom:1px solid var(--border); vertical-align:middle; }
.gl-table tr:last-child td{ border-bottom:0; }
.gl-table tbody tr:hover{ background:var(--accent-light); }
.gl-table .num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.gl-table .rank{ font-family:'Space Grotesk',sans-serif; color:var(--text-dim); width:1%; }
.gl-table tr:nth-child(-n+3) .rank{ color:var(--accent); font-weight:700; }
.gl-table a{ color:var(--text); text-decoration:none; }
.gl-table a:hover{ color:var(--accent); }
.gl-table .title a{ font-weight:500; }
.gl-table .sub{ display:none; font-size:.78rem; color:var(--text-muted); }
.gl-score{ font-family:'Space Grotesk',sans-serif; font-weight:600; }
.gl-rd{ color:var(--text-muted); font-size:.82rem; }
.gl-empty{ padding:2.5rem 1rem; text-align:center; color:var(--text-muted); }

/* küçük kapak / afiş */
.gl-thumb{ position:relative; flex-shrink:0; width:30px; height:44px; border-radius:4px; overflow:hidden; background:var(--surface-2, var(--surface));
  border:1px solid var(--border); display:inline-flex; align-items:center; justify-content:center; color:var(--text-dim); font-size:.8rem; }
.gl-thumb img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.gl-with-thumb{ display:flex; align-items:center; gap:.65rem; min-width:0; }
.gl-with-thumb > div{ min-width:0; }

/* rozetler */
.gl-form{ display:inline-flex; gap:3px; }
.gl-fm{ width:20px; height:20px; border-radius:5px; display:inline-flex; align-items:center; justify-content:center; font-size:.68rem; font-weight:700; }
.gl-fm.w{ background:var(--gl-win-bg); color:var(--gl-win); }
.gl-fm.l{ background:var(--gl-loss-bg); color:var(--gl-loss); }
.gl-delta{ font-variant-numeric:tabular-nums; font-weight:600; font-size:.84rem; }
.gl-delta.gl-up{ color:var(--gl-win); }
.gl-delta.gl-down{ color:var(--gl-loss); }
.gl-delta.gl-flat{ color:var(--text-muted); }
.gl-surprise{ display:inline-flex; align-items:center; gap:.25rem; font-size:.7rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--gl-surprise); background:var(--gl-surprise-bg); border-radius:999px; padding:.12rem .5rem; white-space:nowrap; }
.gl-settle{ display:inline-flex; align-items:center; gap:.3rem; font-size:.78rem; font-weight:500; border-radius:999px; padding:.18rem .6rem; border:1px solid; }
.gl-settle.oturmadi{ color:var(--text-muted); border-color:var(--border-bright); }
.gl-settle.oturuyor{ color:var(--accent); border-color:var(--accent-glow); background:var(--accent-light); }
.gl-settle.oturdu{ color:var(--gl-win); border-color:var(--gl-win-bg); background:var(--gl-win-bg); }

/* maç listesi */
.gl-match .side{ display:flex; align-items:center; gap:.5rem; min-width:0; }
.gl-match .side i{ font-size:.8rem; flex-shrink:0; }
.gl-match .side.w i{ color:var(--gl-win); }
.gl-match .side.l i{ color:var(--gl-loss); }
.gl-match .date{ color:var(--text-muted); white-space:nowrap; font-size:.84rem; }

/* sayfalama */
.gl-pager{ display:flex; justify-content:center; align-items:center; gap:.4rem; margin-top:1.2rem; font-size:.88rem; flex-wrap:wrap; }
.gl-pager a, .gl-pager span{ padding:.35rem .7rem; border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text-muted); text-decoration:none; }
.gl-pager a:hover{ color:var(--accent); border-color:var(--accent); }
.gl-pager .cur{ color:var(--accent); border-color:var(--accent); background:var(--accent-light); }

/* ── kitap.php puan kartı ── */
.gl-card{ border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); padding:1.2rem 1.3rem; margin:1.6rem 0; max-width:760px; }
.gl-card-head{ display:flex; align-items:center; justify-content:space-between; gap:.8rem; flex-wrap:wrap; margin-bottom:.9rem; }
.gl-card-head .t{ font-family:'Space Grotesk',sans-serif; font-size:.74rem; letter-spacing:.2em; text-transform:uppercase; color:var(--text-muted); display:flex; align-items:center; gap:.45rem; }
.gl-card-head .t i{ color:var(--accent); }
.gl-card-head a{ font-size:.82rem; color:var(--text-muted); text-decoration:none; }
.gl-card-head a:hover{ color:var(--accent); }
.gl-stats{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:.8rem; }
.gl-stat .k{ font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin-bottom:.15rem; }
.gl-stat .v{ font-family:'Space Grotesk',sans-serif; font-size:1.55rem; font-weight:700; line-height:1.1; }
.gl-stat .v small{ font-size:.85rem; font-weight:500; color:var(--text-muted); }
.gl-stat .v .of{ color:var(--text-dim); font-weight:500; font-size:1rem; }
.gl-spark-wrap{ margin:1rem 0 .4rem; }
.gl-spark{ width:100%; height:auto; display:block; }
.gl-spark .base{ stroke:var(--border-bright); stroke-width:1; stroke-dasharray:3 4; }
.gl-spark .area{ fill:var(--accent-light); }
.gl-spark .line{ fill:none; stroke:var(--accent); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.gl-spark .dot{ fill:var(--accent); }
.gl-spark-cap{ display:flex; justify-content:space-between; font-size:.74rem; color:var(--text-dim); }
.gl-facts{ display:flex; flex-wrap:wrap; gap:.4rem 1.2rem; font-size:.84rem; color:var(--text-muted); margin:.8rem 0 .2rem; }
.gl-facts a{ color:var(--text); }
.gl-facts i{ margin-right:.25rem; }
.gl-mini{ list-style:none; margin:.9rem 0 0; padding:0; border-top:1px solid var(--border); }
.gl-mini li{ display:grid; grid-template-columns:24px 1fr auto auto; gap:.6rem; align-items:center; padding:.5rem 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.gl-mini li:last-child{ border-bottom:0; }
.gl-mini a{ color:var(--text); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gl-mini a:hover{ color:var(--accent); }
.gl-mini .date{ color:var(--text-dim); font-size:.78rem; white-space:nowrap; }
.gl-card .gl-all{ display:inline-block; margin-top:.7rem; font-size:.84rem; color:var(--accent); text-decoration:none; }
.gl-card-empty{ color:var(--text-muted); font-size:.92rem; display:flex; align-items:center; gap:.5rem; }

@media (max-width:720px){
  .gl-table .col-author, .gl-table .col-hide-m{ display:none; }
  .gl-table .sub{ display:block; }
  .gl-table th, .gl-table td{ padding:.55rem .5rem; }
  .gl-bar form{ margin-left:0; width:100%; }
  .gl-bar input[type=search]{ min-width:0; flex:1; }
  .gl-stat .v{ font-size:1.25rem; }
  .gl-mini li{ grid-template-columns:24px 1fr auto; }
  .gl-mini .date{ display:none; }
}
