/**
 * MegaforBB default theme – tema stilleri
 * Tüm inline CSS buraya taşındı; tema paket olarak satıldığında assets tema klasöründe kalır.
 */

/* Sistem cekirdegi stilleri public/css/main.css dosyasina tasindi. */

/* ========================================================
  FORUM KABUĞU — Source Sans 3, soguk acik zemin (portal: Fraunces, portal.css)
  ======================================================== */
:root {
  --mfbb-font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --mfbb-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --mfbb-forum-bg: #edf2f7;
  --mfbb-forum-surface: #ffffff;
  --mfbb-forum-ink: #111827;
  --mfbb-forum-muted: #64748b;
  --mfbb-forum-accent: #105289;
  --mfbb-forum-border: #d9e2ec;
  --mfbb-forum-rail: #105289;
}

body.mfbb-layout-forum {
  font-family: var(--mfbb-font-sans);
  background-color: var(--mfbb-forum-bg) !important;
  color: var(--mfbb-forum-ink);
  -webkit-font-smoothing: antialiased;
}

body.mfbb-layout-portal {
  font-family: var(--mfbb-font-sans);
  background-color: #edf2f7 !important;
}

/* Forum ana sayfa — üst karşılama kartı (Tailwind utility ile birlikte) */
body.mfbb-layout-forum .mfbb-hero-strip {
  --tw-ring-width: 0 !important;
  border: 1px solid var(--mfbb-forum-border) !important;
  border-left: 4px solid var(--mfbb-forum-rail) !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbff 100%) !important;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 14px 36px -18px rgba(15, 23, 42, 0.12) !important;
}

body.mfbb-layout-forum .mfbb-hero-strip .text-xl.font-semibold {
  font-family: var(--mfbb-font-sans);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--mfbb-forum-ink);
}

body.mfbb-layout-forum .mfbb-hero-strip .rounded-lg.bg-gray-50 {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: var(--mfbb-forum-border) !important;
  border-radius: 0.5rem !important;
}

/* Forum görünümü — kategori / konu listesi sayfası */
.mfbb-forum-view nav[aria-label="Breadcrumb"] {
  border-left: 3px solid var(--mfbb-forum-accent);
  border-radius: 0.5rem;
  background: var(--mfbb-forum-surface) !important;
  border-color: var(--mfbb-forum-border) !important;
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.05);
}

.mfbb-forum-view h1.text-lg {
  font-family: var(--mfbb-font-sans);
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--mfbb-forum-ink) !important;
}

/* Forum ana index — IPS tarzı bloklar (index.html.twig) */
.mfbb-forum-index .ips-forum-wrapper {
  margin-bottom: 1.75rem;
}

.mfbb-forum-index .ips-category-header {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0;
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.mfbb-forum-index .ips-forum-block {
  display: flex;
  background: var(--mfbb-forum-surface);
  border: 1px solid var(--mfbb-forum-border);
  border-top-width: 4px;
  margin-bottom: 1rem;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0 0 0.65rem 0.65rem;
  box-shadow: 0 8px 28px -20px rgba(28, 25, 23, 0.35);
}

.mfbb-forum-index .ips-forum-info {
  width: 33%;
  padding: 1.25rem 1.15rem;
  border-right: 1px solid var(--mfbb-forum-border);
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
}

.mfbb-forum-index .ips-forum-image {
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
  margin-bottom: 0.85rem;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

.mfbb-forum-index .ips-forum-title-wrap {
  border: 1px solid var(--mfbb-forum-border);
  border-left-width: 3px;
  border-radius: 0.35rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.mfbb-forum-index .ips-forum-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  text-decoration: none;
  display: block;
  word-break: break-word;
  letter-spacing: -0.02em;
}

.mfbb-forum-index .ips-forum-title:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mfbb-forum-index .ips-forum-desc {
  color: var(--mfbb-forum-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 0.85rem 0;
  word-break: break-word;
}

.mfbb-forum-index .ips-forum-stats {
  color: var(--mfbb-forum-muted);
  font-size: 0.8125rem;
  margin: 0;
}

.mfbb-forum-index .ips-forum-stats strong {
  color: var(--mfbb-forum-ink);
  font-weight: 650;
}

.mfbb-forum-index .ips-topic-list {
  width: 67%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
}

.mfbb-forum-index .ips-topic-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  min-width: 0;
}

.mfbb-forum-index .ips-topic-item:last-child {
  border-bottom: none;
}

.mfbb-forum-index .ips-topic-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-right: 0.9rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(28, 25, 23, 0.06);
}

.mfbb-forum-index .ips-topic-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.mfbb-forum-index .ips-topic-title {
  color: var(--mfbb-forum-ink);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.mfbb-forum-index .ips-topic-title:hover {
  text-decoration: underline;
}

.mfbb-forum-index .ips-topic-meta {
  color: var(--mfbb-forum-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mfbb-forum-index .ips-topic-comments {
  color: var(--mfbb-forum-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  margin-left: 1.15rem;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.mfbb-forum-index .ips-forum-no-image-placeholder {
  width: 100%;
  height: 160px;
  border-radius: 0.4rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(145deg, #f8fbff 0%, #edf3f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a6a09a;
  font-size: 2.25rem;
  border: 1px dashed var(--mfbb-forum-border);
}

@media (max-width: 768px) {
  .mfbb-forum-index .ips-forum-block {
    flex-direction: column;
  }

  .mfbb-forum-index .ips-forum-info,
  .mfbb-forum-index .ips-topic-list {
    width: 100%;
    border-right: none;
  }

  .mfbb-forum-index .ips-forum-info {
    border-bottom: 1px solid var(--mfbb-forum-border);
    padding: 0.85rem;
  }

  .mfbb-forum-index .ips-topic-title {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }

  .mfbb-forum-index .ips-topic-meta {
    white-space: normal;
  }

  .mfbb-forum-index .ips-topic-comments {
    margin-left: 0.5rem;
    white-space: normal;
    font-size: 0.75rem;
  }

  .mfbb-forum-index .ips-topic-item {
    padding: 0.65rem 0.85rem;
  }

  .mfbb-forum-index .ips-topic-avatar {
    width: 30px;
    height: 30px;
    margin-right: 0.65rem;
  }

  .mfbb-forum-index .ips-forum-image {
    max-height: 180px;
  }

  .mfbb-forum-index .ips-forum-no-image-placeholder {
    height: 100px;
    font-size: 1.75rem;
  }

  .mfbb-forum-index .ips-category-header {
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
  }

  .mfbb-forum-index .ips-forum-title {
    font-size: 0.95rem;
  }

  .mfbb-forum-index .ips-forum-desc {
    font-size: 0.8125rem;
  }
}

/* ========================================================
   RICH TEXT (PROSE) & EDITOR FORMATTING
   (Frontend: Toast UI Editor | Admin: Summernote)
   ======================================================== */
.prose h1 {
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.111;
  font-weight: 800;
  color: #111827;
}

.prose h2 {
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.333;
  font-weight: 700;
  color: #111827;
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
  font-weight: 600;
  color: #111827;
}

.prose h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
  font-weight: 600;
  color: #111827;
}

.prose h5 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
  font-weight: 600;
  color: #111827;
}

.prose h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
  font-weight: 600;
  color: #111827;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ul {
  padding-left: 1.625em;
  list-style-type: disc;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ol {
  padding-left: 1.625em;
  list-style-type: decimal;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose pre {
  background-color: #1e293b;
  color: #f8fafc;
  overflow-x: auto;
  font-weight: 400;
  font-size: 0.875em;
  line-height: 1.714;
  margin-top: 1.714em;
  margin-bottom: 1.714em;
  border-radius: 0.375rem;
  padding: 0.857em 1.142em;
}

.prose code {
  color: #111827;
  font-weight: 600;
  font-size: 0.875em;
}

.prose pre code {
  background-color: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-weight: inherit;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

.prose hr {
  border-color: #e5e7eb;
  border-top-width: 1px;
  margin-top: 3em;
  margin-bottom: 3em;
}

.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875em;
  line-height: 1.714;
}

.prose thead {
  color: #111827;
  font-weight: 600;
  border-bottom-width: 1px;
  border-bottom-color: #d1d5db;
}

.prose thead th {
  vertical-align: bottom;
  padding: 0.571em;
}

.prose tbody tr {
  border-bottom-width: 1px;
  border-bottom-color: #e5e7eb;
}

.prose tbody td {
  vertical-align: baseline;
  padding: 0.571em;
}

/* Handle Text Alignments Properly inside Prose (Overrides Tailwind Defaults) */
.prose [align="center"],
.post-content [align="center"],
.prose [style*="text-align: center"],
.post-content [style*="text-align: center"] {
  text-align: center !important;
}

.prose [align="right"],
.post-content [align="right"],
.prose [style*="text-align: right"],
.post-content [style*="text-align: right"] {
  text-align: right !important;
}

.prose [align="left"],
.post-content [align="left"],
.prose [style*="text-align: left"],
.post-content [style*="text-align: left"] {
  text-align: left !important;
}

.prose [align="justify"],
.post-content [align="justify"],
.prose [style*="text-align: justify"],
.post-content [style*="text-align: justify"] {
  text-align: justify !important;
}

/* Alıntı (blockquote) mesajlarda diğerinden ayrılsın */
.prose blockquote,
.post-content blockquote,
blockquote[data-author],
.mfbb-quote {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #3b82f6;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border-radius: 0 0.375rem 0.375rem 0;
  color: #334155;
  font-style: normal;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.35);
}

.prose blockquote strong:first-child,
blockquote[data-author] strong:first-child,
.mfbb-quote-author {
  color: #1d4ed8;
}

.mfbb-quote-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  color: #1d4ed8;
  font-size: 0.8125rem;
  font-weight: 600;
}

.mfbb-quote-header i {
  font-size: 0.75rem;
  opacity: 0.8;
}

.mfbb-quote-label {
  color: #475569;
  font-weight: 500;
}

.mfbb-quote-body {
  color: #334155;
}

.mfbb-quote-body > :first-child {
  margin-top: 0;
}

.mfbb-quote-body > :last-child {
  margin-bottom: 0;
}

/* Spoiler (details/summary) – tıklanınca açılır içerik */
.prose details.mfbb-spoiler,
.post-content details.mfbb-spoiler,
.post-body details.mfbb-spoiler {
  margin: 0.5rem 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #f1f5f9;
}
.prose details.mfbb-spoiler summary,
.post-content details.mfbb-spoiler summary,
.post-body details.mfbb-spoiler summary {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: #475569;
  user-select: none;
  list-style: none;
}
.prose details.mfbb-spoiler summary::-webkit-details-marker,
.post-content details.mfbb-spoiler summary::-webkit-details-marker {
  display: none;
}
.prose details.mfbb-spoiler summary::before,
.post-content details.mfbb-spoiler summary::before,
.post-body details.mfbb-spoiler summary::before {
  content: "▶ ";
  display: inline-block;
  margin-right: 0.25rem;
  transition: transform 0.2s;
}
.prose details.mfbb-spoiler[open] summary::before,
.post-content details.mfbb-spoiler[open] summary::before,
.post-body details.mfbb-spoiler[open] summary::before {
  transform: rotate(90deg);
}
.prose details.mfbb-spoiler > *:not(summary),
.post-content details.mfbb-spoiler > *:not(summary),
.post-body details.mfbb-spoiler > *:not(summary) {
  padding: 0.75rem 1rem;
  margin: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

/* Editör renk paleti popup */
.mfbb-editor-color-picker button[data-color]:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #3b82f6;
}
.mfbb-editor-color-picker input[type="color"] {
  display: block;
  width: 100%;
}

/* Prose: vurgu ve hizalı bloklar */
.prose mark,
.post-content mark,
.post-body mark {
  background: #fef08a;
  padding: 0.1em 0.2em;
  border-radius: 0.2em;
}

/* Task list (Toast UI görev listesi) – mesaj içinde checkbox görünümü */
.prose .task-list-item,
.post-content .task-list-item,
.post-body .task-list-item {
  list-style: none;
  padding-left: 26px;
  position: relative;
  margin-bottom: 0.25em;
}
.prose .task-list-item::before,
.post-content .task-list-item::before,
.post-body .task-list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border: 2px solid #94a3b8;
  border-radius: 3px;
  background: #fff;
  box-sizing: border-box;
}
.prose .task-list-item.checked::before,
.prose .task-list-item[data-task-checked]::before,
.post-content .task-list-item.checked::before,
.post-content .task-list-item[data-task-checked]::before,
.post-body .task-list-item.checked::before,
.post-body .task-list-item[data-task-checked]::before {
  background: #3b82f6;
  border-color: #3b82f6;
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  line-height: 14px;
  text-align: center;
}
.prose ul:has(.task-list-item),
.post-content ul:has(.task-list-item),
.post-body ul:has(.task-list-item) {
  list-style: none;
  padding-left: 0;
}

/* Admin index sayfası (themes/default/admin/index.php) */
body.admin-page {
  font-family: sans-serif;
  background: #f0f0f0;
  margin: 0;
  padding: 20px;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.admin-menu a {
  margin-right: 15px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.admin-menu a:hover {
  color: #007bff;
}

.admin-container .alert {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Tema ana rengi – base.html.twig'deki --primary-color (varsayılan #206bc4) */
.text-primary { color: var(--primary-color, #206bc4); }
.hover\:text-primary:hover { color: var(--primary-color, #206bc4); }
.group:hover .group-hover\:text-primary { color: var(--primary-color, #206bc4); }

/* Portal tab butonları – data-[active=true] Tailwind CDN parse hatası verdiği için theme.css'te */
.portal-tab-btn {
  border-bottom: 2px solid transparent;
}

.portal-tab-btn:hover {
  color: #1a252f;
  border-color: #d1d5db;
}

.portal-tab-btn[data-active="true"] {
  border-color: var(--primary-color, #206bc4);
  color: var(--primary-color, #206bc4);
}

/* Duyuru badge stilleri (header + forum bölümü) */
.announcement-badge-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.announcement-badge-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.announcement-badge-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.announcement-badge-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.announcement-badge-primary {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
}

.announcement-badge-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* ========================================================
   MOBILE RESPONSIVE OVERRIDES
   ======================================================== */

/* ── Post Body / Prose genel taşma koruması (tüm ekranlar) ── */
.post-body,
.post-content {
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.post-body > *,
.post-content > * {
  max-width: 100%;
}

/* Prose / post content içindeki tabloları kaydırılabilir yap */
.post-body table,
.post-content table,
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Pre/code blokları taşmasın */
.post-body pre,
.post-content pre,
.prose pre {
  overflow-x: auto;
  max-width: 100%;
}

/* Inline img koruma */
.post-body img,
.post-content img,
.prose img {
  max-width: 100%;
  height: auto;
}

/* iframe koruma */
.post-body iframe,
.post-content iframe,
.prose iframe {
  max-width: 100%;
}

/* Sidebar widget HTML taşma koruması */
.sidebar-widget-html {
  overflow-x: auto;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.sidebar-widget-html img {
  max-width: 100%;
  height: auto;
}

.sidebar-widget-html table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* ── MOBIL (< 768px) ── */
@media (max-width: 767px) {

  /* Genel overflow engelle */
  html,
  body {
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Ana sayfa container taşma önle */
  .mfbb-page-container,
  #mfbb-page-container {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* ── Header ── */
  #header-bar .flex.items-center.justify-between {
    gap: 0.5rem;
  }

  /* Logo mobilde küçült */
  #header-bar img[style*="height:50px"] {
    height: 36px !important;
    max-width: 160px !important;
  }

  #header-bar img[alt=""][class*="h-6"] {
    width: 22px;
    height: 22px;
  }

  /* ── Breadcrumb kaydırılabilir ── */
  nav[aria-label="Breadcrumb"] ol {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav[aria-label="Breadcrumb"] ol::-webkit-scrollbar {
    display: none;
  }

  /* ── Konu başlık barı (showthread) ── */
  [class*="bg-"][class*="text-white"][class*="rounded-t-lg"][class*="font-semibold"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  [class*="bg-"][class*="text-white"][class*="rounded-t-lg"][class*="font-semibold"] > span:first-child {
    font-size: 0.875rem;
    line-height: 1.3;
    word-break: break-word;
    max-width: 100%;
  }

  /* Konu başlığı buton alanı: wrap yap */
  [class*="bg-"][class*="text-white"][class*="rounded-t-lg"][class*="font-semibold"] .flex-shrink-0 {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  /* Butonlar mobilde daha küçük */
  [class*="bg-"][class*="text-white"][class*="rounded-t-lg"][class*="font-semibold"] .flex-shrink-0 form,
  [class*="bg-"][class*="text-white"][class*="rounded-t-lg"][class*="font-semibold"] .flex-shrink-0 a,
  [class*="bg-"][class*="text-white"][class*="rounded-t-lg"][class*="font-semibold"] .flex-shrink-0 > div {
    flex-shrink: 0;
  }

  /* ── Post action bar (cevapla, alıntıla, paylaş) ── */
  article .flex.items-center.gap-3.text-xs {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  /* Post alt aksiyon barı */
  .post-body + * + .flex.flex-wrap,
  article > div > .flex.flex-wrap {
    gap: 0.25rem 0.375rem;
  }

  /* ── Post gövdesi mobilde ── */
  .prose,
  .post-content,
  .post-body {
    font-size: 0.9375rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .prose img,
  .post-content img,
  .post-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  .prose blockquote,
  .post-content blockquote,
  blockquote[data-author],
  .mfbb-quote {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Prose tabloları mobilde kaydırılabilir */
  .prose table,
  .post-content table,
  .post-body table {
    font-size: 0.8125rem;
  }

  /* ── IPS Forum Blokları (index sayfası) ── */
  .ips-forum-block {
    flex-direction: column !important;
  }

  .ips-forum-info {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #d9d9d9;
    padding: 12px !important;
  }

  .ips-topic-list {
    width: 100% !important;
  }

  .ips-topic-title {
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .ips-topic-comments {
    margin-left: 8px !important;
    white-space: normal !important;
    font-size: 12px;
  }

  .ips-topic-item {
    padding: 10px 12px !important;
  }

  .ips-forum-image {
    max-height: 180px;
    object-fit: cover;
  }

  .ips-forum-no-image-placeholder {
    height: 100px !important;
    font-size: 28px !important;
  }

  .ips-category-header {
    font-size: 15px !important;
    padding: 10px 14px !important;
  }

  .ips-forum-title {
    font-size: 15px !important;
  }

  .ips-forum-desc {
    font-size: 13px !important;
  }

  /* ── Sayfalama kompakt ── */
  .flex.items-center.gap-1 a[class*="px-2"] {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }

  /* ── Son olaylar kartı ── */
  .son-olaylar-card {
    min-height: 280px !important;
    max-height: none !important;
  }

  .son-olaylar-card .portal-tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  /* ── Admin panel: Summernote editör mobil uyumu ── */
  .note-editor {
    min-height: 200px;
  }

  .note-editor .note-editable {
    min-height: 200px;
  }

  .note-editor .note-toolbar {
    padding: 0.125rem 0.25rem;
  }

  .note-editor .note-toolbar .note-btn-group {
    margin-right: 0.125rem;
  }

  .note-editor .note-toolbar .btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
  }

  /* ── Forum açıklama kutusu & duyurular ── */
  .forum-announcements-box {
    padding: 1rem;
  }

  .announcement-item,
  .announcement-forum-item {
    flex-direction: row;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  /* ── Footer grid ── */
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Footer credit barı */
  footer [class*="inline-flex"][class*="flex-wrap"] {
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.6875rem;
  }

  /* ── Lightbox mobilde ── */
  #mfbb-lightbox img {
    max-width: 95vw;
    max-height: 80vh;
  }

  /* ── Profil: Cover görseli ── */
  [class*="h-48"] {
    height: 8rem;
  }

  /* ── Modal'lar mobilde tam genişlik ── */
  .fixed[class*="left-1/2"][class*="top-1/2"],
  .fixed[class*="-translate-x-1/2"][class*="-translate-y-1/2"] {
    width: calc(100% - 2rem) !important;
    max-width: none !important;
    left: 1rem !important;
    right: 1rem !important;
    transform: translateY(-50%) !important;
  }

  /* ── Portal kartları mobilde ── */
  .portal-card-item {
    padding: 0.5rem !important;
  }

  /* ── Toplu mesaj işlemleri barı ── */
  #posts-bulk-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  #posts-bulk-bar .flex.items-center.gap-2 {
    width: 100%;
    flex-wrap: wrap;
  }

  #posts-bulk-bar button {
    flex: 1;
    text-align: center;
  }

  /* ── Reklam alanları ── */
  .ads-slot {
    overflow: hidden;
  }

  .ads-slot .ad-item {
    max-width: 100%;
    overflow: hidden;
  }

  /* ── Conversation / mesaj sayfası ── */
  .flex.items-center.gap-4.p-4 img[class*="h-12"] {
    width: 40px;
    height: 40px;
  }

  /* ── Genel buton ve form taşma korumaları ── */
  .flex.justify-end.gap-3,
  .flex.gap-3.pt-2 {
    flex-wrap: wrap;
  }

  .flex.justify-end.gap-3 button,
  .flex.justify-end.gap-3 a,
  .flex.gap-3.pt-2 button,
  .flex.gap-3.pt-2 a {
    flex-shrink: 0;
  }

  /* Form padding düzeltmeleri */
  .p-6 {
    padding: 1rem;
  }

  .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Mod rapor tablosu */
  .divide-y.divide-gray-100 > div {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Genel metin taşma koruması */
  h1, h2, h3,
  .font-semibold,
  .font-bold {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* ── User dropdown pozisyonu ── */
  #auth-nav-container .absolute[class*="w-56"],
  #auth-nav-container .absolute[class*="w-80"] {
    position: fixed;
    right: 0.5rem;
    left: auto;
    top: auto;
    z-index: 9999;
    max-width: calc(100vw - 1rem);
  }

  /* ── Inline yanıt ağacı mobilde ── */
  .post-body + div[class*="border-t"] {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .post-body + div[class*="border-t"] [class*="pl-8"] {
    padding-left: 1.5rem;
  }

  /* ── Profil sayfası tab grid ── */
  [class*="grid-cols-3"][class*="gap-"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Arama sayfası filtreler ── */
  [class*="grid-cols-1"][class*="md\:grid-cols-2"][class*="lg\:grid-cols-4"] {
    grid-template-columns: 1fr !important;
  }

  /* Postbit signature mobilde */
  .post-signature {
    font-size: 0.8125rem;
    overflow-x: auto;
  }

  .post-signature img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* ── Tablet (768px - 1023px) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .son-olaylar-card {
    max-height: 480px !important;
  }

  /* IPS Forum blokları tablette */
  .ips-forum-info {
    width: 40% !important;
  }
  .ips-topic-list {
    width: 60% !important;
  }
}

/* ── Küçük ekranlar (<375px) ── */
@media (max-width: 374px) {
  #header-bar {
    padding: 0.5rem 0;
  }

  .portal-tab-btn {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.6875rem !important;
  }

  .prose,
  .post-content,
  .post-body {
    font-size: 0.875rem;
  }

  /* IPS blokları daha da sıkı */
  .ips-topic-avatar {
    width: 28px !important;
    height: 28px !important;
    margin-right: 8px !important;
  }

  .ips-topic-comments {
    display: none !important;
  }

  .ips-forum-title {
    font-size: 14px !important;
  }
}

/* ── Safe area support (notch'lu telefonlar) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  #posts-bulk-bar {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}

/* ── Tab scrollbar gizle ── */
.son-olaylar-card > div:first-child {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.son-olaylar-card > div:first-child::-webkit-scrollbar {
  display: none;
}

.son-olaylar-card nav[role="tablist"] {
  scrollbar-width: none;
}

.son-olaylar-card nav[role="tablist"]::-webkit-scrollbar {
  display: none;
}

/* Panel içi scrollbar gizle */
.portal-tab-panels,
.portal-tab-panel {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.portal-tab-panels::-webkit-scrollbar,
.portal-tab-panel::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.portal-tab-panels::-webkit-scrollbar-thumb,
.portal-tab-panel::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.25);
  border-radius: 4px;
}

.portal-tab-panels:hover::-webkit-scrollbar-thumb,
.portal-tab-panel:hover::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
}

/* ── Video embed ── */
.mfbb-media-embed.ratio.ratio-16x9,
.mfbb-media-embed {
  position: relative;
  width: 100%;
  max-width: min(100%, 900px);
  overflow: hidden;
  margin: 0.75em 0;
}
.mfbb-media-embed.ratio-16x9::before,
.ratio.ratio-16x9::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.mfbb-media-embed iframe,
.ratio.ratio-16x9 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.prose .mfbb-media-embed,
.post-content .mfbb-media-embed,
[class*="prose"] .mfbb-media-embed {
  max-width: min(100%, 900px);
  min-height: 0;
}

/* ── Konu sayfası: mesaj scrubber (sağ rail) ── */
/* tailwind.css derlemesinde overflow-x-hidden olmayabiliyor; kritik düzen burada */
.mfbb-showthread-card {
  overflow-x: hidden;
}

/* fixed: mesaj sütununun sağında; DOM mfbb-page-container dışında; konum theme.js (#thread-posts-region) */
.mfbb-topic-post-scrubber {
  display: none;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  width: 2.75rem;
  padding: 0.4rem 0.25rem;
  gap: 0.35rem;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(229, 231, 235, 0.65);
  border-radius: 0.625rem;
  box-shadow: 0 4px 18px rgba(26, 37, 47, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;
}

@media (min-width: 1024px) {
  .mfbb-topic-post-scrubber {
    display: flex;
  }
}

.mfbb-topic-post-scrubber:hover,
.mfbb-topic-post-scrubber:focus-within {
  background: rgba(255, 255, 255, 0.98);
  border-color: #e5e7eb;
  box-shadow: 0 8px 28px rgba(26, 37, 47, 0.14);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .mfbb-topic-post-scrubber {
    transition: none;
  }
}

.mfbb-topic-post-scrubber__navbtn {
  flex-shrink: 0;
  width: 2.125rem;
  height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 0.375rem;
  border: 1px solid rgba(229, 231, 235, 0.75);
  background: rgba(248, 250, 252, 0.65);
  color: #1a252f;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mfbb-topic-post-scrubber:hover .mfbb-topic-post-scrubber__navbtn:not(:disabled),
.mfbb-topic-post-scrubber:focus-within .mfbb-topic-post-scrubber__navbtn:not(:disabled) {
  background: #fff;
  border-color: #e2e8f0;
}

.mfbb-topic-post-scrubber__navbtn:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.mfbb-topic-post-scrubber__navbtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mfbb-topic-post-scrubber__dots {
  flex: 1 1 auto;
  min-height: 2rem;
  max-height: min(42vh, 280px);
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0;
}

.mfbb-topic-post-scrubber__readout {
  width: 100%;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.1rem;
  padding-top: 0.35rem;
}

#thread-posts-region article[id^="post-"] {
  scroll-margin-top: 0.75rem;
}

#thread-posts-region > article[id^="post-"] {
  margin: 0 0.75rem 5px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.topic-post-scrubber__track {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.topic-post-scrubber__track::-webkit-scrollbar {
  width: 4px;
}

.topic-post-scrubber__track::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 4px;
}

.topic-post-scrubber__dot.topic-post-scrubber__dot--active {
  background-color: #1a252f;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #206bc4;
}
