/* ============================================================
   main.css — Tam Mobil Uyumlu
   Breakpoints: 480px / 640px / 768px / 1024px / 1280px
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Yatay scroll tamamen engelle */
html { overflow-x: clip; }
body { overflow-x: hidden !important; }

:root {
  --accent:      #6366f1;
  --accent-dark: #4f46e5;
  --accent-light:#a5b4fc;
  --green:       #10b981;
  --red:         #ef4444;
  --amber:       #f59e0b;
  --pink:        #ec4899;
  --bg:          #0f0f14;
  --surface:     #17171f;
  --surface2:    #1e1e28;
  --border:      rgba(255,255,255,0.07);
  --text:        #e2e2f0;
  --text-muted:  #7878a0;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --font:        'Inter', system-ui, sans-serif;
  --mono:        'Fira Code', monospace;
  --nav-h:       56px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 99px; }

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 900;
  width: 100%;
  background: rgba(15,15,20,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 16px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 12px;
}
.nav-logo {
  font-weight: 700; font-size: 18px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; flex-shrink: 0;
}
.logo-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  display: inline-block; flex-shrink: 0;
}

/* Search — desktop */
.nav-search {
  flex: 1; max-width: 400px;
  position: relative;
}
.nav-search-inner {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px; overflow: hidden;
}
.nav-search input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 8px 14px; color: var(--text); font-size: 13px;
  min-width: 0;
}
.nav-search button {
  background: transparent; border: none;
  color: var(--text-muted); padding: 8px 12px;
  cursor: pointer; transition: color .2s; flex-shrink: 0;
}
.nav-search button:hover { color: var(--accent); }

.nav-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* Bildirim / ikon buton */
.nav-icon-btn {
  position: relative;
  background: transparent; border: none;
  color: var(--text-muted); font-size: 17px; cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .2s, color .2s;
  text-decoration: none; flex-shrink: 0;
}
.nav-icon-btn:hover { background: var(--surface2); color: var(--text); }
.nav-icon-btn .badge {
  position: absolute; top: 3px; right: 3px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 99px; padding: 1px 4px;
  min-width: 15px; text-align: center;
  line-height: 1.4;
}

/* Avatar dropdown */
.nav-avatar-wrap { position: relative; flex-shrink: 0; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s; display: block;
}
.nav-avatar:hover { border-color: var(--accent); }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0; transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 1000;
}
.nav-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.dropdown-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; font-size: 14px; }
.dropdown-header small { color: var(--text-muted); font-size: 12px; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px;
  color: var(--text); text-decoration: none;
  transition: background .15s;
}
.nav-dropdown a:hover { background: var(--surface2); }
.nav-dropdown a i { width: 14px; color: var(--text-muted); font-size: 13px; }
.dropdown-divider { height: 1px; background: var(--border); }
.text-danger { color: var(--red) !important; }
.text-accent  { color: var(--accent) !important; }

/* Hamburger */
.nav-menu-toggle {
  display: none;
  background: transparent; border: none;
  color: var(--text); font-size: 19px;
  cursor: pointer; padding: 6px;
  flex-shrink: 0;
}

/* Mobile search drawer */
.mobile-search-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 890;
}
.mobile-search-drawer.open { display: block; }
.mobile-search-drawer .msearch-inner {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px; overflow: hidden;
}
.mobile-search-drawer input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 10px 16px; color: var(--text); font-size: 14px;
}
.mobile-search-drawer button {
  background: transparent; border: none;
  color: var(--text-muted); padding: 10px 14px; cursor: pointer;
}

/* ─── BOTTOM NAV (mobil) ─────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%;
  background: rgba(15,15,20,0.97);
  border-top: 1px solid var(--border);
  z-index: 850;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottom-nav-inner {
  display: flex; justify-content: space-around; align-items: center;
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); text-decoration: none;
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 10px;
  padding: 4px 12px; border-radius: 8px;
  transition: color .2s;
  min-width: 52px;
}
.bottom-nav a i, .bottom-nav button i { font-size: 18px; }
.bottom-nav a.active, .bottom-nav a:hover,
.bottom-nav button:hover { color: var(--accent); }
.bottom-nav .bn-badge {
  position: relative; display: inline-block;
}
.bottom-nav .bn-badge-dot {
  position: absolute; top: -2px; right: -6px;
  width: 8px; height: 8px;
  background: var(--red); border-radius: 50%;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: none;
  text-decoration: none;
  transition: all .2s; white-space: nowrap;
  font-family: var(--font);
}
.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger  { background: var(--red);   color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-full { width: 100%; justify-content: center; }

/* ─── FLASH ──────────────────────────────────────────── */
.flash-bar {
  position: fixed; top: calc(var(--nav-h) + 8px);
  left: 50%; transform: translateX(-50%);
  z-index: 1000;
  padding: 11px 18px;
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
  width: calc(100% - 32px); max-width: 460px;
}
.flash-success { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }
.flash-error   { background: #450a0a; color: #fca5a5; border: 1px solid #ef4444; }
.flash-info    { background: #1e1b4b; color: #a5b4fc; border: 1px solid #6366f1; }
.flash-bar button { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: .6; font-size: 16px; flex-shrink: 0; }

/* ─── LAYOUT ─────────────────────────────────────────── */
.page-wrap { max-width: 1280px; margin: 0 auto; padding: 20px 16px; flex: 1; width: 100%; }
.two-col   { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.three-col { display: grid; grid-template-columns: 220px 1fr 260px; gap: 20px; align-items: start; }

/* ─── CARDS ──────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h2, .card-header h3 { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.card-body { padding: 18px; }

/* ─── TOPIC LIST ─────────────────────────────────────── */
.topic-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background .15s; }
.topic-item:last-child { border-bottom: none; }
.topic-item:hover { background: var(--surface2); }
.topic-item-info { flex: 1; min-width: 0; }
.topic-item-title { font-size: 14px; font-weight: 500; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.topic-item-meta  { font-size: 11px; color: var(--text-muted); }
.topic-item-count { font-size: 13px; color: var(--accent); font-weight: 600; min-width: 36px; text-align: right; flex-shrink: 0; }
.cat-pill { display: inline-block; padding: 2px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; text-transform: uppercase; }

/* ─── ENTRY CARD ─────────────────────────────────────── */
.entry-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
  overflow: hidden; transition: border-color .2s;
}
.entry-card:hover { border-color: rgba(99,102,241,.3); }
.entry-card.featured { border-color: var(--amber); }
.entry-header { padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.entry-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.entry-author-info { flex: 1; min-width: 0; }
.entry-author-info a { font-weight: 600; font-size: 13px; color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-author-info a:hover { color: var(--accent); }
.entry-author-info small { display: block; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-number { font-family: var(--mono); font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.entry-body { padding: 14px 16px; }
.entry-text { font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.entry-image { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 12px; }
.entry-video { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); margin-top: 12px; border: none; }
.entry-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vote-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-size: 12px; cursor: pointer;
  transition: all .2s; font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.vote-btn:active { transform: scale(.95); }
.vote-btn.active-like    { color: var(--green); border-color: var(--green); background: rgba(16,185,129,.1); }
.vote-btn.active-dislike { color: var(--red);   border-color: var(--red);   background: rgba(239,68,68,.1); }
.entry-footer-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.comment-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-size: 12px; cursor: pointer; transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.comment-toggle-btn:hover, .comment-toggle-btn:active { color: var(--accent); border-color: var(--accent); background: rgba(99,102,241,.1); }
.entry-actions { display: flex; gap: 2px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: transparent; border: none;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--surface2); color: var(--text); }

/* ─── COMMENTS ───────────────────────────────────────── */
.comments-section { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.comments-section.open { max-height: 2000px; }
.comments-inner { background: var(--surface2); border-top: 1px solid var(--border); padding: 14px 16px; }
.comment-item { display: flex; gap: 8px; margin-bottom: 10px; }
.comment-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; flex: 1; min-width: 0; }
.comment-bubble strong { font-size: 12px; color: var(--accent); }
.comment-bubble p { font-size: 13px; margin-top: 3px; word-break: break-word; }
.comment-form { display: flex; gap: 7px; margin-top: 10px; align-items: flex-start; }
.comment-form input {
  flex: 1; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; color: var(--text);
  font-size: 13px; outline: none;
  font-family: var(--font); min-width: 0;
  -webkit-appearance: none;
}
.comment-form input:focus { border-color: var(--accent); }

/* ─── FORMS ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-control {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text);
  font-size: 16px; /* 16px - iOS zoom önler */
  outline: none; font-family: var(--font);
  transition: border-color .2s;
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
textarea.form-control { resize: vertical; min-height: 100px; font-size: 15px; }
select.form-control { cursor: pointer; }
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ─── AUTH ───────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,.15) 0%, transparent 70%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 5px; }
.auth-sub   { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 18px; }
.auth-switch a { color: var(--accent); font-weight: 500; text-decoration: none; }

/* ─── PROFILE ────────────────────────────────────────── */
.profile-banner { height: 140px; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%); border-radius: var(--radius) var(--radius) 0 0; }
.profile-info { padding: 0 20px 20px; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
.profile-avatar-wrap { position: relative; margin-top: -44px; margin-bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; }
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); }
.profile-name   { font-size: 18px; font-weight: 700; }
.profile-handle { color: var(--text-muted); font-size: 13px; }
.profile-bio    { font-size: 14px; color: var(--text-muted); margin: 8px 0; }
.profile-stats  { display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.profile-stat   { text-align: center; }
.profile-stat strong { display: block; font-size: 17px; font-weight: 700; }
.profile-stat span   { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }

/* ─── WIDGETS ────────────────────────────────────────── */
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.widget-title { padding: 12px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.widget-list a { display: flex; align-items: center; gap: 9px; padding: 10px 14px; font-size: 13px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); transition: background .15s; }
.widget-list a:last-child { border-bottom: none; }
.widget-list a:hover { background: var(--surface2); color: var(--accent); }
.widget-list .rank  { font-size: 11px; color: var(--text-muted); min-width: 18px; }
.widget-list .count { margin-left: auto; font-size: 11px; color: var(--accent); font-weight: 600; flex-shrink: 0; }

/* ─── ADMIN ──────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .sidebar-logo { padding: 0 18px 20px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.admin-nav a { display: flex; align-items: center; gap: 9px; padding: 10px 18px; font-size: 13px; color: var(--text-muted); text-decoration: none; transition: all .15s; border-left: 3px solid transparent; }
.admin-nav a:hover, .admin-nav a.active { color: var(--accent); background: rgba(99,102,241,.08); border-left-color: var(--accent); }
.admin-nav .nav-section { padding: 14px 18px 5px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.admin-content { padding: 24px 20px; min-width: 0; }
.admin-header { margin-bottom: 24px; }
.admin-header h1 { font-size: 20px; font-weight: 700; }
.admin-header p  { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .stat-icon  { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 12px; }
.stat-card .stat-num   { font-size: 26px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-up   { color: var(--green); }
.stat-down { color: var(--red); }

/* ─── TABLE ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 9px 12px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--surface2); white-space: nowrap; }
.data-table td { padding: 11px 12px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface2); }
.data-table tr:last-child td { border-bottom: none; }

/* ─── BADGES ─────────────────────────────────────────── */
.badge-role { display: inline-block; padding: 2px 7px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.badge-admin     { background: rgba(239,68,68,.15);  color: var(--red); }
.badge-moderator { background: rgba(245,158,11,.15); color: var(--amber); }
.badge-user      { background: rgba(99,102,241,.15); color: var(--accent); }
.badge-active    { background: rgba(16,185,129,.15); color: var(--green); }
.badge-banned    { background: rgba(239,68,68,.15);  color: var(--red); }
.badge-pending   { background: rgba(245,158,11,.15); color: var(--amber); }

/* ─── PAGINATION ─────────────────────────────────────── */
.pagination { display: flex; gap: 5px; list-style: none; flex-wrap: wrap; justify-content: center; margin-top: 20px; padding: 0 4px; }
.pagination li a,
.pagination li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 13px;
  text-decoration: none; transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.pagination li.active a { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination li:not(.active):not(.disabled) a:hover { border-color: var(--accent); color: var(--accent); }
.pagination li.disabled a,
.pagination li.disabled span { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ─── UPLOAD ZONE ────────────────────────────────────── */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px 16px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(99,102,241,.05); }
.upload-zone i { font-size: 28px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.upload-zone p { font-size: 13px; color: var(--text-muted); }
.upload-preview { margin-top: 10px; position: relative; display: inline-block; max-width: 100%; }
.upload-preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); }
.upload-preview .remove-img { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 10px; color: #fff; border: none; }

/* ─── SKELETON ───────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── OVERLAY ────────────────────────────────────────── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 800; }
.overlay.active { display: block; }

/* ─── MODAL ──────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 1100; display: flex; align-items: flex-end; justify-content: center; padding: 0; opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; padding: 24px 20px; width: 100%; max-width: 480px; box-shadow: 0 -8px 40px rgba(0,0,0,.5); transform: translateY(20px); transition: transform .3s; max-height: 90vh; overflow-y: auto; }
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.modal-header h2 { font-size: 17px; font-weight: 700; flex: 1; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .2s; }
.modal-close:hover { background: var(--surface2); color: var(--text); }
.login-error { background: rgba(239,68,68,.1); border: 1px solid var(--red); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--red); }

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 24px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; }
.footer-left p { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }

/* ─── SEARCH SUGGEST ─────────────────────────────────── */
.search-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 999; display: none; overflow: hidden; }
.search-suggest a { display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: 13px; border-bottom: 1px solid var(--border); transition: background .15s; }
.search-suggest a:last-child { border-bottom: none; }
.search-suggest a:hover { background: var(--surface2); color: var(--accent); }
.search-suggest a i { color: var(--text-muted); font-size: 11px; width: 14px; flex-shrink: 0; }
.search-suggest a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest a small { color: var(--accent); font-size: 11px; font-weight: 600; flex-shrink: 0; }

/* ─── TOPIC PAGE ─────────────────────────────────────── */
.topic-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px; }
.topic-hero h1 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.topic-hero-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }

/* ─── NOTIFICATIONS ──────────────────────────────────── */
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .15s; }
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: rgba(99,102,241,.05); }
.notif-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.notif-icon.like    { background: rgba(16,185,129,.2); color: var(--green); }
.notif-icon.comment { background: rgba(99,102,241,.2); color: var(--accent); }
.notif-icon.follow  { background: rgba(236,72,153,.2); color: var(--pink); }
.notif-body { flex: 1; min-width: 0; }
.notif-body p     { font-size: 13px; }
.notif-body small { font-size: 11px; color: var(--text-muted); }

/* ─── MISC ───────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 13px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.d-flex { display: flex; } .align-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 40px; margin-bottom: 14px; display: block; opacity: .3; }
.empty-state p { font-size: 14px; }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake   { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ─── GOOGLE BUTTON ──────────────────────────────────── */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: #fff; color: #3c4043;
  border: 1px solid #dadce0; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all .2s;
  cursor: pointer; font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.google-btn:hover { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* ============================================================
   RESPONSIVE — Tablet: ≤1024px
   ============================================================ */
@media (max-width: 1024px) {
  .two-col   { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 200px 1fr; }
}

/* ============================================================
   RESPONSIVE — Mobile: ≤768px
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-h: 52px; }

  /* Yatay taşma engeli */
  *, *::before, *::after { max-width: 100%; }
  img, video, iframe, table { max-width: 100% !important; }
  pre, code { overflow-x: auto; max-width: 100%; }
  .nav-inner, .page-wrap, .footer-inner { overflow: hidden; }

  /* Navbar */
  .nav-search  { display: none !important; }
  .nav-menu-toggle { display: flex !important; }
  .nav-inner   { gap: 8px; padding: 0 12px; }
  .nav-logo    { font-size: 17px; }

  /* Giriş/Kayıt butonlarındaki span'ı gizle */
  .nav-actions .btn-primary span { display: none; }
  .nav-actions .btn-sm { padding: 6px 10px; }

  /* Bottom nav göster */
  .bottom-nav { display: block; }
  /* İçeriğin altında yer kap */
  .page-wrap  { padding: 14px 12px 70px; }
  .site-footer { margin-bottom: 56px; }

  /* Kartlar */
  .entry-header { padding: 10px 12px; }
  .entry-body   { padding: 12px 12px; }
  .entry-footer { padding: 8px 12px; gap: 5px; }
  .entry-text   { font-size: 14px; }

  /* 2 sütunlu form tek sütun */
  .form-row { grid-template-columns: 1fr; }

  /* Auth card */
  .auth-card { padding: 22px 16px; }
  .auth-title { font-size: 19px; }

  /* Admin — sidebar gizle, drawer ile aç */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    display: none;
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 260px; z-index: 1050;
    height: 100vh;
    box-shadow: 4px 0 20px rgba(0,0,0,.5);
  }
  .admin-sidebar.mobile-open { display: block; }
  .admin-content { padding: 16px 12px 70px; }
  .admin-header h1 { font-size: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card .stat-num { font-size: 22px; }

  /* Tablo — yatay scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Flash */
  .flash-bar { width: calc(100% - 24px); font-size: 12px; padding: 10px 14px; }

  /* Modal — tam ekran alttan çıkar */
  .modal-overlay { align-items: flex-end; }
  .modal-box { border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; }

  /* Profil */
  .profile-banner  { height: 110px; }
  .profile-avatar  { width: 76px; height: 76px; }
  .profile-name    { font-size: 17px; }
  .profile-stats   { gap: 16px; }

  /* Topic hero */
  .topic-hero  { padding: 14px 12px; }
  .topic-hero h1 { font-size: 16px; }

  /* Pagination */
  .pagination li a,
  .pagination li span { min-width: 34px; height: 34px; font-size: 12px; }

  /* Card body */
  .card-body { padding: 14px 12px; }

  /* Widget */
  .widget-list a { padding: 10px 12px; font-size: 12px; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Entry image max height */
  .entry-image { max-height: 260px; }
}

/* ============================================================
   RESPONSIVE — Small Mobile: ≤480px
   ============================================================ */
@media (max-width: 480px) {

  .entry-avatar { width: 30px; height: 30px; }
  .entry-author-info a { font-size: 12px; }

  .vote-btn { padding: 4px 8px; font-size: 11px; }
  .comment-toggle-btn { padding: 4px 8px; font-size: 11px; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px; }
  .stat-card .stat-num { font-size: 20px; }

  .auth-card { padding: 20px 14px; }

  .pagination { gap: 3px; }
  .pagination li a,
  .pagination li span { min-width: 32px; height: 32px; font-size: 11px; }
}