/* ==================== SOSYAL KATMAN: rozet, seviye, ödül, anket, DM, profil, efektler ==================== */

/* ---- Kullanıcı adı süsleri ---- */
.verified-badge { display: inline-flex; width: 15px; height: 15px; margin-left: 3px; vertical-align: -2px; }
.verified-badge svg { width: 100%; height: 100%; }

.level-pill {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 5px; padding: 1px 6px;
  border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 1.5;
  background: var(--lv-bg, rgba(255,255,255,.07)); color: var(--lv-fg, var(--text-muted));
  border: 1px solid var(--lv-bd, rgba(255,255,255,.1)); vertical-align: 1px; cursor: default;
}
.level-pill.t2 { --lv-bg: rgba(34,197,94,.12); --lv-fg: #4ade80; --lv-bd: rgba(34,197,94,.35); }
.level-pill.t3 { --lv-bg: rgba(56,189,248,.12); --lv-fg: #38bdf8; --lv-bd: rgba(56,189,248,.35); }
.level-pill.t4 { --lv-bg: rgba(168,85,247,.14); --lv-fg: #c084fc; --lv-bd: rgba(168,85,247,.4); }
.level-pill.t5 { --lv-bg: linear-gradient(90deg, rgba(245,158,11,.2), rgba(239,68,68,.2)); --lv-fg: #fbbf24; --lv-bd: rgba(245,158,11,.5); }

.user-flair {
  display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600;
  color: var(--flair-color, var(--primary-light)); background: color-mix(in srgb, var(--flair-color, var(--primary)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--flair-color, var(--primary)) 35%, transparent); vertical-align: 1px; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.name-fx-glow { color: var(--primary-light) !important; font-weight: 700; }
.name-fx-gradient { background: linear-gradient(90deg, var(--primary-light), #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.name-fx-rainbow {
  background: linear-gradient(90deg, #f87171, #fbbf24, #4ade80, #38bdf8, #a78bfa, #f472b6, #f87171); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rainbowShift 4s linear infinite;
}
.name-fx-fire {
  background: linear-gradient(0deg, #ef4444, #f97316 40%, #fde047); -webkit-background-clip: text; background-clip: text;
  color: transparent !important;
}

/* ---- Gönderi ekleri ---- */
.post-new-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 10px; font-weight: 800;
  background: linear-gradient(90deg, #22c55e, #10b981); color: #04130a; letter-spacing: .05em; animation: newPulse 2s ease-in-out 3;
}
@keyframes newPulse { 50% { box-shadow: 0 0 0 4px rgba(34,197,94,.18); } }
.reading-time { color: var(--text-faint, var(--text-muted)); font-size: 11px; }

.awards-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.award-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-color); color: var(--text-main); cursor: default;
}
.award-chip.mine { border-color: rgba(251,191,36,.55); background: rgba(251,191,36,.1); }
.award-chip .n { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.award-pop { animation: awardPop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes awardPop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

.award-picker {
  position: absolute; z-index: 60; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px;
  background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.45);
  animation: pickerIn .16s ease-out;
}
@keyframes pickerIn { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.award-picker button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; min-width: 76px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-main); font-size: 11px; cursor: pointer; transition: var(--transition);
}
.award-picker button span { font-size: 22px; transition: transform .2s; }
.award-picker button:hover { border-color: var(--primary); transform: translateY(-2px); }
.award-picker button:hover span { transform: scale(1.2) rotate(-6deg); }
.award-picker button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.award-picker .left { grid-column: 1 / -1; text-align: center; font-size: 11px; color: var(--text-muted); }

.react-btn.saved { color: #fbbf24 !important; }
.react-btn.saved svg { fill: currentColor; }

/* ---- Anket ---- */
.poll-box { margin: 12px 0 4px; padding: 12px; border-radius: var(--radius); background: var(--bg-input); border: 1px solid var(--border-color); }
.poll-q { font-weight: 600; font-size: 13.5px; margin-bottom: 10px; }
.poll-opt {
  position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 6px; padding: 8px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: transparent; color: var(--text-main);
  font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; transition: border-color var(--transition);
}
.poll-opt:hover:not(:disabled) { border-color: var(--primary); }
.poll-opt:disabled { cursor: default; }
.poll-opt .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, 0.12); transition: width .8s cubic-bezier(.2,.8,.2,1); z-index: 0; }
.poll-opt.mine { border-color: var(--primary); }
.poll-opt.mine .fill { background: color-mix(in srgb, var(--primary) 35%, transparent); }
.poll-opt > span { position: relative; z-index: 1; }
.poll-opt .pct { font-weight: 700; font-size: 12px; color: var(--text-muted); }
.poll-meta { font-size: 11px; color: var(--text-muted); }

/* ---- Spoiler ---- */
.spoiler {
  background: var(--text-main); color: transparent; border-radius: 3px; padding: 0 3px; cursor: pointer; transition: all .25s;
  user-select: none;
}
.spoiler * { visibility: hidden; }
.spoiler.revealed { background: rgba(255,255,255,.08); color: inherit; user-select: auto; }
.spoiler.revealed * { visibility: visible; }

/* ---- Bahsetme ---- */
.mention-link { color: var(--primary-light); font-weight: 600; cursor: pointer; text-decoration: none; }
.mention-link:hover { text-decoration: underline; }

/* ---- Yorum ağacı ---- */
.comment-thread { position: relative; }
.comment-children { margin-left: 18px; padding-left: 12px; border-left: 2px solid var(--border-color); transition: border-color var(--transition); }
.comment-children:hover { border-left-color: var(--primary); }
.comment-collapse-btn {
  background: transparent; border: none; color: var(--text-muted); font-size: 11px; cursor: pointer; padding: 0 4px; font-family: monospace;
}
.comment-collapse-btn:hover { color: var(--primary-light); }
.comment-thread.collapsed > .comment-children, .comment-thread.collapsed > .comment-item .comment-body,
.comment-thread.collapsed > .comment-item .comment-react-bar { display: none; }
.comment-thread.collapsed > .comment-item { opacity: .65; }
.comment-reply-btn {
  background: transparent; border: none; color: var(--text-muted); font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 3px;
}
.comment-reply-btn:hover { color: var(--primary-light); }
.inline-reply-form { display: flex; gap: 6px; margin: 6px 0 8px; animation: pickerIn .15s ease-out; }
.inline-reply-form input { flex: 1; }
.comment-sort { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 4px; }
.comment-sort button { background: none; border: none; color: var(--text-muted); font-size: 11px; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.comment-sort button.active { color: var(--primary-light); background: rgba(255, 255, 255, 0.08); }
.comment-item.flash { animation: flashIn 1.6s ease-out; }
@keyframes flashIn { 0% { background: rgba(255, 255, 255, 0.12); } 100% { background: transparent; } }

/* ---- Etiket bulutu "daha fazla" ---- */
.tag-cloud-more {
  width: 100%; margin-top: 6px; padding: 6px; border-radius: var(--radius-sm); border: 1px dashed var(--border-color);
  background: transparent; color: var(--text-muted); font-size: 11.5px; cursor: pointer; transition: var(--transition);
}
.tag-cloud-more:hover { color: var(--primary-light); border-color: var(--primary); }

/* ---- Sağ panel: aktif üyeler & liderler ---- */
.online-list { display: flex; flex-wrap: wrap; gap: 6px; }
.online-av { position: relative; width: 30px; height: 30px; cursor: pointer; }
.online-av img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); transition: transform .2s; }
.online-av:hover img { transform: scale(1.12); }
.leader-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px; }
.leader-row:hover { background: var(--bg-card-hover); }
.leader-rank { width: 20px; text-align: center; font-weight: 800; color: var(--text-muted); }
.leader-row:nth-child(1) .leader-rank { color: #fbbf24; } .leader-row:nth-child(2) .leader-rank { color: #cbd5e1; } .leader-row:nth-child(3) .leader-rank { color: #d97706; }
.leader-row img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.leader-row .xp { margin-left: auto; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---- Sayfalar (Kaydedilenler / Haberler / Takım / Mesajlar) ---- */
.page-empty { text-align: center; padding: 48px 16px; color: var(--text-muted); }
.page-empty .big { font-size: 42px; margin-bottom: 8px; }
.news-card {
  padding: 16px 18px; margin-bottom: 12px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary); animation: cardIn .3s ease-out both;
}
.news-card h3 { font-size: 15px; margin-bottom: 6px; }
.news-card .meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.news-card img { max-width: 100%; border-radius: var(--radius-sm); margin-top: 8px; }
.section-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 18px 0 10px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.team-card {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color);
  cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; animation: cardIn .35s ease-out both;
}
.team-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.team-card .tc-banner { height: 58px; }
.team-card .tc-body { padding: 0 14px 14px; }
.team-card .tc-av { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; margin-top: -29px; border: 3px solid var(--bg-card); }
.team-card .tc-name { font-weight: 700; margin-top: 4px; }
.team-card .tc-bio { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }

.leaderboard { border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); padding: 8px; }
.leaderboard .leader-row { padding: 8px; font-size: 13.5px; }
.leaderboard .leader-row img { width: 28px; height: 28px; }

/* ---- Banner hazır ayarları ---- */
.bn-nebula { background: radial-gradient(circle at 20% 30%, #7c3aed 0, transparent 55%), radial-gradient(circle at 80% 70%, #db2777 0, transparent 50%), #1e1b4b; }
.bn-sunset { background: linear-gradient(120deg, #f97316, #db2777 55%, #7c3aed); }
.bn-ocean { background: linear-gradient(120deg, #0ea5e9, #2563eb 50%, #1e3a8a); }
.bn-forest { background: linear-gradient(120deg, #14532d, #16a34a 60%, #a3e635); }
.bn-ember { background: linear-gradient(120deg, #450a0a, #b91c1c 50%, #f59e0b); }
.bn-aurora { background: linear-gradient(120deg, #064e3b, #10b981, #6366f1, #a855f7); background-size: 300% 100%; animation: auroraMove 9s ease-in-out infinite alternate; }
.bn-void { background: repeating-linear-gradient(135deg, #0b0a10 0 12px, #15131c 12px 24px); }
.bn-sakura { background: linear-gradient(120deg, #fbcfe8, #f472b6 55%, #be185d); }
.bn-default { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); }
@keyframes auroraMove { to { background-position: 100% 0; } }

/* ---- Profil modalı ---- */
.profile-hero { position: relative; margin: 0 -22px; height: 110px; }
.profile-hero-body { display: flex; gap: 14px; align-items: flex-end; margin-top: -42px; position: relative; padding: 0 4px; }
.level-ring {
  position: relative; width: 92px; height: 92px; flex-shrink: 0; border-radius: 50%; padding: 4px;
  background: conic-gradient(var(--ring, var(--primary)) calc(var(--pct, 0) * 1%), rgba(255,255,255,.08) 0);
}
.level-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-card); background: var(--bg-card); }
.level-ring .lv {
  position: absolute; bottom: -2px; right: -2px; min-width: 28px; height: 28px; padding: 0 5px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--ring, var(--primary)); color: #fff; font-size: 12px; font-weight: 800; border: 3px solid var(--bg-card);
}
.profile-status { font-size: 12.5px; color: var(--text-main); margin-top: 4px; font-style: italic; }
.xp-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.xp-bar > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #f472b6); transition: width 1.1s cubic-bezier(.2,.8,.2,1);
  box-shadow: none; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.stat-grid div { text-align: center; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--bg-input); border: 1px solid var(--border-color); }
.stat-grid b { display: block; font-size: 16px; }
.stat-grid span { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.ach {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border-color); font-size: 9.5px; text-align: center; color: var(--text-muted); cursor: help;
}
.ach .e { font-size: 22px; }
.ach.on { border-color: rgba(251,191,36,.45); color: var(--text-main); box-shadow: inset 0 0 12px rgba(251,191,36,.08); }
.ach.off .e { filter: grayscale(1) opacity(.35); }

/* ---- Profil özelleştirme ---- */
.banner-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.banner-picker button { height: 38px; border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer; }
.banner-picker button.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }
.effect-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.effect-picker button {
  padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-input); color: var(--text-main);
  font-size: 12px; cursor: pointer; font-weight: 700;
}
.effect-picker button.sel { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.effect-picker button:disabled { opacity: .45; cursor: not-allowed; }
.customize-preview { padding: 14px; border-radius: var(--radius); background: var(--bg-input); border: 1px solid var(--border-color); }

/* ---- DM ---- */
.dm-layout { display: grid; grid-template-columns: 240px 1fr; height: min(70vh, 640px); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-color); background: var(--bg-card); }
.dm-list { border-right: 1px solid var(--border-color); overflow-y: auto; }
.dm-list-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border-color); transition: background var(--transition); }
.dm-list-item:hover, .dm-list-item.active { background: var(--bg-card-hover); }
.dm-list-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.dm-list-item .who { font-weight: 600; font-size: 13px; }
.dm-list-item .last { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-list-item .unread { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dm-thread { display: flex; flex-direction: column; min-width: 0; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-color); }
.dm-head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dm-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.dm-msg { max-width: 72%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; animation: msgIn .18s ease-out; }
.dm-msg.them { align-self: flex-start; background: var(--bg-input); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.dm-msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.dm-msg .t { display: block; font-size: 10px; opacity: .6; margin-top: 3px; text-align: right; }
.dm-day { align-self: center; font-size: 10.5px; color: var(--text-muted); margin: 6px 0; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } }
.dm-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border-color); }
.dm-compose textarea { flex: 1; resize: none; height: 40px; max-height: 120px; }
.dm-placeholder { margin: auto; color: var(--text-muted); text-align: center; padding: 20px; }
.nav-dm-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .dm-layout { grid-template-columns: 1fr; height: auto; }
  .dm-layout.has-thread .dm-list { display: none; }
  .dm-layout:not(.has-thread) .dm-thread { display: none; }
  .dm-msgs { height: 55vh; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Composer: anket kurucu, taslak ---- */
.draft-note { font-size: 11px; color: var(--success); margin-left: 6px; opacity: 0; transition: opacity .3s; }
.draft-note.show { opacity: 1; }
.poll-builder { padding: 10px; border-radius: var(--radius-sm); border: 1px dashed var(--border-color); }
.poll-builder .row { display: flex; gap: 6px; margin-bottom: 6px; }
.poll-builder .row input { flex: 1; }
.poll-builder .row button { width: 32px; }

/* ---- Komut paleti ---- */
.palette-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(5,5,10,.82); display: flex; justify-content: center; padding-top: 12vh; }
.palette { width: min(600px, 92vw); max-height: 64vh; display: flex; flex-direction: column; border-radius: 14px; background: var(--bg-card);
  border: 1px solid var(--border-hover); box-shadow: 0 12px 36px rgba(0,0,0,.6); overflow: hidden; animation: pickerIn .14s ease-out; }
.palette input { border: none !important; border-bottom: 1px solid var(--border-color) !important; border-radius: 0 !important; padding: 16px 18px !important; font-size: 15px !important; background: transparent !important; outline: none; }
.palette-results { overflow-y: auto; padding: 6px; }
.palette-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 8px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.palette-item.sel, .palette-item:hover { background: rgba(255, 255, 255, 0.08); }
.palette-item .ico { width: 22px; text-align: center; }
.palette-item img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.palette-item .hint { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.palette-foot { padding: 8px 14px; border-top: 1px solid var(--border-color); font-size: 11px; color: var(--text-muted); display: flex; gap: 14px; }
kbd { padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border-color); background: var(--bg-input); font-size: 10.5px; font-family: inherit; }
.palette-hint-btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Canlı akış: yeni gönderi balonu ---- */
.new-posts-pill {
  position: fixed; top: calc(var(--header-height) + 14px); left: 50%; transform: translateX(-50%) translateY(-20px); z-index: 900; opacity: 0; pointer-events: none;
  padding: 8px 16px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; border: 1px solid rgba(255,255,255,0.2); cursor: pointer;
  box-shadow: none; transition: all .3s cubic-bezier(.2,1.4,.4,1);
}
.new-posts-pill.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

/* ---- Toast & efekt katmanı ---- */
.st-toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.st-toast { padding: 10px 14px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border-hover); color: var(--text-main); font-size: 13px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45); animation: toastIn .3s cubic-bezier(.2,1.4,.4,1); max-width: 320px; }
.st-toast.levelup { background: linear-gradient(120deg, #7c3aed, #db2777); color: #fff; font-weight: 700; border: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
#fxCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 3500; }
.burst { animation: burst .45s ease-out; }
@keyframes burst { 40% { transform: scale(1.35); } }

/* Kartlar: hafif yükselme */
.post-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.post-card:hover { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 760px) { .palette-hint-btn { display: none; } }

/* sağ sütun sabit yükseklikte; yeni paneller sıkışıp kırpılmasın */
.members-only-panel { flex-shrink: 0; }

/* ==================== TUR 3: topluluklar, zengin içerik, chat, 2FA, canlı ==================== */

/* Mobil / kısa ekran: sütun içindeki paneller büzülüp menüyü kesmesin, sütun kaysın */
.sidebar-left-col > *, .sidebar-right-col > * { flex-shrink: 0; }
.sidebar-right-col { overflow-y: auto; scrollbar-width: thin; }

.st-ico { vertical-align: -2px; flex-shrink: 0; }
.badge-views .st-ico, .badge-pinned .st-ico { vertical-align: -1px; }
.nav-item-icon { display: inline-flex; align-items: center; }
.presence-text { font-size: 11px; color: var(--text-muted); }
.presence-text.on { color: #22c55e; }
.live-bump { animation: liveBump .5s ease-out; }
@keyframes liveBump { 30% { color: var(--primary-light); transform: scale(1.18); } }

/* ---- Topluluklar ---- */
.post-community-tag { color: var(--primary-light); font-weight: 600; cursor: pointer; }
.post-community-tag:hover { text-decoration: underline; }
.community-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.community-toolbar input { flex: 1; min-width: 180px; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.community-card {
  border-radius: var(--radius); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s; animation: cardIn .3s ease-out both; display: flex; flex-direction: column;
}
.community-card:hover { transform: translateY(-2px); border-color: var(--border-hover); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.cc-banner { height: 46px; }
.cc-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-head { display: flex; gap: 10px; align-items: flex-end; margin-top: -18px; }
.cc-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 12px; font-weight: 800; color: #fff;
  background: var(--primary); border: 3px solid var(--bg-card); text-transform: uppercase;
}
.cc-name { font-weight: 700; font-size: 14px; }
.cc-title { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cc-meta { font-size: 11.5px; color: var(--text-muted); }
.community-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.community-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg-card);
  border: 1px solid var(--border-color); color: var(--text-main); font-size: 12.5px; cursor: pointer;
}
.community-chip .cc-avatar { border-width: 0; border-radius: 50%; }
.community-chip:hover { border-color: var(--primary); }
.community-header { margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); }
.ch-banner { height: 84px; }
.ch-body { padding: 0 16px 14px; }
.ch-row { display: flex; gap: 12px; align-items: flex-end; margin-top: -26px; flex-wrap: wrap; }
.ch-title { font-size: 18px; margin: 0; }
.ch-name { font-size: 12px; color: var(--text-muted); }
.ch-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-desc { font-size: 13px; color: var(--text-main); margin: 12px 0 0; line-height: 1.6; white-space: pre-wrap; }
.ch-rules { margin-top: 10px; font-size: 12.5px; }
.ch-rules summary { cursor: pointer; color: var(--text-muted); }
.ch-rules div { white-space: pre-wrap; padding: 8px 0 0; line-height: 1.6; }
.ch-mods { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.target-switch { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--bg-input); border: 1px solid var(--border-color); margin-bottom: 8px; }
.target-switch button { padding: 5px 14px; border: none; border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.target-switch button.active { background: var(--primary); color: #fff; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 10px; background: var(--bg-card-hover); border: 1px solid var(--border-color); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text-muted); font-weight: 700; }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; flex: 1; }

/* ---- Zengin içerik ---- */
.rich-body { line-height: 1.65; overflow-wrap: anywhere; }
.rich-body > *:first-child { margin-top: 0; }
.rich-body p { margin: 0 0 .7em; }
.rich-body h1, .rich-body h2, .rich-body h3, .rich-body h4 { margin: .9em 0 .45em; line-height: 1.3; color: var(--text-main); }
.rich-body h1 { font-size: 1.5em; }
.rich-body h2 { font-size: 1.3em; }
.rich-body h3 { font-size: 1.15em; }
.rich-body img, .rich-body video { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.rich-body iframe { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
.rich-body iframe[src*="spotify"], .rich-body iframe[src*="soundcloud"] { aspect-ratio: auto; height: 160px; }
.rich-body table { border-collapse: collapse; width: 100%; margin: .6em 0; font-size: .95em; display: block; overflow-x: auto; }
.rich-body th, .rich-body td { border: 1px solid var(--border-color); padding: 6px 10px; text-align: left; }
.rich-body th { background: var(--bg-input); }
.rich-body blockquote { margin: .6em 0; padding: 4px 12px; border-left: 3px solid var(--primary); color: var(--text-muted); }
.rich-body pre { background: var(--bg-input); padding: 10px 12px; border-radius: var(--radius-sm); overflow-x: auto; }
.rich-body code { background: var(--bg-input); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.rich-body pre code { background: none; padding: 0; }
.rich-body a { color: var(--primary-light); }
.rich-body ul, .rich-body ol { padding-left: 1.4em; margin: 0 0 .7em; }
.rich-body hr { border: none; border-top: 1px solid var(--border-color); margin: 1em 0; }
.st-embed-frame { width: 100%; min-height: 40px; height: 240px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: rgba(0,0,0,.15); display: block; margin: .6em 0; }
.st-html-embed {
  display: block; padding: 14px; margin: 8px 0; border-radius: 8px; border: 1px dashed var(--primary); background: rgba(255, 255, 255, 0.04);
  color: var(--primary-light); font-family: monospace; font-size: 12.5px; text-align: center; user-select: none;
}
.code-input { font-family: ui-monospace, Consolas, monospace !important; font-size: 12.5px !important; width: 100%; tab-size: 2; }

/* ---- Jodit editörü forum temasında ---- */
.jodit_theme_dark, .jodit-popup.jodit_theme_dark, .jodit-dialog.jodit_theme_dark {
  --jd-color-background-default: var(--bg-input);
  --jd-color-panel: var(--bg-card);
  --jd-color-border: var(--border-color);
  --jd-color-text: var(--text-main);
  --jd-color-text-icons: var(--text-muted);
  --jd-color-icon: var(--text-muted);
  --jd-color-label: var(--text-muted);
  --jd-color-background-button-hover: var(--bg-card-hover);
  --jd-color-button-background-hover: var(--bg-card-hover);
  --jd-color-placeholder: var(--text-faint, #8e8a98);
  --jd-color-dark: var(--bg-card);
}
.jodit-container.jodit_theme_dark:not(.jodit_inline) { border-radius: var(--radius-sm); border-color: var(--border-color); background: var(--bg-input); }
.jodit_theme_dark .jodit-toolbar__box:not(:empty) { background: var(--bg-card); border-color: var(--border-color); }
.jodit_theme_dark .jodit-wysiwyg { color: var(--text-main); font-size: 14px; line-height: 1.65; padding: 12px 14px !important; }
.jodit_theme_dark .jodit-wysiwyg a { color: var(--primary-light); }
.jodit_theme_dark .jodit-wysiwyg img { max-width: 100%; }
.jodit_theme_dark .jodit-status-bar { background: var(--bg-card); color: var(--text-muted); }
.jodit-dialog__panel { background: var(--bg-card) !important; color: var(--text-main) !important; }
.jodit-toolbar-button__text { font-size: 12px; font-weight: 600; }

/* ---- Chat ---- */
.chat-list-head { padding: 10px; border-bottom: 1px solid var(--border-color); }
.dm-list-item.invite { cursor: default; gap: 6px; background: rgba(255, 255, 255, 0.05); }
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg.me { justify-content: flex-end; }
.chat-msg img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.chat-msg .dm-msg { max-width: 78%; }
.chat-who { display: block; font-size: 11px; font-weight: 700; color: var(--primary-light); margin-bottom: 2px; }
.chat-unlock { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; max-width: 320px; }
.chat-unlock .big { color: var(--primary-light); }
.chat-unlock p { font-size: 13px; color: var(--text-main); line-height: 1.5; margin: 0; }
.chat-unlock input { width: 100%; }

/* ---- 2FA ---- */
.twofa-state { font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.twofa-state.on { color: #22c55e; }
.twofa-steps { font-size: 13px; padding-left: 1.2em; line-height: 1.7; color: var(--text-main); }
.twofa-qr { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: 10px; width: fit-content; margin: 10px auto; }
.twofa-secret { text-align: center; font-family: monospace; font-size: 13px; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 12px; user-select: all; word-break: break-all; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.backup-codes code { text-align: center; padding: 6px; border-radius: 6px; background: var(--bg-input); border: 1px solid var(--border-color); font-size: 14px; letter-spacing: .1em; user-select: all; }

@media (max-width: 760px) {
  .ch-row { margin-top: -20px; }
  .community-grid { grid-template-columns: 1fr; }
}

/* ==================== TUR 4: takımlar, onay, misafir gizliliği, Konsey ==================== */
.team-chip {
  display: inline-flex; align-items: center; margin-left: 5px; padding: 0 5px; height: 17px; border-radius: 4px; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; color: #fff; background: var(--team-color, var(--primary)); vertical-align: 1px; cursor: pointer; text-transform: uppercase;
}
.team-chip:hover { filter: brightness(1.15); }
.team-name-link { cursor: pointer; color: var(--text-main); font-weight: 600; }
.team-name-link:hover { text-decoration: underline; }
.profile-team-row { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

.post-status-badges { display: inline-flex; gap: 5px; align-items: center; margin-left: 4px; vertical-align: 1px; }
.post-status-badges:empty { display: none; }
.approved-badge {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 3px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  color: #4ade80; background: rgba(22,163,74,.12); border: 1px solid rgba(22,163,74,.35);
}
.members-only-badge {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  color: var(--text-muted); background: var(--bg-input); border: 1px solid var(--border-color);
}
.react-btn.approve-btn.approved { color: #22c55e !important; }
.check-row { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-main); cursor: pointer; }
.check-row input { width: auto; margin: 0; }

.page-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.page-tabs button { padding: 8px 14px; border: none; background: none; color: var(--text-muted); font-weight: 600; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.page-tabs button.active { color: var(--text-main); border-bottom-color: var(--primary); }
.team-entity-card {
  padding: 14px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; transition: transform .2s, border-color .2s; animation: cardIn .3s ease-out both;
}
.team-entity-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.te-head { display: flex; gap: 10px; align-items: center; }
.te-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.te-meta { font-size: 11.5px; color: var(--text-muted); }
.team-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 10px; font-weight: 900; color: #fff;
  background: var(--primary); letter-spacing: .03em; text-transform: uppercase;
}
.team-role-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-muted); white-space: nowrap; }
.team-role-pill.owner { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.team-role-pill.mod { color: var(--primary-light); border-color: var(--primary); }
.team-detail-head {
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding: 16px; border-radius: var(--radius); background: var(--bg-card);
  border: 1px solid var(--border-color); border-top: 3px solid var(--team-color, var(--primary));
}
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 6px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border-color); font-size: 13px; }
.mini-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 4px; }
.invite-form { display: flex; gap: 8px; }
.invite-form input { flex: 1; }
.member-list { display: flex; flex-direction: column; gap: 4px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border-color); flex-wrap: wrap; }
.member-row img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; cursor: pointer; }
.member-name { flex: 1; min-width: 120px; }
.member-actions { display: flex; gap: 6px; }
.notif-team-actions { display: flex; gap: 8px; margin: 8px 0 4px; }

/* Konsey */
.council-compose { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 14px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); }
.council-thread-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 6px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border-color); cursor: pointer; }
.council-thread-row:hover { border-color: var(--border-hover); }
.ct-title { font-weight: 700; font-size: 14px; }
.ct-meta { font-size: 11.5px; color: var(--text-muted); }
.ct-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.council-op { padding: 14px 16px; margin-bottom: 12px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); }
.council-reply { display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border-color); }
.council-reply img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cr-body { min-width: 0; flex: 1; }
.cr-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
.cr-text { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin-top: 3px; }

/* ==================== TUR 5: profil sayfası, temalı girdiler ==================== */
/* Sınıfsız/özelleştirilmemiş tüm girdiler temaya uysun (sıfır özgüllük: tanımlı kurallar her zaman kazanır) */
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button], [type=reset], [type=hidden], [type=image]), textarea, select):where(:not(.jodit *, .jodit-popup *, .jodit-dialog *)) {
  background-color: var(--bg-input); color: var(--text-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  padding: 8px 12px; outline: none; max-width: 100%; transition: border-color var(--transition), box-shadow var(--transition);
}
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button], [type=reset], [type=hidden], [type=image]), textarea, select):where(:not(.jodit *, .jodit-popup *, .jodit-dialog *)):focus {
  border-color: var(--primary); outline: 2px solid var(--primary); box-shadow: none;
}
:where(input, textarea)::placeholder { color: var(--text-muted); opacity: .8; }
:where(textarea) { resize: vertical; line-height: 1.5; }
:where(select) option { background: var(--bg-card); color: var(--text-main); }
:where(input[type=checkbox], input[type=radio]) { accent-color: var(--primary); }
.council-compose input, .council-compose textarea, #teamSearch, #communitySearch, .chat-unlock input { width: 100%; }
.council-compose textarea { min-height: 84px; }

.team-avatar { overflow: hidden; white-space: nowrap; line-height: 1; letter-spacing: 0; padding: 0 2px; }

.ap-banner, .profile-hero, .tc-banner, #cuPreviewBanner { background-size: cover; background-position: center; }
.author-profile { margin-bottom: 16px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-color); overflow: hidden; animation: cardIn .3s ease-out both; }
.ap-banner { height: 170px; }
.ap-body { position: relative; padding: 0 20px 18px; }
.ap-skel { height: 140px; }
.ap-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: -52px; }
.level-ring.ap-ring { width: 108px; height: 108px; }
.ap-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-bottom: 4px; }
.ap-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.ap-name { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 10px 0 6px; font-size: 22px; font-weight: 800; word-break: break-word; }
.ap-bio { margin-top: 10px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.ap-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.ap-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ap-meta b { color: var(--text-main); }
.ap-teams { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12.5px; }
.ap-team { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--bg-input); border: 1px solid var(--border-color); cursor: pointer; font-weight: 600; }
.ap-team:hover { border-color: var(--border-hover); }
.ap-team .team-avatar { border-radius: 50%; }
.ap-team small { color: var(--text-muted); font-weight: 500; }
.ap-stats { margin: 14px 0 10px; }
.ap-level { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.ap-ach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ap-ach-chip { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fbbf24; background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.35); cursor: help; }
.feed-header.author-mode { justify-content: flex-end; }
.feed-header.author-mode .feed-title-info { display: none; }
#cuPreviewBanner { height: 60px; border-radius: 6px; margin-bottom: 10px; }
.cover-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.cover-row .btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) {
  .ap-banner { height: 120px; }
  .ap-body { padding: 0 14px 14px; }
  .ap-top { margin-top: -42px; }
  .level-ring.ap-ring { width: 86px; height: 86px; }
  .ap-name { font-size: 19px; }
}
.role-check { display: inline-flex; width: 15px; height: 15px; margin-left: 3px; vertical-align: -2px; flex-shrink: 0; }
.role-check svg { width: 100%; height: 100%; }
.ap-name .role-check, .ap-name .verified-badge, .user-profile-header-name .role-check { width: 18px; height: 18px; }
@media (max-width: 768px) {
  html:not([data-view-mode="desktop"]) .sidebar-left-col > *, html:not([data-view-mode="desktop"]) .sidebar-right-col > * { max-width: none; }
}
