/* TitanBench — Apple tarzı tasarım sistemi */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.10);
  --green: #34c759;
  --green-soft: rgba(52, 199, 89, 0.12);
  --nav-bg: rgba(245, 245, 247, 0.8);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.09);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #000000;
  --surface: #1d1d1f;
  --surface-2: #151517;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #2997ff;
  --accent-soft: rgba(41, 151, 255, 0.14);
  --nav-bg: rgba(0, 0, 0, 0.75);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 52px;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand a { color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand a:hover { text-decoration: none; }
.brand .by { color: var(--faint); font-size: 12px; font-weight: 500; }
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink); font-size: 13px; opacity: 0.85; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.search-box { position: relative; }
.search-box input {
  width: 190px;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--border);
  border-radius: 980px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: 0.5; }
.search-drop {
  position: absolute; top: 40px; right: 0; width: 340px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 6px; display: none; max-height: 380px; overflow: auto;
}
.search-drop.open { display: block; }
.search-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.search-item:hover { background: var(--surface-2); }
.search-item .n { font-weight: 600; font-size: 13px; }
.search-item .s { color: var(--muted); font-size: 12px; }

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 980px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s;
}
.theme-btn:hover { border-color: var(--border-strong); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 84px 24px 56px; }
.hero .brand-word { display: block; font-size: 15px; color: var(--faint); margin-bottom: 14px; }
.hero h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.06;
}
.hero .grad-word {
  background: linear-gradient(90deg, #0071e3, #6a5cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: 19px;
  color: var(--muted);
}
.hero-actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-note { font-size: 13px; color: var(--faint); }

.btn {
  display: inline-block;
  border-radius: 980px;
  padding: 13px 30px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0077ed; text-decoration: none; transform: scale(1.02); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- istatistikler ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 8px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.stat .v { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- bölüm başlıkları ---------- */
section { padding: 48px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.section-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.section-head .hint { color: var(--faint); font-size: 13px; }

/* ---------- sekmeler ---------- */
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 980px; padding: 4px; }
.tabs button {
  border: none; background: transparent; color: var(--muted);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: 980px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tabs button.active { background: var(--ink); color: var(--bg); }

/* ---------- liderlik tablosu ---------- */
.lb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 0;
}
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 130px 90px;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-size: 20px; font-weight: 700; color: var(--faint); text-align: right; }
.lb-rank.top { color: var(--accent); }
.lb-body { min-width: 0; }
.lb-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar-track { height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.lb-bar { height: 100%; background: var(--accent); border-radius: 3px; width: 0; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.lb-val { font-size: 18px; font-weight: 700; text-align: right; letter-spacing: -0.01em; }
.lb-n { color: var(--faint); font-size: 12px; text-align: right; }
.lb-empty { padding: 40px 24px; text-align: center; color: var(--muted); }

/* ---------- son sonuçlar ---------- */
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.recent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.recent-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.recent-card .rc-cpu { font-weight: 600; font-size: 15px; }
.recent-card .rc-sys { color: var(--muted); font-size: 12px; margin-top: 3px; }
.recent-scores { display: flex; gap: 14px; margin-top: 14px; }
.recent-scores .rs { flex: 1; }
.recent-scores .rs .v { font-weight: 700; font-size: 17px; }
.recent-scores .rs .l { color: var(--faint); font-size: 11px; }
.recent-card .rc-link { display: block; margin-top: 12px; font-size: 13px; font-weight: 500; }

/* ---------- footer ---------- */
footer { margin-top: 64px; padding: 28px 0 44px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12px; }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ================= SKOR SAYFASI ================= */
.score-head { padding: 40px 0 28px; }
.back-link { color: var(--muted); font-size: 13px; }
.score-cpu { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.score-sys { color: var(--muted); font-size: 14px; margin-top: 6px; }
.score-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.tile .tile-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.tile .tile-value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.tile .tile-rank { font-size: 12px; color: var(--faint); margin-top: 8px; }
.tile .tile-rank b { color: var(--muted); }
.pill {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 980px;
  margin-left: 6px;
  vertical-align: 2px;
}

/* sıralama + ortalama bölümü */
.rank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 0;
  margin-top: 20px;
}
.rank-row { padding: 15px 24px; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: none; }
.rank-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rank-metric { font-weight: 600; font-size: 15px; }
.rank-pos { font-size: 14px; color: var(--muted); }
.rank-pos b { color: var(--ink); font-size: 16px; }
.rank-pos .top1 { color: var(--green); font-weight: 700; }
.compare-bar { display: grid; grid-template-columns: 90px 1fr 70px; gap: 10px; align-items: center; margin-top: 10px; }
.compare-bar .cb-label { font-size: 12px; color: var(--faint); }
.compare-bar .cb-track { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; position: relative; }
.compare-bar .cb-you { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.compare-bar .cb-avg-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: 0.55; border-radius: 1px; }
.compare-bar .cb-val { font-size: 12px; font-weight: 600; text-align: right; }

/* alt testler */
.subs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-top: 20px;
}
.subs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 24px; margin-top: 14px; }
.subs-section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 18px; }
.sub-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.sub-item:last-child { border-bottom: none; }
.sub-item .si-l { color: var(--muted); }
.sub-item .si-v { font-weight: 600; }

.loading { padding: 80px 0; text-align: center; color: var(--muted); font-size: 15px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 14px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; text-align: center;
  margin: 60px auto; max-width: 460px;
}

@media (max-width: 720px) {
  .hero h1 { font-size: 38px; }
  .stats { grid-template-columns: 1fr; }
  .lb-row { grid-template-columns: 32px 1fr 96px; }
  .lb-n { display: none; }
  .search-box input { width: 130px; }
  .nav-links { gap: 10px; }
  .tabs { overflow-x: auto; max-width: 100%; }
}
