:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #dde3eb;
  --text: #16202e;
  --muted: #5e6b7c;
  --primary: #1f4e8c;
  --primary-2: #173d6f;
  --primary-soft: #e6edf6;
  --on-primary: #ffffff;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --success: #12a37a;
  --success-soft: #e3f6ef;
  --shadow: 0 1px 2px rgba(16, 32, 56, .05), 0 4px 16px rgba(16, 32, 56, .05);
  --radius: 14px;
  color-scheme: light;
}

/*
 * Tema: varsayılan açık, <html data-theme="dark"> koyu.
 * Seçim /js/theme.js tarafından sayfa çizilmeden önce uygulanır.
 */
:root[data-theme="dark"] {
  --bg: #0e131a;
  --surface: #151c26;
  --surface-2: #1c2531;
  --border: #283343;
  --text: #e5eaf1;
  --muted: #8d99aa;
  --primary: #6f9be0;
  --primary-2: #8db1ea;
  --primary-soft: #1a2b42;
  --on-primary: #0e131a;
  --danger-soft: #3a1c20;
  --success-soft: #133228;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}


* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Form ögeleri ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.block { width: 100%; margin-top: 18px; padding: 11px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }

.alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-top: 14px; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--success-soft); color: var(--success); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand span {
  color: var(--primary);
}

/* ---------- Giriş / kayıt ekranları ---------- */
.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px 72px;
  background: var(--bg);
}
.auth-box { width: 100%; max-width: 400px; padding: 32px 28px; }
.auth-box .brand { font-size: 30px; text-align: center; }
.auth-box .tagline { text-align: center; color: var(--muted); margin: 4px 0 20px; }
.tabs { display: flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px;
  font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
}
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.feed-tabs { background: var(--surface); border: 1px solid var(--border); }
.feed-tabs a {
  flex: 1; text-align: center; padding: 9px; border-radius: 8px; font-weight: 600; color: var(--muted);
}
.feed-tabs a:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.feed-tabs a.active { background: var(--primary-soft); color: var(--primary); }

.profile-card .joined { margin-top: 6px; }
.profile-actions { margin-top: 14px; }
.suggestions { padding: 16px; }
.suggestions h3 { font-size: 15px; margin-bottom: 10px; }
.suggestion { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.suggestion + .suggestion { border-top: 1px solid var(--border); }
.suggestion .who { flex: 1; min-width: 0; font-size: 14px; }
.suggestion .who a { color: var(--text); font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corner-link {
  position: fixed; right: 18px; bottom: 16px; font-size: 13px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px;
}
.corner-link:hover { color: var(--primary); text-decoration: none; }
.badge-admin {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary);
}

/* ---------- Ana düzen ---------- */
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 620px);
  gap: 24px;
  justify-content: center;
  padding: 24px 16px;
}
.sidebar { position: sticky; top: 82px; align-self: start; display: flex; flex-direction: column; gap: 16px; }
.profile-card { padding: 24px 20px; text-align: center; }
.profile-card .avatar { margin: 0 auto 12px; }
.profile-card .name { font-weight: 700; font-size: 18px; }
.profile-card .bio { margin: 12px 0 0; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.profile-card .stats { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.profile-card .stats b { color: var(--text); }
.nav { padding: 8px; display: flex; flex-direction: column; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--text); background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
}
.nav a:hover, .nav button:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px;
  user-select: none;
}
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 84px; height: 84px; font-size: 32px; }

.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-actions label.btn { margin: 0; color: #fff; font-size: 13px; }
.photo-actions .muted { flex-basis: 100%; }
#p-photo-preview.loading { opacity: .4; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

.feed { display: flex; flex-direction: column; gap: 16px; }
.feed-header { display: flex; align-items: center; justify-content: space-between; }
.composer { padding: 16px; }
.composer textarea { border: 0; background: var(--surface-2); min-height: 80px; }
.composer .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

.post { padding: 18px 18px 12px; }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who a { color: var(--text); font-weight: 700; }
.post-body { margin: 12px 0; white-space: pre-wrap; word-wrap: break-word; }
.icon-btn {
  border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; font: inherit;
}
.icon-btn:hover { background: var(--surface-2); color: var(--danger); }

.reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.reaction {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 3px 10px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; gap: 5px;
}
.reaction .count { font-size: 12px; font-weight: 600; color: var(--muted); }
.reaction:hover { background: var(--surface-2); }
.reaction.mine { border-color: var(--primary); background: var(--primary-soft); }
.reaction.mine .count { color: var(--primary); }
.reaction-add { position: relative; }
.reaction-btn {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 4px 8px; border-radius: 8px; cursor: pointer;
}
.reaction-btn:hover { background: var(--surface-2); color: var(--primary); }
.reaction-picker {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30; display: flex; gap: 2px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.reaction-picker .pick { border: 0; background: transparent; font-size: 20px; line-height: 1; padding: 6px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.reaction-picker .pick:hover { transform: scale(1.2); background: var(--surface-2); }
.reaction-picker .pick.mine { background: var(--primary-soft); }

.comments { padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; flex: 1; min-width: 0; }
.comment .bubble a { color: var(--text); font-weight: 600; font-size: 13px; }
.comment .bubble p { margin: 2px 0 0; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { border-radius: 999px; padding: 8px 14px; }
.comment-toggle { font-size: 13px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.load-more { align-self: center; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 10, 25, .5); display: grid; place-items: center; padding: 16px; z-index: 50;
}
.modal { width: 100%; max-width: 460px; padding: 24px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-dot.selected { border-color: var(--text); }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 22px 0 4px; }

/* ---------- Yönetim paneli ---------- */
.admin-layout { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px; }
.stat .num { font-size: 26px; font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.panel { padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head input { max-width: 240px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
td .user-cell { display: flex; align-items: center; gap: 10px; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.active { background: var(--success-soft); color: var(--success); }
.pill.banned { background: var(--danger-soft); color: var(--danger); }
.pill.admin { background: var(--primary-soft); color: var(--primary); }
.pill.member { background: var(--surface-2); color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 300;
  box-shadow: var(--shadow);
}
.toast.error { background: var(--danger); color: #fff; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= Hesap sistemi ================= */

.verified {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; vertical-align: -2px;
  border-radius: 50%; background: #1d9bf0; color: #fff; font-size: 10px; font-weight: 900; line-height: 1;
}
.form-links { margin-top: 8px; text-align: right; font-size: 13px; }
.form-links.center { text-align: center; margin-top: 18px; }
.center-text { text-align: center; }
.big-icon { font-size: 44px; margin: 10px 0; }

.segmented { display: flex; gap: 4px; margin-top: 16px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; }
.segmented button {
  flex: 1; border: 0; background: none; padding: 7px 4px; border-radius: 7px; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented button.active { background: var(--primary-soft); color: var(--primary); }
.method-note { margin: 10px 0 0; }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 20px 0 12px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.social-buttons { display: flex; flex-direction: column; gap: 8px; }
.social-btn { width: 100%; }
.social-icon { font-weight: 800; width: 20px; display: inline-block; }

.count-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
}

.profile-card { position: relative; overflow: hidden; }
.mini-cover { position: absolute; inset: 0 0 auto 0; height: 70px; background: center / cover no-repeat; opacity: .9; }
.mini-cover ~ .avatar { position: relative; border: 3px solid var(--surface); margin-top: 14px; }

.banner { padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; border-color: #f5a524; }

/* Profil sayfası başlığı */
.profile-hero { overflow: hidden; }
.cover {
  height: 170px; background: var(--primary) center / cover no-repeat;
}
.cover.edit { height: 120px; border-radius: 10px; margin-bottom: 14px; }
.hero-body { padding: 0 20px 18px; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -48px; }
.avatar.xl { width: 104px; height: 104px; font-size: 40px; border: 4px solid var(--surface); }
.hero-actions { padding-bottom: 6px; display: flex; gap: 8px; }
.hero-name { margin: 10px 0 2px; font-size: 22px; }
.hero-name .verified { width: 20px; height: 20px; font-size: 12px; }
.lock { margin-left: 8px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.profile-hero .bio { margin: 12px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.facts li { display: flex; align-items: center; gap: 6px; }
.socials, .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.social-chip {
  font-size: 13px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text);
}
.social-chip:hover { background: var(--surface-2); text-decoration: none; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.profile-hero .stats { display: flex; gap: 18px; justify-content: flex-start; margin-top: 14px; font-size: 14px; color: var(--muted); }
.profile-hero .stats b { color: var(--text); }

/* Bildirimler */
.notification { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.notification:last-child { border-bottom: 0; }
.notification.unread { background: var(--primary-soft); border-radius: 10px; padding: 12px; }
.notification .text { flex: 1; min-width: 0; font-size: 14px; }
.notification .text a { color: var(--text); font-weight: 600; }
.notif-icon { width: 32px; height: 32px; display: grid; place-items: center; font-size: 20px; flex: none; }
.row-actions { display: flex; gap: 6px; }

/* Ayarlar */
.settings-tabs { flex-wrap: wrap; }
.settings-body { display: flex; flex-direction: column; gap: 16px; }
.settings-section h3 { margin-bottom: 4px; }
.settings-section > .muted { margin: 0 0 12px; }
.settings-section h4 { margin: 18px 0 0; font-size: 14px; }
.settings-form { display: flex; flex-direction: column; }
.settings-form > .btn { align-self: flex-start; margin-top: 14px; }
.field label { display: block; }
.field label > input, .field label > select, .field label > textarea { margin-top: 6px; font-weight: 400; color: var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.prefix { color: var(--muted); font-weight: 700; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .pill { margin-left: 6px; }
.grow { flex: 1; min-width: 0; }
.device-icon { font-size: 22px; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 4px 0 0; color: var(--text); font-weight: 400; font-size: 15px; }
.switch {
  appearance: none; width: 42px; height: 24px; flex: none; border-radius: 999px; background: var(--border);
  position: relative; cursor: pointer; transition: background .15s; padding: 0; border: 0; margin-top: 2px;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s;
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(18px); }
.photo-actions label.btn { margin: 0; color: #fff; font-size: 13px; }

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .banner { flex-direction: column; align-items: flex-start; }
}

/* ================= Paylaşım fotoğrafları ================= */
.composer .row-left { display: flex; align-items: center; gap: 12px; }
.composer-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.composer-images:empty { display: none; }
.composer-thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.composer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.composer-thumb.uploading img { opacity: .45; }
.thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: 12px; line-height: 1;
}
.spinner {
  position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.post-images { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; margin: 0 0 12px; }
.post-images.count-1 { grid-template-columns: 1fr; }
.post-images.count-2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1; }
.post-images.count-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 3 / 2; }
.post-images.count-3 .post-image:first-child { grid-row: span 2; }
.post-images.count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.post-image { border: 0; padding: 0; margin: 0; cursor: zoom-in; background: var(--surface-2); min-height: 0; overflow: hidden; }
.post-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-images.count-1 .post-image img { max-height: 520px; height: auto; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(5, 5, 12, .92);
  display: grid; place-items: center; cursor: zoom-out;
}
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 6px; }
.lightbox-close, .lightbox-nav {
  position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 50%;
}
.lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; line-height: 1; }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-counter { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

.notification.clickable { cursor: pointer; }
.notification.clickable:hover { background: var(--surface-2); border-radius: 10px; }
.notification .post-link { color: var(--text); font-weight: 400; font-style: italic; }
.notif-quote {
  margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--primary); background: var(--surface-2);
  border-radius: 0 8px 8px 0; font-size: 13px; white-space: pre-wrap; word-wrap: break-word;
}

/* Yönetim · kayıtlar */
.admin-tabs { margin-bottom: 20px; max-width: 420px; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.log-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.log-filters select, .log-filters input { width: auto; min-width: 200px; }
.log-table td { font-size: 13px; }
.nowrap { white-space: nowrap; }
.log-danger td:nth-child(2) { color: var(--danger); font-weight: 600; }

/* ================= Mesajlar ================= */
.conversations { padding: 8px; }
.conversation { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--text); }
.conversation:hover { background: var(--surface-2); text-decoration: none; }
.conversation.unread { background: var(--primary-soft); }
.conversation .count-badge { margin-left: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-preview { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation.unread .conv-preview { color: var(--text); font-weight: 600; }

.chat { display: flex; flex-direction: column; height: calc(100vh - 110px); min-height: 420px; overflow: hidden; }
.chat-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-user { display: flex; align-items: center; gap: 10px; color: var(--text); }
.chat-user:hover { text-decoration: none; }
.chat .load-more { margin: 8px auto 0; }
.chat-thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 12px; border-radius: 999px; margin: 8px 0; }
.msg {
  position: relative; max-width: 75%; align-self: flex-start; background: var(--surface-2);
  padding: 8px 12px; border-radius: 16px 16px 16px 4px;
}
.msg.mine { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-radius: 16px 16px 4px 16px; }
.msg.deleted { opacity: .6; font-style: italic; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; }
.msg-meta { font-size: 11px; opacity: .7; text-align: right; margin-top: 2px; }
.msg-delete {
  position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface); color: var(--muted); box-shadow: var(--shadow); font-size: 11px; display: none;
}
.msg:hover .msg-delete { display: block; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { min-height: 42px; max-height: 140px; resize: none; border-radius: 20px; padding: 10px 16px; }
.chat-locked { padding: 16px; text-align: center; border-top: 1px solid var(--border); }

/* ================= Arama ================= */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 956px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-search { flex: 0 1 300px; margin-left: auto; }
.top-search input { border-radius: 999px; padding: 8px 16px; background: var(--surface-2); border-color: transparent; }
.top-search input:focus { background: var(--surface); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; }
.search-box input { border: 0; background: transparent; flex: 1; }
.search-box input:focus { outline: none; }
.search-icon { font-size: 16px; }
.person { align-items: flex-start; }
.person-info { color: var(--text); }
.person-info:hover { text-decoration: none; }
.person-bio { margin-top: 4px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hashtag, .mention { font-weight: 600; }

/* ================= Görünüm / tema seçimi ================= */
.theme-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 460px; }
.theme-option {
  text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
}
.theme-option:hover { border-color: var(--primary); }
.theme-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-preview { height: 70px; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); }
.theme-preview span { height: 10px; border-radius: 4px; }
.theme-preview span:first-child { width: 45%; background: #1f4e8c; }
.theme-light .theme-preview { background: #f4f6f9; }
.theme-light .theme-preview span:not(:first-child) { background: #ffffff; border: 1px solid #dde3eb; }
.theme-dark .theme-preview { background: #0e131a; }
.theme-dark .theme-preview span:not(:first-child) { background: #1c2531; }
@media (max-width: 600px) { .theme-options { grid-template-columns: 1fr; } }

/* Giriş sayfaları ve yönetim panelindeki tema düğmesi */
.theme-toggle {
  position: fixed; left: 18px; bottom: 16px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px;
}
.theme-toggle:hover { color: var(--primary); }
.admin-top .theme-toggle { position: static; font-size: 14px; padding: 9px 14px; border-radius: 10px; color: var(--text); }

/* ================= Menü, kaydetme, şikâyet ================= */
.dropdown { position: relative; }
.dropdown-toggle { font-size: 18px; line-height: 1; padding: 4px 10px; }
.dropdown-toggle:hover { color: var(--text); }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 270px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px;
}
.dropdown-item {
  display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 14px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--text);
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item.danger { color: var(--danger); }
.reason-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 4px; }
.reason {
  display: flex; gap: 8px; align-items: center; margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer;
}
.reason input { width: auto; }
.reason:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.modal label > textarea { margin-top: 6px; font-weight: 400; }
.hero-actions .dropdown-toggle { border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; }
@media (max-width: 600px) { .reason-list { grid-template-columns: 1fr; } }

/* Yönetim · şikâyetler */
.report-card { padding: 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.report-card .report-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.report-snapshot {
  margin: 10px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; border-left: 3px solid var(--danger);
  white-space: pre-wrap; word-wrap: break-word; font-size: 14px;
}
.report-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-count { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.pill.open { background: var(--danger-soft); color: var(--danger); }
.pill.resolved { background: var(--success-soft); color: var(--success); }
.pill.dismissed { background: var(--surface-2); color: var(--muted); }
.admin-tabs.wide { max-width: 620px; }
select.auto-width { width: auto; }
.big-icon:empty { display: none; }
.notif-icon { border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; }

/* ================= Mobil menü ================= */
.menu-btn { display: none; position: relative; border: 0; background: transparent; color: var(--text); padding: 6px; border-radius: 10px; cursor: pointer; }
.menu-btn:hover { background: var(--surface-2); }
.menu-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.drawer-backdrop { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .topbar-inner { gap: 10px; }
  .topbar-inner .brand { margin-right: auto; font-size: 20px; }
  .top-search { flex: 0 1 180px; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 45; width: min(300px, 85vw); align-self: stretch;
    overflow-y: auto; padding: 16px; background: var(--bg); box-shadow: var(--shadow);
    transform: translateX(-105%); transition: transform .2s ease; visibility: hidden;
  }
  body.drawer-open .sidebar { transform: none; visibility: visible; }
  body.drawer-open .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(10, 10, 25, .45); }
  body.drawer-open { overflow: hidden; }
}

/* ================= Gizlilik / koşullar ================= */
.legal-page { padding: 32px 16px 64px; }
.legal-box { max-width: 720px; margin: 0 auto; padding: 28px; }
.legal-box .brand { display: inline-block; margin-bottom: 16px; color: var(--text); }
.legal-box h2 { margin-top: 24px; }
.legal-box p { line-height: 1.65; }

/* ================= Hikayeler ================= */
.story-bar { display: flex; gap: 14px; padding: 14px 16px; overflow-x: auto; scrollbar-width: none; }
.story-bar::-webkit-scrollbar { display: none; }
.story-bubble { flex: 0 0 auto; width: 68px; border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--text); font: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.story-ring { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; padding: 3px; border: 2px solid var(--border); }
.story-bubble.unseen .story-ring { border-color: var(--primary); border-width: 3px; }
.story-ring .avatar.lg { width: 100%; height: 100%; font-size: 20px; margin: 0; }
.story-plus { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--on-primary); border: 2px solid var(--surface); display: grid; place-items: center; font-size: 15px; font-weight: 700; line-height: 1; }
.story-name { font-size: 12px; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.story-open { overflow: hidden; }
.story-viewer { position: fixed; inset: 0; z-index: 150; background: rgba(5, 8, 14, .94); display: grid; place-items: center; }
.story-frame { position: relative; width: min(420px, 100vw); height: min(760px, 100dvh); background: #0b0f16; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; color: #fff; }
@media (max-width: 600px) { .story-frame { border-radius: 0; } }
.story-progress { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.story-progress span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.story-progress span i { display: block; height: 100%; width: 0; background: #fff; }
.story-progress span.done i { width: 100%; }
.story-progress span.active i { animation: story-fill linear forwards; }
.story-viewer.paused .story-progress span.active i { animation-play-state: paused; }
@keyframes story-fill { from { width: 0; } to { width: 100%; } }
.story-head { position: absolute; top: 22px; left: 12px; right: 12px; z-index: 3; display: flex; align-items: center; justify-content: space-between; }
.story-user { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.story-user span { opacity: .75; font-size: 12px; }
.story-close { border: 0; background: transparent; color: #fff; font-size: 22px; cursor: pointer; padding: 4px 8px; }
.story-stage { flex: 1; display: flex; }
.story-photo { position: relative; flex: 1; display: grid; place-items: center; background: #000; }
.story-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.story-caption { position: absolute; left: 16px; right: 16px; bottom: 70px; margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, .55); text-align: center; font-size: 16px; }
.story-text { flex: 1; display: grid; place-items: center; padding: 32px; text-align: center; }
.story-text p { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.story-tap { position: absolute; top: 70px; bottom: 70px; width: 30%; z-index: 2; border: 0; background: transparent; cursor: pointer; }
.story-tap.prev { left: 0; }
.story-tap.next { right: 0; }
.story-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; padding: 14px; }
.story-foot:empty { display: none; }
.story-action { border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.story-action.danger { border-color: rgba(229, 72, 77, .7); }
.story-modal { z-index: 160; }
.viewer-list { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow: auto; }
.viewer-row { display: flex; align-items: center; gap: 10px; }
.viewer-row span { margin-left: auto; }

.story-compose-preview { height: 260px; border-radius: 12px; overflow: hidden; display: flex; background: #000; margin: 12px 0; }
.story-compose-preview img { width: 100%; height: 100%; object-fit: contain; }
.story-compose-preview .story-text p { font-size: 20px; color: #fff; }
.story-colors { display: flex; gap: 8px; margin-bottom: 10px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.story-compose .modal-actions { align-items: center; }
.story-compose .spacer { flex: 1; }
.story-replybar { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.story-emojis { display: flex; justify-content: center; gap: 6px; }
.story-emoji { border: 0; background: rgba(0, 0, 0, .35); border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; transition: transform .12s; }
.story-emoji:hover { transform: scale(1.15); }
.story-emoji.mine { background: rgba(255, 255, 255, .3); box-shadow: 0 0 0 2px #fff inset; }
.story-emoji.pop { animation: story-pop .3s; }
@keyframes story-pop { 50% { transform: scale(1.35); } }
.story-reply { display: flex; gap: 8px; }
.story-reply input { flex: 1; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .35); color: #fff; padding: 10px 16px; }
.story-reply input::placeholder { color: rgba(255, 255, 255, .7); }
.story-send { border: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; padding: 0 6px; }
.story-frame:has(.story-replybar) .story-tap { bottom: 130px; }
.viewer-reaction { font-size: 18px; }
.story-frame:has(.story-replybar) .story-caption { bottom: 140px; }

/* ================= @bahsetme önerileri ================= */
.mention-wrap { position: relative; }
.mention-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 35; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; max-width: 360px; }
.mention-option { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text); font: inherit; padding: 6px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.mention-option .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-option.active, .mention-option:hover { background: var(--surface-2); }
.comment-input { flex: 1; min-width: 0; }
.comment-input input { width: 100%; }
.composer .mention-wrap textarea { width: 100%; }

/* ================= Mesajlarda fotoğraf ve "yazıyor" ================= */
.msg-image { display: block; max-width: 240px; max-height: 320px; border-radius: 12px; cursor: zoom-in; margin-bottom: 4px; object-fit: cover; }
.chat-photo { flex: 0 0 auto; }
.chat-photo.busy { opacity: .5; pointer-events: none; }
.chat-typing { padding: 4px 16px 0; font-size: 13px; color: var(--muted); font-style: italic; }

/* ================= Yeniden paylaşma ================= */
.repost-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.repost-btn:hover { color: var(--text); }
.quote-card { display: block; margin: 0 0 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--surface-2); }
.quote-card:hover { text-decoration: none; border-color: var(--primary); }
.quote-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.quote-head .muted { margin-left: auto; }
.quote-body { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.quote-image { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.modal .quote-card { margin-top: 12px; pointer-events: none; }

/* ================= Anket ================= */
.poll { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.poll-option { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 14px; border: 1px solid var(--primary); border-radius: 10px; background: var(--surface); color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.poll-option:hover:not(:disabled) { background: var(--primary-soft); }
.poll-option.result { border-color: var(--border); color: var(--text); font-weight: 500; }
.poll-option.mine { border-color: var(--primary); font-weight: 700; }
.poll-option:disabled { cursor: default; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--primary-soft); transition: width .3s; }
.poll-text, .poll-pct { position: relative; }
.poll-pct { margin-left: auto; font-weight: 700; }
.poll-meta { margin-top: 2px; }
.poll-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-editor-row { display: flex; align-items: center; gap: 8px; }
.poll-editor-row .muted { margin-left: auto; }
.poll-duration { width: auto; padding: 6px 10px; }
.composer .btn.active { border-color: var(--primary); color: var(--primary); }

/* ================= Keşfet ================= */
.explore-tags { padding: 16px; }
.explore-tags h3 { margin: 0 0 10px; font-size: 15px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 14px; }
.tag-chip:hover { text-decoration: none; filter: brightness(.97); }
.tag-chip span { font-size: 12px; opacity: .7; font-weight: 500; }

/* ================= Öne çıkanlar ve arşiv ================= */
.hl-cover { width: 100%; height: 100%; border-radius: 50%; background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px; }
.hl-cover.archive { background: var(--surface-2); border: 2px dashed var(--border); }
.hl-cover.archive::after { content: ""; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 50%; }
.archive-modal { max-width: 560px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 60vh; overflow: auto; }
.archive-item { position: relative; aspect-ratio: 9 / 16; border: 0; border-radius: 10px; background-size: cover; background-position: center; color: #fff; font: inherit; font-size: 12px; font-weight: 600; padding: 8px; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.archive-item span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.archive-item time { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .55); border-radius: 6px; padding: 1px 6px; font-size: 11px; }
.hl-pick-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* ================= Anlık bildirim kartı ================= */
.push-card p { margin: 4px 0 0; }
.push-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.download-box { text-align: left; }
.download-icon { display: block; border-radius: 22px; margin: 8px 0 12px; }
.download-box ol { padding-left: 20px; line-height: 1.7; }
.app-update { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-update-top { max-width: 924px; margin: 16px auto 0; width: calc(100% - 32px); }

/* Yorum ⋯ menüsü: masaüstünde üzerine gelince, dokunmatikte hep görünür */
.comment .dropdown { align-self: center; }
.comment .dropdown-toggle { padding: 2px 8px; font-size: 16px; opacity: .55; }
.comment:hover .dropdown-toggle, .comment .dropdown-toggle:focus { opacity: 1; }
.comment .dropdown-menu { min-width: 180px; }

/* Hikaye: izleyen sayısı ve aşağıdan açılan görenler paneli */
.story-head-actions { display: flex; align-items: center; gap: 2px; }
.story-head-actions .dropdown-toggle { color: #fff; font-size: 20px; background: transparent; }
.story-head-actions .dropdown-menu { right: 0; }
.story-foot:has(.story-views) { justify-content: flex-start; }
.story-views { display: inline-flex; align-items: center; gap: 8px; border: 0; background: rgba(0, 0, 0, .4); color: #fff; font: inherit; font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.eye { position: relative; width: 18px; height: 11px; border: 2px solid #fff; border-radius: 75% 15%; transform: rotate(45deg) scale(.9); }
.eye::after { content: ""; position: absolute; inset: 0; margin: auto; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.story-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 65%; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform .25s ease; padding: 8px 16px 16px; }
.story-sheet.open { transform: none; }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 4px auto 10px; cursor: pointer; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-title .story-close { color: var(--muted); }
.sheet-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.sheet-time { margin-left: auto; color: var(--muted); }
.sheet-empty { color: var(--muted); margin: 8px 0; }

/* ================= Mobil: alt menü, üst bildirim zili, + paneli ================= */
.bottom-nav { display: none; }
.top-bell { display: inline-flex; margin-left: 4px; }
.suggest-strip { display: none; }
.top-bell { position: relative; color: var(--text); padding: 6px; border-radius: 10px; }
.top-bell .count-badge, .bottom-nav .count-badge { position: absolute; top: 0; right: 0; transform: translate(30%, -20%); }
.suggest-strip { padding: 12px 0 12px 14px; }
.suggest-strip h3 { margin: 0 0 8px; font-size: 14px; }
.suggest-row { display: flex; gap: 8px; overflow-x: auto; padding-right: 16px; scrollbar-width: none; }
.suggest-row::-webkit-scrollbar { display: none; }
.suggest-card { flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.suggest-card a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); min-width: 0; max-width: 100%; }
.suggest-card a:hover { text-decoration: none; }
.suggest-card .avatar.lg { width: 40px; height: 40px; font-size: 15px; margin: 0; }
.suggest-card .muted { display: none; }
.suggest-card b, .suggest-card .muted { font-size: 12px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-card .btn { width: 100%; padding: 4px 8px; font-size: 12px; }
.explore-search { padding: 8px; }
.explore-search input { border-radius: 999px; padding: 10px 16px; background: var(--surface-2); border-color: transparent; }
.create-sheet { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 18px 18px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin: 0 auto; }
.sheet-backdrop { align-items: end; padding: 0; }
.create-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.create-option:hover { border-color: var(--primary); }
.composer-modal-wrap { width: 100%; max-width: 560px; }
.composer-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.composer-modal.modal { max-width: 560px; display: block !important; }

@media (max-width: 900px) {
  .top-search { display: none; }
  .top-bell { display: inline-flex; }
  .home-header { display: none; }
  .feed .composer:not(.composer-modal) { display: none; }
  .suggest-strip:not(.hidden) { display: block; }
  #suggestions { display: none !important; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; align-items: center;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 0; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav .count-badge { right: 50%; transform: translate(130%, 0); }
  .bottom-plus { flex: 0 0 auto; width: 48px; height: 40px; border: 0; border-radius: 14px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; margin: 0 6px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
.admin-view-note { background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 8px 12px; margin: 8px 0 4px; font-weight: 600; }
@media (max-width: 900px) {
  /* Sohbet ekranı alt menünün üstünde bitsin, yazma kutusu görünsün */
  .chat { height: calc(100dvh - 205px - env(safe-area-inset-bottom)); min-height: 280px; }
  .layout { padding-top: 12px; }
  .back-home { display: none; }
}
/* Mobilde menü alt çubukta: üstteki menü düğmesi gizli */
@media (max-width: 900px) {
  .topbar .menu-btn { display: none; }
  .bottom-nav > button:not(.bottom-plus) { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; padding: 4px 0; cursor: pointer; }
  body.drawer-open #bottom-menu { color: var(--primary); }
  #menu-dot-bottom { position: absolute; top: 2px; right: 50%; transform: translateX(16px); width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
  .sidebar { bottom: calc(60px + env(safe-area-inset-bottom)); }
  body.drawer-open .drawer-backdrop { bottom: calc(60px + env(safe-area-inset-bottom)); }
}
#profile-card { cursor: pointer; }

/* Onay / bilgi pencereleri (tarayıcının kendi pencereleri yerine) */
.dialog-backdrop { z-index: 400; }
.dialog { max-width: 400px; overflow-x: hidden; }
.dialog h2 { font-size: 19px; margin-bottom: 6px; }
.dialog-text { color: var(--muted); white-space: pre-line; margin: 0 0 4px; line-height: 1.5; }
.dialog input { margin-top: 12px; }

/* Paylaşım kutusundaki Fotoğraf / Anket düğmeleri aynı hizada ve boyda */
.composer .row-left { display: flex; align-items: center; gap: 8px; }
.composer .row-left > .btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; margin: 0; font-size: 13px; line-height: 1; vertical-align: middle; }
label.btn { margin: 0; font-size: 13px; }
.modal { overflow-x: hidden; }
.composer textarea { overflow-x: hidden; }
.push-prompt { gap: 10px; }
.push-prompt-actions { display: flex; gap: 8px; flex-shrink: 0; }
/* Mobil menü sağdan açılır; alt çubukta/üstte zaten olan bağlantılar menüde gösterilmez */
@media (max-width: 900px) {
  .sidebar { left: auto; right: 0; transform: translateX(105%); }
  #nav a[data-route="feed"], #nav a[data-route="messages"], #nav a[data-route="notifications"], #nav a[data-route="explore"] { display: none; }
}
.pill.moderator { background: #e7f5ef; color: #0f766e; }
@media (max-width: 900px) {
  .main-tabs { display: none; }
  /* Mobilde Keşfet kendi başlığını gösterir */
}

/* ================= Rol rozetleri (gönderi başlığı) ================= */
.role-badge { position: relative; flex: 0 0 auto; display: inline-flex; align-self: center; margin-left: auto; border-radius: 999px; padding: 2px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.role-badge > span { display: block; padding: 3px 10px; border-radius: 999px; background: var(--surface); }
.post-head .role-badge + .dropdown { margin-left: 4px; }
/* Yönetici: hareketli alev kenarlık */
.role-badge.admin { background: linear-gradient(90deg, #ff3d00, #ff9100, #ffd600, #ff6d00, #ff1744, #ff3d00); background-size: 300% 100%; animation: flame 2.4s linear infinite; box-shadow: 0 0 8px rgba(255, 109, 0, .45); }
.role-badge.admin > span { color: #e65100; }
:root[data-theme="dark"] .role-badge.admin > span { color: #ffab40; }
@keyframes flame { from { background-position: 0% 50%; } to { background-position: 300% 50%; } }
/* Denetimci: mavi kenarlık + sağ üstte büyüteç */
.role-badge.mod { background: #2563eb; }
.role-badge.mod > span { color: #2563eb; }
:root[data-theme="dark"] .role-badge.mod > span { color: #7aa7ff; }
.role-badge .mag { position: absolute; top: -7px; right: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px #2563eb; }
.role-badge .mag::before { content: ""; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; border: 1.6px solid #2563eb; border-radius: 50%; }
.role-badge .mag::after { content: ""; position: absolute; left: 9px; top: 9px; width: 1.6px; height: 4px; background: #2563eb; transform: rotate(-45deg); transform-origin: top; border-radius: 1px; }
@media (prefers-reduced-motion: reduce) { .role-badge.admin { animation: none; } }
/* Yönetici rozeti: sağ üstte yuvarlak içinde taç */
.role-badge .crown { position: absolute; top: -7px; right: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px #ff6d00; }
.role-badge .crown::before { content: ""; position: absolute; left: 3px; top: 4px; width: 9px; height: 7px; background: linear-gradient(180deg, #ffd54f, #ff8f00); clip-path: polygon(0 100%, 0 25%, 25% 60%, 50% 0, 75% 60%, 100% 25%, 100% 100%); }
.post-time { display: block; margin: 0 0 8px; }

/* ================= Popüler konular / etiket sayfası ================= */
.topic { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; color: var(--text); }
.topic + .topic { border-top: 1px solid var(--border); }
.topic b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic:hover { text-decoration: none; }
.topic:hover b { color: var(--primary); }
.tag-header { padding: 16px 20px; margin-bottom: 16px; }
.tag-header h2 { font-size: 20px; margin-bottom: 2px; }

/* ================= Başarımlar ================= */
.achievement-strip { padding: 14px 18px; margin-bottom: 16px; }
.achievement-strip-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.achievement-strip-head h3 { font-size: 15px; }
.achievement-strip-head a { margin-left: auto; }
.achievement-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.achievement-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); font-size: 20px; cursor: default; }
.achievement-summary { padding: 16px 20px; margin-bottom: 16px; display: grid; gap: 10px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.achievement { padding: 16px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.achievement-badge { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; font-size: 28px; background: var(--primary-soft); margin-bottom: 6px; }
.achievement.locked .achievement-badge { filter: grayscale(1); opacity: .45; background: var(--surface-2); }
.achievement.locked b { color: var(--muted); }
.achievement-date { color: var(--primary); font-weight: 600; margin-top: 4px; }
.achievement-progress { width: 100%; display: grid; gap: 4px; margin-top: 6px; }

/* Menü simgeleri: yazının en sağında */
.nav .nav-label { flex: 1; }
.nav .count-badge { margin-left: 0; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; color: var(--muted); }
.nav a:hover .nav-icon, .nav button:hover .nav-icon, .nav a.active .nav-icon { color: var(--primary); }
.nav a[data-route="achievements"] .nav-icon { color: #d4a017; }

/* Sağ sütun (Popüler konular): yalnızca geniş ekranda, akışın sağında sabit */
.rightbar { display: none; }
@media (min-width: 1240px) {
  .layout { grid-template-columns: 280px minmax(0, 620px) 280px; }
  .topbar-inner { max-width: 1260px; }
  .rightbar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 82px; align-self: start; }
}

/* ================= Geri bildirim ================= */
.feedback-form { padding: 16px 20px; margin-bottom: 16px; display: grid; gap: 12px; }
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chip-btn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.feedback-list h3 { font-size: 15px; margin: 4px 0 10px; }
.feedback-item { padding: 14px 18px; margin-bottom: 10px; }
.feedback-item p { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill.new { background: var(--primary-soft); color: var(--primary); }
.pill.read { background: var(--surface-2); color: var(--muted); }
.pill.done { background: var(--success-soft); color: var(--success); }

/* Uygulama tanıtımı */
.app-card { padding: 16px; display: grid; gap: 8px; justify-items: start; }
.app-card b { font-size: 15px; }
.app-prompt { gap: 10px; }
