/* Tanıtım sayfasıyla aynı sistem: cool-grey-cobalt paleti, Chivo, yuvarlak köşeler */
:root {
  --bg: #eef0f3;
  --card: #ffffff;
  --ink: #0b0c0e;
  --muted: #5d6470;
  --line: #dde1e7;
  --soft: #e2e5ea;
  --accent: #1f2de6;
  --accent-ink: #ffffff;
  --accent-soft: #e2e4fc;
  --like: #c4234f;
  --ok: #1f7a4f;
  --danger: #b4321f;
  --shadow: 0 1px 2px rgba(11, 12, 14, .05), 0 6px 20px -8px rgba(11, 12, 14, .12);
  --radius: 20px;
  --font: "Chivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c0e;
    --card: #17181a;
    --ink: #eef0f3;
    --muted: #8e939b;
    --line: #26282c;
    --soft: #202226;
    --accent: #eef0f3;
    --accent-ink: #0b0c0e;
    --accent-soft: #24262b;
    --like: #ff5c86;
    --ok: #4cc28f;
    --danger: #ff7a66;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 20px; padding-bottom: 40px; outline: none; }

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 400; letter-spacing: -.02em; font-size: 20px; }
/* tanıtım sayfasındaki kemer işareti (bir kapı) */
.brand-mark {
  width: 18px; height: 18px; flex: none; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 21.5V12a9.5 9.5 0 0 1 19 0v9.5h-6V12a3.5 3.5 0 0 0-7 0v9.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 21.5V12a9.5 9.5 0 0 1 19 0v9.5h-6V12a3.5 3.5 0 0 0-7 0v9.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button { text-decoration: none; }
.brand-name { white-space: nowrap; }
.nav { min-width: 0; }
.nav .btn-ghost[title="Profilim"] { max-width: 132px; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 24px; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card);
  min-height: 40px; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s;
}
.btn:hover { background: var(--soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- Kartlar ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.stack > * + * { margin-top: 14px; }

.hero { padding: 28px 24px; }
.hero h1 { font-size: clamp(28px, 6vw, 36px); font-weight: 400; line-height: 1.08; letter-spacing: -.035em; margin: 0 0 12px; max-width: 18ch; }
.hero p { margin: 0 0 20px; max-width: 46ch; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Filtre sekmeleri ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--muted);
}
.tab[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Paylaşım kutusu ---------- */
.composer { padding: 14px; }
.composer textarea {
  width: 100%; border: 0; background: transparent; resize: none; min-height: 72px;
  font-size: 16px; padding: 4px 2px; outline: none;
}
.composer-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.composer-row .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted);
}
/* anonim paylaş anahtarı */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 36px; height: 22px; border-radius: 99px; background: var(--soft); position: relative; flex: none; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.anon-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.avatar.anon { background: var(--ink) !important; color: var(--bg); }
.op { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.place-input { margin-top: 8px; }
.preview { position: relative; margin-top: 10px; }
.preview img { border-radius: 12px; max-height: 320px; width: 100%; object-fit: cover; }
.preview button { position: absolute; top: 8px; right: 8px; }
.file-label { cursor: pointer; }
.file-label input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Gönderi ---------- */
.post { padding: 14px 16px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 500; color: #fff; font-size: 15px;
  text-transform: uppercase; text-decoration: none;
}
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.post-meta { flex: 1; min-width: 0; line-height: 1.25; }
.post-meta .who { font-weight: 500; text-decoration: none; }
.post-meta .who:hover { text-decoration: underline; }
.post-meta .when { color: var(--muted); font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
@media (prefers-color-scheme: dark) { .chip { color: var(--ink); } }
.place { margin-top: 10px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.place svg { flex: none; color: var(--accent); }
.post-body { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-img { margin-top: 12px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.post-img img { width: 100%; max-height: 560px; object-fit: cover; }
.post-actions { display: flex; align-items: center; gap: 4px; margin: 10px -8px -4px; }
.act {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent;
  padding: 7px 10px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 14px;
}
.act:hover { background: var(--soft); color: var(--ink); }
.act.liked { color: var(--like); }
.act.liked svg { fill: currentColor; }
.act .heart-pop { animation: pop .3s ease; }
@keyframes pop { 40% { transform: scale(1.3); } }
.post-actions .spacer { flex: 1; }

/* Menü */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; min-width: 170px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.14); padding: 6px;
}
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.menu button:hover { background: var(--soft); }
.menu .danger { color: var(--danger); }

/* Yorumlar */
.comments { border-top: 1px solid var(--line); margin: 12px -16px -14px; padding: 12px 16px 14px; background: color-mix(in srgb, var(--soft) 45%, transparent); border-radius: 0 0 var(--radius) var(--radius); }
.comment { display: flex; gap: 9px; margin-bottom: 10px; }
.comment .avatar { width: 28px; height: 28px; font-size: 12px; }
.comment-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 11px; flex: 1; min-width: 0; }
.comment-bubble .who { font-weight: 500; font-size: 13px; text-decoration: none; }
.comment-bubble p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-tools { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.comment-tools button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; font-size: 12px; }
.comment-tools button:hover { color: var(--ink); text-decoration: underline; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1; }

/* ---------- Formlar ---------- */
.field { display: block; }
.field span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 90px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.auth { padding: 26px 22px; max-width: 440px; margin: 10px auto 0; }
.auth h1 { margin: 0 0 4px; font-size: 30px; font-weight: 400; letter-spacing: -.03em; }
.auth .lead { margin: 0 0 20px; color: var(--muted); }
.auth .alt { text-align: center; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; min-height: 1em; margin: 0; }

/* ---------- Profil ---------- */
.profile { padding: 22px; }
.profile-top { display: flex; gap: 16px; align-items: center; }
.profile h1 { margin: 0; font-size: 28px; font-weight: 400; letter-spacing: -.03em; overflow-wrap: anywhere; }
.profile .city { color: var(--muted); font-size: 14px; }
.profile .bio { margin: 14px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stats { display: flex; gap: 22px; margin-top: 16px; }
.stats b { display: block; font-size: 20px; }
.stats span { color: var(--muted); font-size: 13px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Boş durum, yükleniyor ---------- */
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; }
.loading { text-align: center; color: var(--muted); padding: 24px; }
.more { display: flex; justify-content: center; }

/* ---------- Sayfa metni ---------- */
.prose { padding: 24px 22px; }
.prose h1 { margin-top: 0; font-weight: 400; letter-spacing: -.03em; }
.prose h2 { font-size: 18px; margin-top: 26px; }
.prose li { margin-bottom: 6px; }
.prose .note { background: var(--accent-soft); padding: 12px 14px; border-radius: 12px; font-size: 14px; }

/* ---------- Yönetim ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.admin-stats .card { padding: 14px; }
.admin-stats b { display: block; font-size: 24px; }
.admin-stats span { color: var(--muted); font-size: 13px; }
.report { padding: 14px 16px; }
.report-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.report-reason { margin: 8px 0; font-weight: 500; }
.report-target { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }
.report-target img { max-height: 180px; border-radius: 8px; margin-top: 8px; }
.report-target .gone { color: var(--danger); font-weight: 500; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Diyalog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(420px, calc(100% - 32px));
  background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(10, 8, 6, .45); }
dialog h2 { margin: 0 0 12px; font-size: 19px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---------- Bildirim ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 26px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 480px) {
  .nav .hide-sm { display: none; }
  .hero { padding: 22px 18px; }
  .admin-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

h1, h2, h3 { font-weight: 400; }
.stats b, .admin-stats b { font-weight: 400; letter-spacing: -.02em; }
