:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --border: #ebebeb;
  --border-strong: #d4d4d4;
  --accent: #0a0a0a;
  --accent-text: #ffffff;
  --chip: #f4f4f5;
  --check-a: #f1f1f1;
  --check-b: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --surface: #0f0f10;
  --text: #ededed;
  --muted: #8f8f8f;
  --border: #1f1f21;
  --border-strong: #333336;
  --accent: #ededed;
  --accent-text: #0a0a0a;
  --chip: #151517;
  --check-a: #1a1a1c;
  --check-b: #111113;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 560px; padding-top: 96px; padding-bottom: 96px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.02em; font-size: 17px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.search { flex: 1; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%; height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.actions { display: flex; align-items: center; gap: 6px; }
.pill {
  height: 30px; min-width: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid transparent;
}
.pill:hover { text-decoration: none; color: var(--text); }
.pill.on { color: var(--text); border-color: var(--border-strong); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: transparent;
  color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--chip); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }

/* Hero + chips */
.hero { padding: 56px 0 24px; max-width: 720px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; }
.hero p { margin: 14px 0 0; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--chip); border: 1px solid var(--border); font-size: 14px; color: var(--muted);
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip .count { font-size: 12px; opacity: .65; }
.chip.small { height: 28px; padding: 0 12px; font-size: 13px; }

/* Grid */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.thumb, .checker {
  background-color: var(--check-b);
  background-image:
    linear-gradient(45deg, var(--check-a) 25%, transparent 25%, transparent 75%, var(--check-a) 75%),
    linear-gradient(45deg, var(--check-a) 25%, transparent 25%, transparent 75%, var(--check-a) 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px;
}
.thumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 18px; border-bottom: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card-meta { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-cat { font-size: 12.5px; color: var(--muted); }
.empty { padding: 72px 0; }

/* Pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 40px 0 8px; font-size: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: opacity .15s, background .15s;
}
.btn:hover { text-decoration: none; background: var(--chip); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { opacity: .88; background: var(--accent); }
.btn.ghost { background: transparent; }
.btn.big { height: 48px; padding: 0 28px; font-size: 16px; border-radius: 12px; }
.btn.disabled { opacity: .4; pointer-events: none; }

/* Detail */
.crumbs { padding: 28px 0 16px; font-size: 14px; }
.detail { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; padding-bottom: 56px; }
.preview { border: 1px solid var(--border); border-radius: 20px; padding: 40px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.preview img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
/* Önizleme koruması: görsel işaretçi olaylarını almaz (sağ tık "resmi kaydet" menüsü çıkmaz), seçilemez, sürüklenemez */
.protect img, .thumb img { pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.protect { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.info h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; margin-bottom: 14px; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 16.5px; }
.facts { margin: 28px 0 20px; border-top: 1px solid var(--border); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 550; text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.related { padding: 8px 0 72px; }
.related h2 { font-size: 22px; margin-bottom: 20px; }

/* Ads */
.ad { margin-top: 24px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; text-align: center; overflow: hidden; }
.ad-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }

/* Modal */
.modal { border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); color: var(--text); padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.modal::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.modal-body { padding: 28px; }
.modal h3 { font-size: 21px; margin-bottom: 8px; }
.bar-track { height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; margin: 18px 0 4px; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1s linear; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .primary { flex: 1; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Bakım modu */
.maint-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.maint-card { max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.maint-card h1 { font-size: clamp(28px, 6vw, 40px); font-weight: 700; }
.maint-card p { margin: 0; font-size: 17px; }
.maint-brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 8px; }
.maint-brand .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.maint-banner { background: #e5484d; color: #fff; text-align: center; font-size: 13.5px; font-weight: 550; padding: 8px 16px; }

/* Responsive */
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 28px; }
  .preview { padding: 24px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .bar { gap: 10px; }
  .brand { font-size: 16px; }
  .search { max-width: none; }
  .hero { padding-top: 36px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .thumb { padding: 12px; }
  .site-footer .container { flex-direction: column; }
}
@media (max-width: 420px) {
  .brand span:not(.dot) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
