/* Tema ziroo-edge www/shared/hub.css ("neon arcade") ve www/tools/tools.css (.t-steam vurgusu) ile aynı aileden.
   Kendi kendine yeter: hub.css'e bağlanmaz, gerekli değişkenler burada kopyalı. Kimlik kartı: docs/tasarim/kimlik.md.
   CSP (server.js): style-src 'self', img-src'de data: yok → satır içi stil ve data: görsel kullanılmaz.
   Arka plan ışığı durağan; hareket yalnız transform/opacity (renk değişimleri anlık), prefers-reduced-motion hepsini kapatır.
   Kural: renk, yazı boyutu, yarıçap, gölge ve süre yalnız :root değişkeninden gelir. */
:root {
  color-scheme: dark;
  /* hub.css ortak değişkenleri */
  --bg: #07060e;
  --ink: #f4f2ff;
  --ink-2: #bcb7d8;
  --ink-3: #9d98bd;
  --white: #fff;
  --display: Bahnschrift, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  /* tools.css arka plan ışıkları ("r g b") */
  --au-1: 59 130 246;
  --au-2: 34 211 238;
  --au-3: 139 92 246;
  --vignette: 3 2 8;
  /* Araç vurgusu (.t-steam): kehribar = AGCR sonucu ve etkileşim */
  --a1: 251 191 36;
  --a2: 249 115 22;
  --ink-a: 253 230 138;
  --title: linear-gradient(95deg, #fffbeb 0%, #fde68a 34%, #fbbf24 64%, #fb923c 100%);
  --primary-ink: #1a1206;

  /* Yüzeyler ve çizgiler (beyazın saydamlıkları) */
  --surface: rgb(17 14 32 / .78);
  --surface-solid: #1a1630;
  --fill-0: rgb(255 255 255 / .02);
  --fill: rgb(255 255 255 / .05);
  --fill-2: rgb(255 255 255 / .08);
  --line: rgb(255 255 255 / .1);
  --line-2: rgb(255 255 255 / .16);
  --line-3: rgb(255 255 255 / .26);

  /* Durum renkleri: yeşil tamam/olumlu, kırmızı Steam saymıyor/düşürüyor, turuncu dikkat */
  --ok: 74 222 128;
  --bad: 251 113 133;
  --att: 253 186 116;
  --success: rgb(var(--ok));
  --danger: rgb(var(--bad));
  --warn: rgb(var(--att));
  --danger-ink: #fecdd3;

  /* Yazı boyutları */
  --fs-xs: .75rem;      /* 12 px: etiket, tablo başlığı, durum etiketi */
  --fs-sm: .875rem;     /* 14 px: açıklama, not, tablo */
  --fs-base: 15px;      /* gövde */
  --fs-lg: 1.125rem;    /* 18 px: bölüm başlığı, oyuncu adı */
  --fs-xl: 1.625rem;    /* 26 px: AGCR kartı değeri */
  --fs-display: clamp(30px, 5vw, 46px);

  /* Yarıçap (üç), gölge (iki), süre */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 18px 40px -24px rgb(0 0 0 / .8);
  --glow: 0 8px 24px -12px rgb(var(--a1) / .8);
  --dur: .2s;

  /* Boşluk */
  --gap: 12px;
  --gap-lg: 20px;
  --hit: 40px;
}
* { box-sizing: border-box; }
html {
  margin: 0;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--line-2) var(--bg);
}
body {
  position: relative;
  isolation: isolate;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 100vh;
  padding: 0 16px 28px;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-base)/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Durağan arka plan ışığı: tools hub renkleri (mavi/camgöbeği/mor) + hafif kehribar */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 8% -8%, rgb(var(--au-1) / .2), transparent 70%),
    radial-gradient(45% 40% at 96% 2%, rgb(var(--au-2) / .11), transparent 70%),
    radial-gradient(38% 32% at 62% -6%, rgb(var(--a1) / .1), transparent 70%),
    radial-gradient(60% 50% at 40% 112%, rgb(var(--au-3) / .14), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 20%, transparent 45%, rgb(var(--vignette) / .65) 100%);
}
::selection { background: rgb(var(--a1) / .4); color: var(--white); }
a { color: rgb(var(--ink-a)); text-underline-offset: 3px; text-decoration-color: rgb(var(--a1) / .45); }
a:hover { color: var(--white); text-decoration-color: rgb(var(--a1)); }
:focus-visible { outline: 2px solid rgb(var(--ink-a)); outline-offset: 3px; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); font-size: var(--fs-sm); }
h1, h2, h3 { line-height: 1.25; font-family: var(--display); color: var(--ink); }
h1 {
  width: fit-content;
  max-width: 100%;
  margin: clamp(28px, 6vw, 56px) 0 8px;
  font-size: var(--fs-display);
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.05;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 {
    background: var(--title);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: .01em; margin: 0 0 6px; }
h3 { font-size: var(--fs-base); font-weight: 700; margin: var(--gap-lg) 0 8px; }
.sub { max-width: 70ch; color: var(--ink-2); margin: 0 0 var(--gap-lg); font-size: var(--fs-base); }

/* inputs & buttons */
input, select {
  font: inherit; color: var(--ink); background: var(--fill);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .55rem .8rem; min-width: 0;
  min-height: var(--hit);
}
input::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover { border-color: var(--line-3); }
input:focus, select:focus { border-color: rgb(var(--a1) / .7); background-color: var(--fill-2); }
input:focus-visible, select:focus-visible { outline: 2px solid rgb(var(--a1) / .55); outline-offset: 1px; }
select { cursor: pointer; }
option, optgroup { background: var(--surface-solid); color: var(--ink); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
input[type="number"] { color-scheme: dark; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: rgb(var(--a1)); cursor: pointer; padding: 0; margin: 0; }
input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--hit);
  font: 700 var(--fs-base)/1.2 var(--display); letter-spacing: .02em; cursor: pointer;
  border-radius: var(--radius-pill); padding: .55rem 1.15rem;
  background: linear-gradient(90deg, rgb(var(--a1)), rgb(var(--a2)));
  border: 1px solid transparent; color: var(--primary-ink);
  box-shadow: var(--glow);
  transition: transform var(--dur);
}
button:hover { border-color: rgb(var(--ink-a) / .7); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid rgb(var(--ink-a)); outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; box-shadow: none; }
button.ghost { background: var(--fill); color: var(--ink); border-color: var(--line-2); box-shadow: none; }
button.ghost:hover { border-color: rgb(var(--a1) / .6); background: rgb(var(--a1) / .1); color: rgb(var(--ink-a)); }
button.x {
  background: transparent; border-color: transparent; color: var(--danger); box-shadow: none;
  padding: .3rem .8rem; font-size: var(--fs-sm); border-radius: var(--radius-sm); flex: none;
}
button.x:hover { background: rgb(var(--bad) / .12); border-color: rgb(var(--bad) / .3); }

/* header */
.top { padding-top: 4px; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; padding-inline: 1rem; border-radius: var(--radius-pill); }
.auth { display: flex; align-items: center; gap: var(--gap); flex-wrap: wrap; margin: 0 0 14px; }
.auth a:not(.steam-signin) { font-size: var(--fs-sm); }
.steam-signin { display: inline-flex; line-height: 0; border-radius: var(--radius-sm); }
.steam-signin img { display: block; }
.progress { margin-top: 14px; display: flex; align-items: center; gap: var(--gap); }
.progress .bar { flex: 1; height: 8px; background: var(--fill-2); border: 1px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.progress .fill { height: 100%; width: 0; border-radius: var(--radius-pill); background: linear-gradient(90deg, rgb(var(--a1)), rgb(var(--a2))); }
.progress span { color: var(--ink-2); font-size: var(--fs-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.error {
  color: var(--danger-ink); background: rgb(var(--bad) / .12); border: 1px solid rgb(var(--bad) / .35);
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: var(--fs-sm); margin: 14px 0 0;
}

/* shared surface: player, stat cards, panels */
.player, .card, .panel {
  background: linear-gradient(180deg, var(--fill), transparent 45%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* player */
.player { display: flex; align-items: center; gap: 14px; margin: 28px 0 var(--gap); padding: 14px 18px; }
.player > div { flex: 1; min-width: 0; }
.avatar { width: 52px; height: 52px; border-radius: var(--radius-sm); border: 1px solid rgb(var(--a1) / .4); }
.player-name { font: 700 var(--fs-lg)/1.25 var(--display); text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
a.player-name:hover { color: rgb(var(--ink-a)); }

/* stat cards: AGCR cards (.key) first and larger, count cards quieter */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap-lg); }
.card { padding: 12px 16px; min-width: 0; }
.card.key { border-top: 2px solid rgb(var(--a1)); }
.card.key + .card:not(.key) { grid-column-start: 1; }   /* count cards always start a new row */
.card .label { color: var(--ink-3); font: 600 var(--fs-xs)/1.3 var(--display); text-transform: uppercase; letter-spacing: .08em; }
.card .value { font: 700 var(--fs-lg)/1.2 var(--display); margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--ink); }
.card.key .value { font-size: var(--fs-xl); letter-spacing: -.005em; color: rgb(var(--ink-a)); }
.card .hint { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }
.pos { color: var(--success); } .neg { color: var(--danger); } .warn { color: var(--warn); }
.card .value.pos, .card.key .value.pos { color: var(--success); }
.card .value.warn, .card.key .value.warn { color: var(--warn); }

/* panels */
.panel { padding: var(--gap-lg); margin-bottom: var(--gap-lg); min-width: 0; }
.panel > h2:first-child + .muted { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px var(--gap); margin: 0 0 var(--gap); flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--hit); font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.scroll-hint { display: none; margin: 0 0 6px; font-size: var(--fs-xs); }

/* compare grid */
#compare { overflow-x: auto; }
.views { display: grid; grid-template-columns: auto repeat(5, minmax(0, 1fr)); font-variant-numeric: tabular-nums; margin-bottom: var(--gap); min-width: 560px; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.views > div { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.views > div:nth-child(6n+1) { color: var(--ink-2); }
.views > div:nth-last-child(-n+6) { border-bottom: 0; }
.views .h { color: var(--ink-3); font: 600 var(--fs-xs)/1.3 var(--display); text-transform: uppercase; letter-spacing: .06em; background: var(--fill); }
.views > div:nth-child(6n+2):not(.h) { color: rgb(var(--ink-a)); }
.notes { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-sm); }
.notes li { margin: 6px 0; }
.notes li::marker { color: rgb(var(--a1) / .7); }
.notes li.warn { color: var(--warn); }
.notes li.muted { color: var(--ink-3); }
#compare h3 { margin-top: var(--gap-lg); }

/* add-game forms and lists */
.app-form { display: flex; gap: 8px; margin: var(--gap) 0 4px; }
.app-form input { flex: 1; max-width: 260px; }
.manual-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; }
.manual-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.manual-list:empty { display: none; }
.manual-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; min-height: var(--hit); background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.manual-list li.muted { padding: 8px 12px; background: transparent; border-style: dashed; }

/* ranked list */
.rank { margin: 0; padding-left: 28px; font-size: var(--fs-sm); }
.rank li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.rank li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rank li:last-child { border-bottom: 0; }
.rank li span.r { float: right; margin-left: var(--gap); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.rank li span.r.pos { color: var(--success); } .rank li span.r.neg { color: var(--danger); }

/* table */
.filters { display: flex; gap: 8px; margin: var(--gap) 0; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 160px; }
.table-wrap, #compare { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
tbody tr:nth-child(even) td { background: var(--fill-0); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--fill); }
th {
  font: 600 var(--fs-xs)/1.3 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
  background: var(--surface-solid); position: sticky; top: 0; border-bottom-color: var(--line-2);
}
th[data-sort] { padding: 0; }
button.sort {
  display: flex; width: 100%; min-height: var(--hit); padding: 8px 12px; gap: 4px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: inherit;
  justify-content: flex-start; white-space: nowrap;
}
th.num button.sort { justify-content: flex-end; }
button.sort:hover { color: var(--ink); border: 0; }
button.sort:focus-visible { outline-offset: -2px; }
button.sort:active { transform: none; }
th.asc, th.desc { color: rgb(var(--ink-a)); }
th.asc button.sort::after { content: "▲"; } th.desc button.sort::after { content: "▼"; }
td.num, th.num { text-align: right; }
td .muted { font-size: var(--fs-xs); }
td.name { white-space: normal; min-width: 200px; }
td.name .gn { display: flex; align-items: center; gap: 8px; }
td.name img { width: 24px; height: 24px; border-radius: var(--radius-sm); flex: none; }
td.cb { padding: 0; text-align: center; }
label.hit { display: inline-flex; align-items: center; justify-content: center; width: var(--hit); height: var(--hit); cursor: pointer; }
tr.excluded td { color: var(--ink-3); }
tr.excluded td.name span:not([class]) { text-decoration: line-through; text-decoration-color: var(--ink-3); }
tr.excluded img, tr.excluded .pbar { opacity: .5; }

/* status tags: square-ish, colour only where it changes the count */
.flag { display: inline-flex; padding: 1px 6px; border-radius: var(--radius-sm); font: 600 var(--fs-xs)/1.4 var(--display); letter-spacing: .02em; margin-right: 4px; color: var(--ink-2); border: 1px solid var(--line-2); }
.flag.perfect { color: var(--success); border-color: rgb(var(--ok) / .4); }
.flag.noplay, .flag.private { color: var(--warn); border-color: rgb(var(--att) / .4); }
.flag.unvetted { color: var(--danger); border-color: rgb(var(--bad) / .4); }
.pbar { display: inline-block; width: 44px; height: 6px; background: var(--fill-2); border-radius: var(--radius-pill); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--success); border-radius: var(--radius-pill); }
#tableCount { margin: 8px 0 0; }
main > .foot { text-align: center; margin-top: 24px; }

/* external links (icons are files, masked so they follow the theme color) */
.links { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; flex: none; }
a.ext[class*="i-"] { display: inline-block; width: 24px; height: 24px; border-radius: var(--radius-sm); position: relative; color: var(--ink-3); }
a.ext[class*="i-"]::before { content: ""; position: absolute; inset: 4px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
a.ext[class*="i-"]:hover { color: rgb(var(--ink-a)); background: rgb(var(--a1) / .14); }
a.i-store { --icon: url("icons/store.svg"); }
a.i-ach { --icon: url("icons/ach.svg"); }
a.i-sh { --icon: url("icons/sh.svg"); }
a.tlink { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
a.tlink:hover { color: rgb(var(--ink-a)); border-bottom-color: rgb(var(--a1)); }

/* site footer: hub .foot */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  margin-top: 40px; padding-top: var(--gap-lg); border-top: 1px solid var(--line);
  color: var(--ink-3); font: 500 var(--fs-sm)/1.4 var(--display); letter-spacing: .08em;
}
.site-foot a {
  display: inline-flex; align-items: center; min-height: var(--hit);
  color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
}
.site-foot a:hover { color: var(--white); text-decoration-color: rgb(var(--a1)); }
.site-foot .sep { width: 4px; height: 4px; border-radius: var(--radius-pill); background: currentColor; opacity: .6; }

@media (max-width: 720px) {
  .manual-form { grid-template-columns: 1fr 1fr; }
  .manual-form input:first-child, .manual-form button { grid-column: 1 / -1; }
  .app-form input { max-width: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.key .value { font-size: var(--fs-lg); }
  .card .value { font-size: var(--fs-base); }
  .panel { padding: 14px; }
  .scroll-hint { display: block; }
  th:nth-child(4), td:nth-child(4) { display: none; }
}
@media (max-width: 420px) {
  .search { flex-direction: column; }
  .search button { width: 100%; }
  .player { flex-wrap: wrap; }
}
@media (pointer: coarse) {
  a.ext[class*="i-"] { width: var(--hit); height: var(--hit); }
  a.ext[class*="i-"]::before { inset: 10px; }
  td.name .gn { flex-wrap: wrap; }
  .player-name { display: inline-flex; align-items: center; min-height: var(--hit); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:active { transform: none; }
}
