/* UyduX Premium Theme */
:root {
  --bg-base: #070a12;
  --bg-surface: #0d1220;
  --bg-card: #121a2e;
  --bg-elevated: #182038;
  --bg-hover: #1e2844;
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --text: #eef2f8;
  --text-muted: #8fa3bf;
  --text-dim: #5a6d85;
  --accent: #4f8cff;
  --accent-hover: #3b7aed;
  --accent-soft: rgba(79, 140, 255, 0.12);
  --violet: #9b6dff;
  --gold: #f5b942;
  --success: #22c997;
  --danger: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --header-h: 64px;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 140, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(155, 109, 255, 0.08), transparent),
    var(--bg-base);
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #7eb0ff; }

.wrap {
  width: min(1140px, 94%);
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7, 10, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 140, 255, 0.35);
}

.brand-mark-lg {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  margin: 0 auto 0.75rem;
}

.brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xs);
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-admin { color: var(--violet) !important; }

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.user-chip-link {
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.user-chip-link:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
}

/* ── Avatars ── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
  box-sizing: border-box;
}

img.avatar.is-photo {
  display: block;
  object-fit: cover;
}

.avatar-letter {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.72rem; }
.avatar-md { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.15rem; box-shadow: 0 4px 12px rgba(79, 140, 255, 0.25); }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; box-shadow: 0 8px 24px rgba(79, 140, 255, 0.3); }

.user-chip-avatar { width: 28px; height: 28px; }

.stats-avatar.avatar-letter { background: linear-gradient(135deg, var(--accent), #818cf8); }
.stats-avatar-reply.avatar-letter { background: linear-gradient(135deg, #10b981, #34d399); }

.post-avatar { margin-bottom: 0.55rem; }
.post-avatar-sm { margin-bottom: 0; }

.post-author-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.post-author-link:hover .post-author { color: var(--accent); }

.post-signature {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 100%;
  word-break: break-word;
}

/* ── Profile pages ── */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
}

.profile-hero {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
}

.profile-avatar-wrap { flex-shrink: 0; }

.profile-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.profile-hero-info .page-title { margin: 0; font-size: 1.35rem; }

.profile-meta,
.profile-location {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-about,
.profile-signature {
  border-top: 1px solid var(--border);
}

.profile-about h2,
.profile-signature h2 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-about p,
.profile-signature p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-form .panel { margin-bottom: 0; }

.profile-actions {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 1rem;
}

.avatar-upload-label {
  display: inline-flex;
  cursor: pointer;
}

.avatar-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.form-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field span small {
  font-weight: 400;
  color: var(--text-dim);
}

.field input,
.field textarea {
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
}

@media (max-width: 520px) {
  .profile-hero {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Main & Footer ── */
.site-main {
  padding: 1.5rem 0 3rem;
  min-height: calc(100vh - var(--header-h) - 80px);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  background: var(--bg-surface);
}

.footer-inner p {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-inner strong { color: var(--text-muted); font-weight: 600; }

/* ── Buttons ── */
.btn, button[type="submit"]:not(.tb):not(.btn-like) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s, box-shadow var(--transition);
}

.btn-primary, button[type="submit"].btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 140, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #5558e8);
  box-shadow: 0 6px 20px rgba(79, 140, 255, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-ghost {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.btn-block { width: 100%; }

form.inline { display: inline; }

/* ── Hero (Home) ── */
.hero-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.12) 0%, rgba(155, 109, 255, 0.08) 100%);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.hero-tag {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.hero-banner h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
}

.stat-cards {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

/* ── Forum stats (Son Konular / Son Cevaplar) ── */
.forum-stats {
  margin-bottom: 1.25rem;
}

.forum-stats-bar {
  margin-bottom: 0.5rem;
}

.forum-stats-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.forum-stats-summary strong {
  color: var(--text);
  font-weight: 600;
}

.forum-stats-summary .dot {
  color: var(--text-dim);
  user-select: none;
}

.forum-stats-panel {
  margin-bottom: 0;
}

.forum-stats-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.stats-tab {
  position: relative;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.stats-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.stats-tab.is-active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.stats-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.stats-table-wrap {
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.stats-table thead th {
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.stats-table tbody td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.stats-row:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.stats-row:last-child td {
  border-bottom: none;
}

.stats-table .col-avatar { width: 36px; padding-right: 0; }
.stats-table .col-num { width: 52px; text-align: center; color: var(--text-muted); }
.stats-table .col-time { width: 90px; white-space: nowrap; color: var(--text-muted); font-size: 0.78rem; }
.stats-table .col-user { width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.stats-table .col-forum { width: 130px; max-width: 130px; }
.stats-table .col-forum a {
  color: var(--text-dim);
  font-size: 0.78rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-table .col-forum a:hover { color: var(--accent); }

.stats-avatar {
  /* legacy hook — sizes via .avatar-sm */
}

.stats-avatar-reply {
  /* letter variant via .avatar-letter.stats-avatar-reply */
}

.stats-topic-link {
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
}

.stats-topic-link:hover { color: var(--accent); }

.stats-pane[hidden] { display: none; }

.stats-table .col-time a {
  color: var(--text-muted);
}

.stats-table .col-time a:hover { color: var(--accent); }

.badge-pin,
.badge-lock {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 3px;
  vertical-align: middle;
}

.badge-pin {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.badge-lock {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

@media (max-width: 768px) {
  .stats-table .col-forum,
  .stats-table .col-user { display: none; }
  .stats-table thead .col-forum,
  .stats-table thead .col-user { display: none; }
}

@media (max-width: 520px) {
  .stats-table .col-num:last-of-type,
  .stats-table thead .col-num:nth-child(5) { display: none; }
}

/* ── Panels & Grid ── */
.home-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.panel-body { padding: 0.75rem; }
.panel-body-flush { padding: 0; }

.panel-form { max-width: 720px; }

.forum-group { margin-bottom: 0.75rem; }
.forum-group:last-child { margin-bottom: 0; }

.forum-group-title {
  margin: 0 0 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.forum-group-title a {
  color: var(--text-muted);
  text-decoration: none;
}

.forum-group-title a:hover { color: var(--accent); }

.forum-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}

.forum-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  text-decoration: none;
}

.forum-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.forum-item-info {
  flex: 1;
  min-width: 0;
}

.forum-item-info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forum-item-info small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

.forum-item-arrow {
  color: var(--text-dim);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.forum-item:hover .forum-item-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.latest-item {
  display: block;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background var(--transition);
}

.latest-item:last-child { border-bottom: none; }

.latest-item:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

.latest-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.latest-item small {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb strong { color: var(--text-muted); font-weight: 500; }
.bc-sep { opacity: 0.4; }

/* ── Page toolbar ── */
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.page-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ── Data table (forum list) ── */
.data-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table-head,
.data-table-row {
  display: grid;
  grid-template-columns: 1fr 110px 70px 80px 90px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 1.15rem;
}

.data-table-head {
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.data-table-row {
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background var(--transition);
}

.data-table-row:last-child { border-bottom: none; }

.data-table-row:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

.col-topic { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }

.topic-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-user { font-size: 0.85rem; color: var(--text-muted); }
.col-num { font-size: 0.85rem; color: var(--text-dim); text-align: center; }
.col-date { font-size: 0.8rem; color: var(--text-dim); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.badge-pin { background: rgba(245, 185, 66, 0.15); color: var(--gold); }
.badge-lock { background: rgba(248, 113, 113, 0.12); color: var(--danger); }

/* ── Thread header ── */
.thread-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.thread-header .page-title { margin-top: 0.35rem; }

.thread-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.thread-edit-link {
  color: var(--accent);
  font-weight: 500;
}

/* ── Posts ── */
.posts-stream {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.post-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.post-sidebar {
  padding: 1.15rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.post-avatar {
  /* sizes via .avatar-lg / .avatar-sm */
}

.post-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-word;
}

.post-rank {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.role-badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-admin { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.role-moderator { background: rgba(155, 109, 255, 0.15); color: #c4b5fd; }

.post-main {
  padding: 1rem 1.25rem;
  min-width: 0;
}

.post-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.post-num {
  font-weight: 700;
  color: var(--accent);
}

.post-content {
  word-break: break-word;
  line-height: 1.6;
  font-size: 0.92rem;
  color: var(--text);
}

.post-content img, .bb-img {
  max-width: 100%;
  height: auto;
  max-height: 420px;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
}

.post-footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-like:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text);
}

.btn-like.is-liked {
  background: rgba(34, 201, 151, 0.12);
  border-color: rgba(34, 201, 151, 0.35);
  color: var(--success);
}

.like-count { font-weight: 600; }
.like-readonly { font-size: 0.82rem; color: var(--text-dim); }

/* ── Reply box ── */
.reply-box {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid rgba(79, 140, 255, 0.25);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.08), var(--shadow-sm);
}

.reply-box-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}

/* ── Editor ── */
.compose-editor {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

.editor-toolbar .tb {
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.editor-toolbar .tb:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-light);
}

.editor-toolbar .tb-hide {
  color: var(--gold);
  border-color: rgba(245, 185, 66, 0.25);
}

.editor-toolbar .tb-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 4px 0.25rem;
  align-self: center;
}

.editor-textarea {
  width: 100%;
  min-height: 100px;
  max-height: 280px;
  padding: 0.85rem 1rem;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  display: block;
}

.editor-textarea:focus {
  outline: none;
}

.compose-form label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.compose-form label:first-child { margin-top: 0; }

.compose-actions {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

/* ── Forms & Inputs ── */
input[type=text],
input[type=email],
input[type=password],
select,
textarea:not(.editor-textarea) {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── BBCode content ── */
.hide-box {
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.06), rgba(245, 185, 66, 0.02));
  border: 1px dashed rgba(245, 185, 66, 0.35);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 0.65rem 0;
  text-align: center;
  font-size: 0.88rem;
}

.hide-box .hide-icon {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.35rem;
}

.hide-box strong { color: var(--gold); }

.hide-hint {
  color: var(--warn);
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.link-hidden {
  display: inline-block;
  color: var(--text-dim);
  font-size: 0.82rem;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.55rem;
}

.spoiler {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0.65rem 0;
  overflow: hidden;
}

.spoiler summary {
  cursor: pointer;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  list-style: none;
  background: rgba(79, 140, 255, 0.05);
  transition: background var(--transition);
}

.spoiler summary:hover { background: rgba(79, 140, 255, 0.1); }
.spoiler summary::-webkit-details-marker { display: none; }
.spoiler-body { padding: 0.75rem 1rem 1rem; font-size: 0.88rem; }

.bb-code {
  background: #050810;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.78rem;
  max-height: 320px;
  font-family: 'Consolas', 'Monaco', monospace;
  color: #a5b4c8;
}

.quote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.85rem;
  margin: 0.5rem 0;
  background: rgba(79, 140, 255, 0.05);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.quote-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

/* ── Alerts ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.alert-info {
  background: var(--accent-soft);
  border: 1px solid rgba(79, 140, 255, 0.2);
  color: var(--text-muted);
}

.alert-warn {
  background: rgba(245, 185, 66, 0.08);
  border: 1px solid rgba(245, 185, 66, 0.2);
  color: var(--warn);
}

.alert-error, .err {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

.alert-success, .ok {
  background: rgba(34, 201, 151, 0.1);
  border: 1px solid rgba(34, 201, 151, 0.25);
  color: var(--success);
}

.notice {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Auth pages ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem 0;
}

.auth-card {
  width: min(400px, 100%);
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.auth-card-head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.auth-form label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-form label:first-of-type { margin-top: 0; }

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .hero-banner { padding: 1.5rem; }
  .hero-banner h1 { font-size: 1.4rem; }
}

@media (max-width: 768px) {
  .data-table-head { display: none; }

  .data-table-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
  }

  .col-num, .col-date, .col-user {
    font-size: 0.78rem;
    text-align: left;
  }

  .col-num::before { content: 'Cevap: '; color: var(--text-dim); }
  .col-date::before { content: 'Son: '; color: var(--text-dim); }
  .col-user::before { content: 'Yazar: '; color: var(--text-dim); }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    flex-direction: row;
    text-align: left;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 0.65rem;
  }

  .post-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 0;
  }

  .post-author { font-size: 0.85rem; }
  .post-rank { margin-top: 0; }
  .role-badge { margin-top: 0; margin-left: auto; }

  .main-nav .nav-link:not(.nav-admin) { display: none; }
  .user-chip span:not(.user-chip-avatar) { display: none; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .stat-cards { width: 100%; }
  .stat-card { flex: 1; min-width: 0; }
}
