/* ============================================================
   FPV101.com - Ana Stylesheet (Dark FPV Drone Teması)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0b0e;
  --bg2:       #0f1115;
  --surface:   #13151a;
  --surface2:  #1a1d24;
  --border:    #252830;
  --border2:   #2e3240;
  --primary:   #f97316;
  --primary-h: #fb923c;
  --cyan:      #06b6d4;
  --cyan-h:    #22d3ee;
  --text:      #f1f5f9;
  --text2:     #cbd5e1;
  --muted:     #94a3b8;
  --success:   #22c55e;
  --warning:   #eab308;
  --danger:    #ef4444;
  --info:      #3b82f6;
  --purple:    #a78bfa;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,.5);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-h); }

img { max-width: 100%; height: auto; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Navigation ───────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 300;
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary) !important;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: var(--cyan); }

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: .88rem;
  white-space: nowrap;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--surface2);
}

/* Desktop search */
.nav-search { flex: 0 0 220px; }
.nav-search input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: .85rem;
  outline: none;
  transition: border-color .2s;
}
.nav-search input:focus { border-color: var(--primary); }

/* Desktop user area */
.nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Icon buttons (bell, mail) */
.nav-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}
.nav-icon-btn:hover { color: var(--text); background: var(--surface2); }

.icon-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 8px;
  min-width: 15px;
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
}

/* Keep old class names working */
.nav-notif-btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; background: none; border: none; border-radius: 8px; color: var(--muted);
  font-size: 1.15rem; cursor: pointer; text-decoration: none; transition: all .2s; }
.nav-notif-btn:hover { color: var(--text); background: var(--surface2); }
.notif-badge, .pm-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700; padding: 1px 4px;
  border-radius: 8px; min-width: 15px; text-align: center; line-height: 1.4;
}

.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s;
  display: block;
}
.nav-avatar:hover { border-color: var(--primary); }

/* Auth buttons */
.btn-nav {
  background: var(--primary);
  color: #000 !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;
  transition: background .2s;
}
.btn-nav:hover { background: var(--primary-h); color: #000 !important; }

.btn-nav-ghost {
  border: 1px solid var(--border);
  color: var(--text2) !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .85rem;
  transition: all .2s;
  white-space: nowrap;
}
.btn-nav-ghost:hover { border-color: var(--primary); color: var(--primary) !important; }

/* Desktop dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 190px;
  box-shadow: var(--shadow);
  z-index: 400;
  overflow: hidden;
}
.dropdown-menu a, .dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  color: var(--text2);
  font-size: .9rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.dropdown-menu a:hover, .dropdown-menu button:hover {
  background: var(--border);
  color: var(--text);
}
.dropdown-menu .divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px;
}

.layout-two {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ── Hero Banner ──────────────────────────────────────────── */
.hero {
  background: #32174d40;
  border-bottom: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
}
.hero h1 { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.hero p  { color: var(--muted); font-size: 1.05rem; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2, .card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px; }

/* ── Category List ────────────────────────────────────────── */
.category-group { margin-bottom: 28px; }
.category-group-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px;
  margin-bottom: 8px;
}

.category-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.category-item:last-child { border-bottom: none; }
.category-item:hover { background: var(--surface2); }

.cat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cat-info { min-width: 0; }
.cat-name  { font-weight: 600; font-size: 1rem; color: var(--text); }
.cat-name a { color: inherit; }
.cat-name a:hover { color: var(--primary); }
.cat-desc  { font-size: .85rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cat-stats {
  text-align: right;
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-stats strong { color: var(--text2); display: block; font-size: .9rem; }

.cat-last {
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  max-width: 180px;
  text-align: right;
  flex-shrink: 0;
}
.cat-last a { color: var(--muted); }
.cat-last a:hover { color: var(--primary); }

.badge-approval {
  background: rgba(234,179,8,.15);
  color: var(--warning);
  border: 1px solid rgba(234,179,8,.3);
  font-size: .7rem;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

/* ── Thread List ──────────────────────────────────────────── */
.thread-list .thread-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.thread-list .thread-item:last-child { border-bottom: none; }
.thread-list .thread-item:hover { background: var(--surface2); }

.thread-status {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--surface2);
  color: var(--muted);
}
.thread-status.pinned  { background: rgba(249,115,22,.15); color: var(--primary); }
.thread-status.locked  { background: rgba(239,68,68,.12);  color: var(--danger); }
.thread-status.pending { background: rgba(234,179,8,.12);  color: var(--warning); }
.thread-status.new     { background: rgba(6,182,212,.12);  color: var(--cyan); }

.thread-info { min-width: 0; }
.thread-title { font-weight: 600; font-size: .98rem; color: var(--text); }
.thread-title a { color: inherit; }
.thread-title a:hover { color: var(--primary); }
.thread-meta  { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.thread-meta a { color: var(--muted); }
.thread-meta a:hover { color: var(--primary); }

.thread-replies {
  text-align: center;
  flex-shrink: 0;
}
.thread-replies strong { display: block; font-size: 1.1rem; color: var(--text); }
.thread-replies span   { font-size: .75rem; color: var(--muted); }

.thread-last {
  font-size: .78rem;
  color: var(--muted);
  text-align: right;
  max-width: 160px;
  flex-shrink: 0;
}
.thread-last a { color: var(--muted); }
.thread-last a:hover { color: var(--primary); }

.tag {
  display: inline-block;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: .72rem;
  padding: 1px 7px;
  border-radius: 10px;
  margin: 0 2px;
  transition: all .15s;
}
.tag:hover { border-color: var(--primary); color: var(--primary); }

/* ── Thread View ──────────────────────────────────────────── */
.thread-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.thread-header-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

/* Post */
.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
}

.post-sidebar {
  background: var(--surface2);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
}

.post-avatar {
  width: 72px; height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 10px;
}

.post-username {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.post-username:hover { color: var(--primary); }

.post-role-badge { margin: 4px 0; }

.post-stats {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.8;
}

.post-main { padding: 20px 24px; display: flex; flex-direction: column; }

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.post-date { font-size: .82rem; color: var(--muted); }

.post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-content {
  flex: 1;
  color: var(--text2);
  line-height: 1.8;
  word-break: break-word;
  min-height: 60px;
}

.post-content p { margin-bottom: .8em; }
.post-content img { border-radius: 6px; max-width: 100%; }
.post-content a  { color: var(--cyan); }

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.post-signature {
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
  border-top: 1px dashed var(--border2);
  padding-top: 8px;
  margin-top: 8px;
}

/* ── BBCode styles ────────────────────────────────────────── */
.bb-code {
  background: #0a0b0e;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'Consolas','Courier New',monospace;
  font-size: .88rem;
  overflow-x: auto;
  color: #67e8f9;
  white-space: pre-wrap;
  margin: 8px 0;
}
.bb-quote {
  background: var(--surface2);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  margin: 8px 0;
  color: var(--text2);
}
.bb-quote cite { display: block; font-weight: 600; color: var(--primary); margin-bottom: 6px; font-style: normal; }
.bb-img { border-radius: 8px; max-width: 100%; max-height: 480px; object-fit: contain; cursor: zoom-in; }
.bb-list { padding-left: 20px; margin: 8px 0; }
.bb-list li { margin: 4px 0; }
.bb-video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; margin: 8px 0; }
.bb-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.bb-spoiler { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
.bb-spoiler summary { cursor: pointer; color: var(--warning); font-weight: 600; }

/* ── Reply Form ───────────────────────────────────────────── */
.reply-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 24px;
}

.editor-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.editor-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
}
.editor-btn:hover { background: var(--border2); color: var(--primary); }

textarea.editor {
  width: 100%;
  min-height: 160px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: 16px;
  resize: vertical;
  outline: none;
  line-height: 1.7;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group   { margin-bottom: 18px; }
.form-label   { display: block; font-size: .88rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-hint    { font-size: .78rem; color: var(--muted); margin-top: 4px; }

.form-control {
  display: block;
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.form-control::placeholder { color: var(--muted); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  appearance: none;
}

textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--primary);  color: #000; }
.btn-primary:hover   { background: var(--primary-h); color: #000; }

.btn-cyan      { background: var(--cyan);     color: #000; }
.btn-cyan:hover      { background: var(--cyan-h); color: #000; }

.btn-success   { background: var(--success);  color: #000; }
.btn-success:hover   { background: #4ade80; color: #000; }

.btn-danger    { background: var(--danger);   color: #fff; }
.btn-danger:hover    { background: #f87171; color: #fff; }

.btn-warning   { background: var(--warning);  color: #000; }
.btn-warning:hover   { background: #fbbf24; color: #000; }

.btn-ghost     { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.btn-ghost:hover     { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-xs { padding: 3px 8px;  font-size: .75rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* Like button */
.btn-like {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
}
.btn-like:hover, .btn-like.liked {
  background: rgba(239,68,68,.12);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: .9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.3);  color: #4ade80; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #f87171; }
.alert-warning { background: rgba(234,179,8,.1);  border: 1px solid rgba(234,179,8,.3);  color: #fbbf24; }
.alert-info    { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3); color: #93c5fd; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-admin  { background: rgba(249,115,22,.2); color: var(--primary); border: 1px solid rgba(249,115,22,.3); }
.badge-mod    { background: rgba(6,182,212,.2);  color: var(--cyan);    border: 1px solid rgba(6,182,212,.3); }
.badge-member { background: rgba(148,163,184,.1);color: var(--muted);   border: 1px solid rgba(148,163,184,.2); }

.rank-badge {
  display: inline-block;
  font-size: .75rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 4px;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); transition: color .15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border2); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  font-size: .88rem;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #000; font-weight: 700; }
.page-dots { color: var(--muted); padding: 0 4px; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sidebar-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-card-body { padding: 14px 16px; }

/* ── User Profile ─────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.profile-info h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.profile-meta { color: var(--muted); font-size: .88rem; margin-top: 8px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-box strong { display: block; font-size: 1.5rem; color: var(--primary); font-weight: 700; }
.stat-box span   { font-size: .82rem; color: var(--muted); }

/* ── PM ───────────────────────────────────────────────────── */
.pm-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.pm-item:hover { background: var(--surface2); }
.pm-item.unread { background: rgba(249,115,22,.04); }
.pm-item.unread .pm-subject { color: var(--text); font-weight: 600; }

/* ── Notifications ────────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: rgba(249,115,22,.04); }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Admin Panel ──────────────────────────────────────────── */
.admin-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: calc(100vh - 62px);
}

.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
}

.admin-menu-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 20px 4px;
  margin-top: 12px;
}

.admin-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text2);
  font-size: .9rem;
  transition: all .15s;
}
.admin-menu a:hover, .admin-menu a.active {
  background: var(--surface2);
  color: var(--primary);
}
.admin-menu a .ico { width: 20px; text-align: center; }

.admin-content { padding: 28px 32px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .num  { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-card .lbl  { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.stat-card .icon { font-size: 1.5rem; float: right; margin-top: -32px; opacity: .4; }

/* ── Table ────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
thead th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  padding: 11px 16px;
  text-align: left;
  font-size: .8rem;
  letter-spacing: .4px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface2); }

/* ── Approval Banner ──────────────────────────────────────── */
.approval-banner {
  background: rgba(234,179,8,.08);
  border: 1px solid rgba(234,179,8,.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--warning);
}

/* ── Online Users / Misc ──────────────────────────────────── */
.online-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
  50%      { opacity:.8; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 1rem; }

.locked-notice {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: #f87171;
  text-align: center;
  margin: 16px 0;
  font-size: .9rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 20px 20px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 8px; }
.footer-brand p  { color: var(--muted); font-size: .85rem; }
.footer-links h4 { color: var(--text2); font-size: .85rem; margin-bottom: 10px; }
.footer-links a  { display: block; color: var(--muted); font-size: .83rem; margin-bottom: 6px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  max-width: 1280px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Search Box ───────────────────────────────────────────── */
.search-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
}
.search-hero input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.search-hero input:focus { border-color: var(--primary); }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-card .sub { color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.auth-divider {
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  margin: 16px 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  border-top: 1px solid var(--border);
}
.auth-divider span {
  position: relative;
  background: var(--surface);
  padding: 0 12px;
}

/* ── Hamburger ────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color .2s;
}
.hamburger:hover { border-color: var(--primary); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all .3s ease;
  transform-origin: center;
}
/* Açık hali */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobil sağ ikonlar (sadece mobilde görünür) */
.nav-mobile-right {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* ── Mobile Menu Panel ────────────────────────────────────── */
.mobile-menu {
  /* Masaüstünde her zaman gizli */
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 60px;
  z-index: 290;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  /* Animasyon: opacity + slide */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
/* JS display:block verdikten sonra .open class animate eder */
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
}

/* Mobil menü açıkken body scroll kilitlenir */
body.menu-open { overflow: hidden; }

/* Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 60px 0 0 0;
  background: rgba(0,0,0,.6);
  z-index: 250;
  backdrop-filter: blur(2px);
}
.mobile-overlay.show { display: block; }

/* Mobil arama */
.mobile-search {
  display: flex;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-search input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px 0 0 8px;
  font-size: .95rem;
  outline: none;
}
.mobile-search input:focus { border-color: var(--primary); }
.mobile-search button {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #000;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: background .2s;
}
.mobile-search button:hover { background: var(--primary-h); }

/* Mobil nav linkleri */
.mobile-nav {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  color: var(--text2);
  font-size: .97rem;
  transition: background .15s;
  border-left: 3px solid transparent;
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--surface2);
  color: var(--text);
  border-left-color: var(--primary);
}
.mobile-nav a.active { color: var(--primary); }

.mobile-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 16px;
}

.mobile-auth-btn {
  display: block;
  margin: 8px 16px 4px;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
}
.mobile-auth-btn.primary {
  background: var(--primary);
  color: #000 !important;
}
.mobile-auth-btn.ghost {
  border: 1px solid var(--border);
  color: var(--text2) !important;
}

/* Mobil kategori listesi */
.mobile-cats {
  padding: 12px 0 16px;
}
.mobile-cats-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 20px;
}
.mobile-cats a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: .9rem;
  transition: background .15s;
}
.mobile-cats a:hover { background: var(--surface2); color: var(--text2); }

/* ── Responsive — Tablet (≤ 960px) ───────────────────────── */
@media (max-width: 960px) {
  .layout-two { grid-template-columns: 1fr; }
  .admin-wrap  { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .nav-search { flex: 0 0 180px; }
}

/* ── Responsive — Mobil (≤ 768px) ────────────────────────── */
@media (max-width: 768px) {

  /* Navbar: sadece logo + sağ ikonlar + hamburger */
  .nav-links        { display: none; }
  .nav-search       { display: none; }
  .nav-user         { display: none; }
  .nav-mobile-right { display: flex; }
  .hamburger        { display: flex; }
  /* .mobile-menu display'i JS tarafından yönetilir */

  /* Container padding */
  .container, .container-narrow { padding: 14px 12px; }

  /* Hero */
  .hero { padding: 28px 16px; }
  .hero h1 { font-size: 1.6rem; }

  /* Kategori listesi - 2 sütun → 1 sütun */
  .category-item { grid-template-columns: auto 1fr; gap: 12px; padding: 12px 14px; }
  .cat-stats, .cat-last { display: none; }

  /* Thread listesi */
  .thread-list .thread-item { grid-template-columns: auto 1fr; gap: 10px; padding: 11px 14px; }
  .thread-replies, .thread-last { display: none; }

  /* Post kartı */
  .post-item { grid-template-columns: 1fr; }
  .post-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 16px;
  }
  .post-avatar { width: 44px; height: 44px; margin: 0; }
  .post-stats  { display: none; }
  .post-main   { padding: 14px 16px; }

  /* Profile */
  .profile-hero { flex-direction: column; text-align: center; padding: 20px; }
  .profile-stats { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .stat-box strong { font-size: 1.2rem; }

  /* Auth */
  .auth-card { padding: 22px 16px; max-width: 100%; }
  .auth-wrap  { padding: 20px 12px; }

  /* Admin */
  .admin-content { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 1.4rem; }

  /* Tablo scroll */
  .table-responsive { border-radius: 8px; }
  table { min-width: 560px; font-size: .82rem; }
  thead th { padding: 8px 12px; }
  tbody td  { padding: 10px 12px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 16px; }
  .site-footer  { padding: 24px 16px 14px; margin-top: 40px; }

  /* Thread header */
  .thread-header-card { padding: 16px; }
  .thread-header-card h1 { font-size: 1.2rem; }

  /* Form kontrolü */
  .form-control { font-size: 16px; } /* iOS zoom önleme */

  /* Reply form */
  .editor-toolbar { gap: 3px; padding: 8px 10px; }
  .editor-btn { padding: 4px 8px; font-size: .78rem; }
  textarea.editor { min-height: 130px; font-size: 15px; }

  /* Sayfalama */
  .pagination { gap: 3px; }
  .page-btn   { width: 32px; height: 32px; font-size: .82rem; }

  /* Arama */
  .search-hero { flex-direction: column; padding: 16px; }
  .search-hero input { font-size: 16px; }

  /* BBCode medya */
  .bb-img { max-height: 320px; }
  .bb-video { padding-bottom: 56%; }

  /* Breadcrumb */
  .breadcrumb { font-size: .78rem; }
}

/* ── Responsive — Küçük Mobil (≤ 400px) ─────────────────── */
@media (max-width: 400px) {
  .nav-logo { font-size: 1.15rem; }
  .hero h1  { font-size: 1.35rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .btn-lg { padding: 10px 18px; font-size: .92rem; }
}

/* ── Utility ──────────────────────────────────────────────── */
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flex-wrap  { flex-wrap: wrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-muted   { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .78rem; }
.fw-bold { font-weight: 700; }
.text-center { text-align: center; }
.d-none { display: none; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Reaksiyonlar ────────────────────────────────────────── */
.post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .88rem;
  cursor: pointer;
  color: var(--text2);
  transition: background .15s, border-color .15s;
  line-height: 1.4;
}
.reaction-btn:hover { background: var(--surface); border-color: var(--primary); }
.reaction-btn.active { background: rgba(249,115,22,.12); border-color: var(--primary); color: var(--primary); }
.reaction-btn span { font-size: .78rem; font-weight: 600; }

/* ── Follow / Bookmark buton aktif stili ─────────────────── */
.btn-follow.active, .btn-bookmark.active, .btn-follow-cat.active {
  background: rgba(249,115,22,.12);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Poll / Anket ────────────────────────────────────────── */
#poll-box .card-body { padding: 16px 20px; }

/* ── Ekipman Kataloğu ────────────────────────────────────── */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px;
}

/* ── Uçuş Noktaları Harita ───────────────────────────────── */
#map { border-radius: 0; }

/* ── Admin istatistik bar ────────────────────────────────── */
.admin-content .stat-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* ── Rozet pill ──────────────────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .8rem;
  color: var(--text2);
}

/* ── Profil rozet listesi ────────────────────────────────── */
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
}
