/* =========================================
   PAYKDEV — Main Stylesheet v2
   Dark theme, developer-focused forum
   Animasyonlu, profesyonel tasarım
   ========================================= */

:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-tertiary:   #21262d;
  --bg-elevated:   #1c2128;
  --border:        #30363d;
  --border-subtle: #21262d;
  --text-primary:  #e6edf3;
  --text-muted:    #8b949e;
  --text-faint:    #6e7681;
  --accent:        #58a6ff;
  --accent-hover:  #79b8ff;
  --success:       #3fb950;
  --warning:       #f0883e;
  --danger:        #f85149;
  --purple:        #bc8cff;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --font-body:     'IBM Plex Sans', system-ui, sans-serif;
  --radius:        8px;
  --radius-sm:     4px;
  --radius-lg:     12px;
  --shadow:        0 4px 24px rgba(0,0,0,.5);
  --shadow-sm:     0 1px 8px rgba(0,0,0,.3);
  --transition:    all .2s cubic-bezier(.4,0,.2,1);

  /* Rank frame colors */
  --rank-yeni:    #8b949e;
  --rank-uye:     #58a6ff;
  --rank-aktif:   #3fb950;
  --rank-super:   #f0883e;
  --rank-elite:   #bc8cff;
  --rank-admin:   #ff7b72;
  --rank-kurucu:  #ffa657;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

/* ---- PAGE LOAD ANIMATION ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88,166,255,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(88,166,255,.0); }
}
@keyframes rankGlow {
  0%, 100% { opacity: .7; }
  50%       { opacity: 1; }
}

/* ---- RANK FRAME ANIMATIONS ---- */
@keyframes rotateBorder {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes adminPulse {
  0%, 100% { box-shadow: 0 0 6px 2px rgba(255,123,114,.4); }
  50%       { box-shadow: 0 0 14px 4px rgba(255,123,114,.7); }
}
@keyframes kurucuShimmer {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(15deg) brightness(1.2); }
  100% { filter: hue-rotate(0deg) brightness(1); }
}

/* ---- RANK AVATAR FRAMES ---- */
/* Base wrapper – inline-flex so it shrinks to the image size */
.rank-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.rank-frame img {
  border-radius: 50%;
  position: relative;
  z-index: 1;
  display: block;
}

/* Shared conic/gradient spinning ring helper */
.rank-frame::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}
.rank-frame::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--bg-primary);
  z-index: 0;
}

/* Yeni Üye – subtle gray ring */
.rank-frame.frame-yeni::before {
  inset: -3px;
  background: var(--rank-yeni);
  opacity: .5;
}
.rank-frame.frame-yeni::after { inset: -1px; }
.rank-frame.frame-yeni img { z-index: 2; }

/* Üye – solid blue ring */
.rank-frame.frame-uye::before {
  inset: -3px;
  background: var(--rank-uye);
  opacity: .85;
}
.rank-frame.frame-uye::after { inset: -1px; }
.rank-frame.frame-uye img { z-index: 2; }

/* Aktif Üye – pulsing green ring */
.rank-frame.frame-aktif::before {
  inset: -3px;
  background: var(--rank-aktif);
  animation: rankGlow 2.5s ease-in-out infinite;
}
.rank-frame.frame-aktif::after { inset: -1px; }
.rank-frame.frame-aktif img { z-index: 2; }

/* Süper Üye – rotating orange/gold conic */
.rank-frame.frame-super::before {
  inset: -4px;
  background: conic-gradient(#f0883e, #ffa657, #f0883e 120deg, #fff3 180deg, #f0883e);
  animation: rotateBorder 3s linear infinite;
}
.rank-frame.frame-super::after { inset: -1px; }
.rank-frame.frame-super img { z-index: 2; }

/* Elite – rotating purple/blue conic */
.rank-frame.frame-elite::before {
  inset: -4px;
  background: conic-gradient(#bc8cff, #58a6ff, #bc8cff 120deg, #fff4 180deg, #bc8cff);
  animation: rotateBorder 2.5s linear infinite;
}
.rank-frame.frame-elite::after { inset: -1px; }
.rank-frame.frame-elite img { z-index: 2; }

/* Admin – rotating red ring + glow */
.rank-frame.frame-admin::before {
  inset: -4px;
  background: conic-gradient(#ff7b72, #f85149, #ff7b72 120deg, #fff3 180deg, #ff7b72);
  animation: rotateBorder 2s linear infinite;
}
.rank-frame.frame-admin::after { inset: -1px; }
.rank-frame.frame-admin img {
  z-index: 2;
  animation: adminPulse 2.5s ease-in-out infinite;
}

/* Kurucu – rotating gold shimmer (multi-stop) */
.rank-frame.frame-kurucu::before {
  inset: -5px;
  background: conic-gradient(#ffa657 0deg, #ffe08a 60deg, #ffa657 120deg, #d4860a 180deg, #ffd166 240deg, #ffa657 300deg, #ffe08a 360deg);
  animation: rotateBorder 2s linear infinite;
}
.rank-frame.frame-kurucu::after { inset: -1px; }
.rank-frame.frame-kurucu img {
  z-index: 2;
  animation: kurucuShimmer 3s ease-in-out infinite;
}

/* ---- NAVBAR ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 58px;
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex; align-items: center; gap: 1rem;
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700; font-size: 1.05rem;
  color: var(--text-primary) !important;
  white-space: nowrap;
  letter-spacing: .04em;
}
.logo-bracket { color: var(--accent); }
.nav-cats {
  display: flex; gap: .25rem;
  flex: 1; overflow: hidden;
}
.nav-cat-link {
  padding: .3rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 500;
  white-space: nowrap;
  transition: background .15s, transform .15s;
  opacity: .8;
}
.nav-cat-link:hover { background: var(--bg-tertiary); opacity: 1; transform: translateY(-1px); }
.nav-search {
  display: flex; align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .2s;
}
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,.12); }
.search-input {
  background: transparent; border: none; outline: none;
  color: var(--text-primary);
  padding: .35rem .75rem;
  font-family: var(--font-body);
  font-size: .85rem; width: 180px;
  transition: width .2s;
}
.search-input:focus { width: 220px; }
.search-input::placeholder { color: var(--text-faint); }
.search-btn {
  background: transparent; border: none;
  color: var(--text-muted); padding: .35rem .6rem;
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.search-btn:hover { color: var(--text-primary); }

/* User menu */
.nav-user { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: .3rem .6rem; cursor: pointer;
  font-family: var(--font-body); font-size: .85rem;
  transition: border-color .15s, background .15s;
}
.user-menu-btn:hover { background: var(--bg-secondary); border-color: var(--accent); }
.nav-avatar {
  width: 24px; height: 24px;
  border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--border);
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 185px;
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
  animation: fadeUp .18s ease both;
}
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem;
  color: var(--text-primary); font-size: .875rem;
  transition: background .1s;
}
.user-dropdown a:hover { background: var(--bg-tertiary); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: .25rem 0; }
.admin-link { color: var(--warning) !important; }
.logout-link { color: var(--danger) !important; }

/* ---- MAIN ---- */
.main-content { flex: 1; padding: 2rem 0; animation: fadeIn .25s ease both; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ---- FLASH ---- */
.flash-container { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  font-size: .9rem;
  animation: fadeUp .2s ease both;
}
.flash-success { background: rgba(63,185,80,.1); border-color: var(--success); color: var(--success); }
.flash-danger  { background: rgba(248,81,73,.1);  border-color: var(--danger);  color: var(--danger); }
.flash-warning { background: rgba(240,136,62,.1); border-color: var(--warning); color: var(--warning); }
.flash-info    { background: rgba(88,166,255,.1); border-color: var(--accent);  color: var(--accent); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 500;
  font-size: .875rem; cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s; text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent); color: #0d1117; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: #0d1117; box-shadow: 0 0 14px rgba(88,166,255,.3); }
.btn-ghost    { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-tertiary); border-color: var(--accent); color: var(--accent); }
.btn-danger   { background: rgba(248,81,73,.15); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-success  { background: rgba(63,185,80,.15); color: var(--success); border-color: var(--success); }
.btn-success:hover { background: var(--success); color: #0d1117; }
.btn-full { width: 100%; justify-content: center; }
.btn-lg  { padding: .65rem 1.5rem; font-size: 1rem; }
.btn-sm  { padding: .35rem .75rem; font-size: .82rem; }
.btn-xs  { padding: .2rem .5rem; font-size: .78rem; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 1rem; padding: .2rem .4rem; opacity: .6; transition: opacity .15s, transform .15s; }
.btn-icon:hover { opacity: 1; transform: scale(1.1); }

/* ---- PAGE HEADER ---- */
.page-header { margin-bottom: 1.75rem; animation: fadeUp .28s ease both; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title {
  font-family: var(--font-mono);
  font-size: 1.6rem; font-weight: 700;
  color: var(--text-primary);
}
.page-sub { color: var(--text-muted); margin-top: .35rem; }
.breadcrumb { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; display: flex; align-items: center; gap: .1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { margin: 0 .4rem; color: var(--text-faint); }

/* ---- HERO (index page) ---- */
.hero-section {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  padding: 2.5rem 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  animation: fadeUp .3s ease both;
}
.hero-title {
  font-family: var(--font-mono);
  font-size: 2.4rem; font-weight: 700; letter-spacing: .06em;
  line-height: 1;
  background: linear-gradient(135deg, #e6edf3, #58a6ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-bracket { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.hero-sub { font-size: 1rem; color: var(--text-muted); margin-top: .75rem; max-width: 440px; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 1.5rem; }
.hero-stat { text-align: center; }
.hs-num {
  display: block;
  font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--accent);
  background: linear-gradient(135deg, #58a6ff, #bc8cff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hs-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---- INDEX LAYOUT ---- */
.index-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
.section-heading {
  font-family: var(--font-mono); font-size: .9rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em;
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--border-subtle);
}
.sh-icon { font-size: 1rem; }

/* ---- CATEGORY GRID ---- */
.category-grid { display: flex; flex-direction: column; gap: .65rem; }
.category-card {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-decoration: none; color: var(--text-primary);
  border-left: 3px solid var(--cat-color, var(--accent));
  transition: border-color .18s, transform .18s, box-shadow .18s, background .18s;
  animation: fadeUp .3s ease both;
}
.category-card:hover {
  border-color: var(--cat-color, var(--accent));
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.cat-header { display: flex; align-items: flex-start; gap: .85rem; }
.cat-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; transition: transform .2s; }
.category-card:hover .cat-icon { transform: scale(1.1); }
.cat-name { font-family: var(--font-mono); font-size: .95rem; font-weight: 600; color: var(--cat-color, var(--accent)); }
.cat-desc { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; line-height: 1.5; }
.cat-footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cat-stat { font-size: .78rem; color: var(--text-faint); }
.cat-last-thread { font-size: .78rem; color: var(--text-muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* ---- RECENT LIST ---- */
.recent-list { display: flex; flex-direction: column; gap: .4rem; }
.recent-item {
  display: flex; align-items: center; gap: .85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  transition: border-color .15s, background .15s;
  animation: fadeUp .3s ease both;
  animation-delay: var(--item-delay, 0s);
  animation-fill-mode: both;
}
.recent-item:hover { border-color: rgba(88,166,255,.3); background: var(--bg-elevated); }
.recent-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.recent-body { flex: 1; min-width: 0; }
.recent-title {
  font-size: .88rem; font-weight: 500; color: var(--text-primary);
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.recent-title:hover { color: var(--accent); }
.recent-meta { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--text-muted); margin-top: .18rem; flex-wrap: wrap; }
.recent-cat-link { font-weight: 500; }
.recent-sep { color: var(--text-faint); }
.recent-date { color: var(--text-faint); }
.recent-counts { display: flex; flex-direction: column; gap: .1rem; font-size: .73rem; color: var(--text-faint); text-align: right; flex-shrink: 0; }

/* ---- THREAD LIST (category page) ---- */
.thread-list { display: flex; flex-direction: column; gap: .5rem; }
.thread-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  transition: border-color .15s, background .15s;
  animation: fadeUp .25s ease both;
}
.thread-item:hover { border-color: rgba(88,166,255,.3); background: var(--bg-elevated); }
.thread-pinned { border-left: 3px solid var(--warning); }
.thread-body { flex: 1; min-width: 0; }
.thread-title {
  font-weight: 500; font-size: .95rem; color: var(--text-primary);
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.thread-title:hover { color: var(--accent); }
.thread-info { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-muted); margin-top: .3rem; flex-wrap: wrap; }
.thread-author { color: var(--text-muted); transition: color .15s; }
.thread-author:hover { color: var(--accent); }
.thread-date { color: var(--text-faint); }
.thread-stats { display: flex; gap: .75rem; font-size: .82rem; color: var(--text-faint); white-space: nowrap; flex-shrink: 0; }
.stat-item { display: flex; align-items: center; gap: .2rem; }
.thread-meta-left { display: flex; gap: .4rem; flex-shrink: 0; }
.thread-admin-actions { display: flex; gap: .25rem; flex-shrink: 0; }

.mini-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.rank-badge { font-size: .85rem; animation: rankGlow 3s ease-in-out infinite; }
.rank-badge-sm { font-size: .78rem; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .5rem;
  border-radius: var(--radius-sm);
  font-size: .75rem; font-weight: 600;
}
.badge-pin { background: rgba(240,136,62,.15); color: var(--warning); }
.badge-lock { background: rgba(248,81,73,.12); color: var(--danger); }
.badge-active { background: rgba(63,185,80,.12); color: var(--success); padding: .1rem .4rem; border-radius: 3px; font-size:.75rem; }
.badge-banned { background: rgba(248,81,73,.12); color: var(--danger); padding: .1rem .4rem; border-radius: 3px; font-size:.75rem; }

/* ---- THREAD VIEW ---- */
.thread-header { margin-bottom: 1.5rem; animation: fadeUp .28s ease both; }
.thread-title-lg { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; line-height: 1.3; margin: .5rem 0; }
.thread-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.thread-badges { display: flex; gap: .4rem; margin-bottom: .4rem; }

.post-card {
  display: flex; gap: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color .15s;
  animation: fadeUp .25s ease both;
}
.post-card:hover { border-color: rgba(88,166,255,.2); }
.post-op { border-color: rgba(88,166,255,.35); }
.post-sidebar {
  width: 140px; min-width: 140px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 1.25rem .75rem;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .4rem;
}
/* The rank frame inside post sidebar */
.post-sidebar .rank-frame { margin-bottom: .2rem; }
.post-sidebar .rank-frame img { width: 56px; height: 56px; }

.post-username { font-weight: 600; font-size: .875rem; color: var(--text-primary); transition: color .15s; }
.post-username:hover { color: var(--accent); }
.post-rank { font-size: .75rem; font-weight: 600; animation: rankGlow 3s ease-in-out infinite; }
.post-count { font-size: .72rem; color: var(--text-faint); }
.post-content-wrap { flex: 1; padding: 1rem 1.25rem; min-width: 0; }
.post-date { font-size: .78rem; color: var(--text-faint); margin-bottom: .75rem; font-family: var(--font-mono); }
.post-edited { color: var(--text-faint); font-size: .75rem; }
.post-actions { display: flex; gap: .5rem; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border-subtle); }

.replies-header { margin: 1.5rem 0 .75rem; display: flex; align-items: center; gap: .75rem; }
.reply-count {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  padding: .1rem .5rem; border-radius: 99px;
  font-size: .78rem; color: var(--text-muted); font-family: var(--font-mono);
}

/* ---- MARKDOWN BODY ---- */
.markdown-body { font-size: .9rem; line-height: 1.7; color: var(--text-primary); }
.markdown-body h1,.markdown-body h2,.markdown-body h3 { font-family: var(--font-mono); margin: 1.25rem 0 .5rem; color: var(--text-primary); }
.markdown-body h1 { font-size: 1.4rem; }
.markdown-body h2 { font-size: 1.2rem; }
.markdown-body h3 { font-size: 1.05rem; }
.markdown-body p { margin-bottom: .9rem; }
.markdown-body code {
  font-family: var(--font-mono); font-size: .85em;
  background: var(--bg-tertiary); color: var(--purple);
  padding: .15em .4em; border-radius: 3px;
}
.markdown-body pre {
  background: #080c10 !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem; overflow-x: auto; margin: 1rem 0;
}
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  padding: .5rem 1rem; margin: 1rem 0;
  background: rgba(88,166,255,.05);
  color: var(--text-muted);
}
.markdown-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.markdown-body ul,.markdown-body ol { padding-left: 1.5rem; margin-bottom: .9rem; }
.markdown-body li { margin-bottom: .25rem; }
.markdown-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .875rem; }
.markdown-body th,.markdown-body td { border: 1px solid var(--border); padding: .5rem .75rem; }
.markdown-body th { background: var(--bg-tertiary); font-weight: 600; font-family: var(--font-mono); font-size: .85rem; }
.markdown-body tr:nth-child(even) td { background: rgba(255,255,255,.018); }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ---- REPLY FORM ---- */
.reply-form-wrap {
  margin-top: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  animation: fadeUp .3s ease both;
}
.reply-form-title { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.locked-notice,.login-notice {
  margin-top: 2rem; padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  text-align: center; color: var(--text-muted);
}

/* ---- FORMS ---- */
.form-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 760px;
  animation: fadeUp .28s ease both;
}
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; color: var(--text-muted); margin-bottom: .4rem; }
.form-input {
  width: 100%; padding: .6rem .85rem;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-body); font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:hover { border-color: rgba(88,166,255,.3); }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,.12); }
.form-textarea {
  width: 100%; padding: .6rem .85rem;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-mono); font-size: .875rem; resize: vertical;
  transition: border-color .15s, box-shadow .15s; outline: none; line-height: 1.5;
}
.form-textarea:hover { border-color: rgba(88,166,255,.3); }
.form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,.12); }
.form-error { color: var(--danger); font-size: .8rem; margin-top: .3rem; }
.form-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-check { display: flex; align-items: center; gap: .5rem; font-size: .875rem; margin-bottom: .75rem; cursor: pointer; }
.markdown-hint { font-size: .78rem; color: var(--text-faint); font-family: var(--font-mono); }

/* ---- AUTH ---- */
.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(88,166,255,.05) 0%, transparent 60%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  animation: fadeUp .3s ease both;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo {
  font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700;
  color: var(--accent); display: block; margin-bottom: .75rem;
}
.auth-header h1 { font-size: 1.5rem; font-family: var(--font-mono); }
.auth-header p { color: var(--text-muted); font-size: .875rem; margin-top: .25rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); }

/* ---- PROFILE ---- */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; align-items: start; }
.profile-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem; text-align: center;
  position: sticky; top: 72px;
  animation: fadeUp .28s ease both;
}
.profile-avatar-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
/* Profile big frame */
.profile-card .rank-frame img { width: 96px; height: 96px; }

.profile-name { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; }
.profile-rank {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .2rem .75rem;
  border-radius: 99px; border: 1px solid;
  font-size: .8rem; font-weight: 600; margin-top: .5rem;
  animation: rankGlow 3s ease-in-out infinite;
}
.profile-bio { font-size: .875rem; color: var(--text-muted); margin-top: .75rem; text-align: left; line-height: 1.5; }
.profile-meta { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; font-size: .825rem; color: var(--text-muted); text-align: left; }
.profile-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.25rem 0; }
.profile-stat {
  background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: .75rem;
  text-align: center; border: 1px solid var(--border-subtle);
  transition: border-color .15s, transform .15s;
}
.profile-stat:hover { border-color: rgba(88,166,255,.25); transform: translateY(-2px); }
.stat-num { display: block; font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .75rem; color: var(--text-muted); }
.profile-section { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; animation: fadeUp .3s ease both; }
.section-title {
  font-family: var(--font-mono); font-size: .95rem; font-weight: 600;
  margin-bottom: 1rem; color: var(--text-primary);
  display: flex; align-items: center; gap: .5rem;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }
.thread-list-compact { display: flex; flex-direction: column; gap: .6rem; }
.compact-thread { padding: .6rem 0; border-bottom: 1px solid var(--border-subtle); }
.compact-thread:last-child { border-bottom: none; }
.thread-title-sm { font-size: .875rem; font-weight: 500; color: var(--text-primary); transition: color .15s; }
.thread-title-sm:hover { color: var(--accent); }
.compact-meta { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.compact-post-preview { font-family: var(--font-mono); color: var(--text-faint) !important; font-size: .75rem !important; }

/* ---- SETTINGS ---- */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
.settings-nav {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.settings-nav-link { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; font-size: .875rem; color: var(--text-muted); border-left: 3px solid transparent; transition: all .15s; }
.settings-nav-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.settings-nav-link.active { border-left-color: var(--accent); color: var(--accent); background: rgba(88,166,255,.06); }

/* ---- ADMIN ---- */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
.admin-nav {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: sticky; top: 70px;
}
.admin-nav-title { padding: .75rem 1rem; font-family: var(--font-mono); font-size: .85rem; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.admin-nav-link { display: flex; align-items: center; gap: .5rem; padding: .65rem 1rem; font-size: .875rem; color: var(--text-muted); border-left: 3px solid transparent; transition: all .15s; }
.admin-nav-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.admin-nav-link.active { border-left-color: var(--accent); color: var(--accent); background: rgba(88,166,255,.06); }
.admin-main { min-width: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; text-align: center;
  transition: border-color .15s, transform .15s;
  animation: fadeUp .28s ease both;
}
.stat-card:hover { border-color: rgba(88,166,255,.25); transform: translateY(-2px); }
.stat-warn { border-color: rgba(240,136,62,.3); }
.stat-num-lg { display: block; font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-warn .stat-num-lg { color: var(--warning); }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table-full { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table th {
  background: var(--bg-elevated); color: var(--text-muted);
  font-weight: 600; text-align: left; padding: .6rem .9rem;
  border-bottom: 1px solid var(--border); font-size: .8rem;
  font-family: var(--font-mono);
}
.admin-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background .12s; }
.admin-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.admin-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.row-banned { opacity: .65; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: .4rem; margin-top: 1.5rem; justify-content: center; flex-wrap: wrap; }
.page-btn {
  padding: .35rem .7rem; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .85rem; transition: all .15s;
  font-family: var(--font-mono);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.page-btn-active { background: var(--accent); border-color: var(--accent); color: #0d1117 !important; font-weight: 600; }
.page-ellipsis { padding: .35rem .4rem; color: var(--text-faint); }

/* ---- ERROR PAGE ---- */
.error-page { text-align: center; padding: 5rem 0; animation: fadeUp .35s ease both; }
.error-code { font-family: var(--font-mono); font-size: 6rem; font-weight: 700; color: var(--accent); opacity: .3; line-height: 1; }
.error-msg { font-size: 1.5rem; color: var(--text-muted); margin: .75rem 0 2rem; }

/* ---- SEARCH ---- */
.search-form-big { display: flex; gap: .75rem; margin-bottom: 1.5rem; }
.search-q { color: var(--accent); font-family: var(--font-mono); }
.search-form-big .form-input { max-width: 500px; }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem; margin-top: auto;
  background: var(--bg-secondary);
}
.footer-top {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem; margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.footer-brand { }
.footer-logo {
  font-family: var(--font-mono); color: var(--accent);
  font-size: 1.1rem; font-weight: 700;
  display: block; margin-bottom: .5rem;
  letter-spacing: .04em;
}
.footer-brand p {
  font-size: .82rem; color: var(--text-muted); line-height: 1.6; max-width: 340px;
}

/* Legal section */
.footer-legal { }
.footer-legal-title {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); margin-bottom: .85rem;
}
.footer-legal-text {
  font-size: .78rem; color: var(--text-faint); line-height: 1.75;
}
.footer-legal-text p { margin-bottom: .65rem; }
.footer-legal-text p:last-child { margin-bottom: 0; }
.footer-legal-text strong { color: var(--text-muted); font-weight: 500; }
.footer-legal-text em { font-style: normal; color: var(--text-muted); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.footer-copy { font-size: .78rem; color: var(--text-faint); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: .78rem; color: var(--text-faint); transition: color .15s; }
.footer-links a:hover { color: var(--accent); }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.empty-state a { color: var(--accent); }
.cat-link { font-size: .78rem; font-weight: 500; }
.sep { color: var(--text-faint); }


/* ---- RANK AVATAR FRAMES ----
   Kullanım: <div class="avatar-frame frame-RANK">
   Ranklar: frame-yeni | frame-uye | frame-aktif | frame-super | frame-elite | frame-admin | frame-kurucu
   ---- */

@keyframes frameSpin    { to { transform: rotate(360deg); } }
@keyframes frameSpinR   { to { transform: rotate(-360deg); } }
@keyframes framePulse   { 0%,100%{opacity:.75} 50%{opacity:1} }
@keyframes frameGlow    { 0%,100%{box-shadow:0 0 8px rgba(248,81,73,.3)} 50%{box-shadow:0 0 22px rgba(248,81,73,.65)} }
@keyframes frameGoldSpin { to { transform: rotate(360deg); } }

.avatar-frame {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-frame img {
  border-radius: 50%; display: block;
  position: relative; z-index: 2;
}
.avatar-frame::before {
  content: ''; position: absolute; border-radius: 50%; z-index: 0;
}
.avatar-frame::after {
  content: ''; position: absolute; border-radius: 50%;
  background: var(--bg-secondary); z-index: 1;
}

/* Yeni Üye — gri statik halka */
.frame-yeni.avatar-frame::before  { inset: -2px; background: #6e7681; }
.frame-yeni.avatar-frame::after   { inset: 0; }

/* Üye — mavi solid */
.frame-uye.avatar-frame::before   { inset: -2px; background: var(--accent); }
.frame-uye.avatar-frame::after    { inset: 0; }

/* Aktif Üye — yeşil yavaş pulse */
.frame-aktif.avatar-frame::before { inset: -2.5px; background: var(--success); animation: framePulse 2.5s ease-in-out infinite; }
.frame-aktif.avatar-frame::after  { inset: 0; }

/* Süper Üye — turuncu dönen conic */
.frame-super.avatar-frame::before {
  inset: -3px;
  background: conic-gradient(#f0883e, #ffa657, #ffe8a0, #ffa657, #f0883e);
  animation: frameSpin 3s linear infinite;
}
.frame-super.avatar-frame::after  { inset: 1px; }

/* Elite — mor+mavi dönen conic */
.frame-elite.avatar-frame::before {
  inset: -3px;
  background: conic-gradient(#bc8cff, #58a6ff, #ff79c6, #bc8cff, #58a6ff);
  animation: frameSpinR 2.5s linear infinite;
}
.frame-elite.avatar-frame::after  { inset: 1px; }

/* Admin — kırmızı dönen + glow */
.frame-admin.avatar-frame::before {
  inset: -3px;
  background: conic-gradient(#f85149, #ff7b72, #ffb3af, #ff7b72, #f85149);
  animation: frameSpin 2s linear infinite;
}
.frame-admin.avatar-frame::after  { inset: 1px; }
.frame-admin.avatar-frame img     { animation: frameGlow 2s ease-in-out infinite; border-radius: 50%; }

/* Kurucu — altın üçlü dönen */
.frame-kurucu.avatar-frame::before {
  inset: -4px;
  background: conic-gradient(#ffa657, #f5c518, #fff0a0, #f5c518, #ffa657, #c97d2e, #ffa657);
  animation: frameGoldSpin 1.8s linear infinite;
}
.frame-kurucu.avatar-frame::after  { inset: 1px; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1050px) {
  .index-layout { grid-template-columns: 1fr; }
  .recent-col { order: -1; }
}
@media (max-width: 900px) {
  .profile-layout, .settings-layout, .admin-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
  .post-sidebar { width: 100px; min-width: 100px; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 600px) {
  .nav-cats { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .hero-stats { display: none; }
}

/* ---- RECAPTCHA ---- */
.recaptcha-wrap {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}
.recaptcha-wrap .g-recaptcha {
  transform-origin: center;
}
/* Mobilde küçük ekrana sığdır */
@media (max-width: 380px) {
  .recaptcha-wrap .g-recaptcha {
    transform: scale(.85);
    transform-origin: left;
  }
}
