/* === XDA TARZI REFINED DESIGN === */

/* İkon Kutusu (XDA'daki gibi) */
.icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #a8a8a8;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.icon-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, currentColor, transparent 70%);
  opacity: 0.06;
}

.icon-box svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

/* Renkli ikon kutuları */
.icon-box.green  { color: #4ade80; background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.15); }
.icon-box.blue   { color: #60a5fa; background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.15); }
.icon-box.purple { color: #c084fc; background: rgba(168, 85, 247, 0.08); border-color: rgba(168, 85, 247, 0.15); }
.icon-box.orange { color: #fb923c; background: rgba(249, 115, 22, 0.08); border-color: rgba(249, 115, 22, 0.15); }
.icon-box.pink   { color: #f472b6; background: rgba(236, 72, 153, 0.08); border-color: rgba(236, 72, 153, 0.15); }
.icon-box.yellow { color: #fbbf24; background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.15); }
.icon-box.red    { color: #f87171; background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.15); }
.icon-box.cyan   { color: #22d3ee; background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.15); }

/* Kategori kartı (XDA tarzı) */
.forum-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(20, 20, 22, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  position: relative;
}

.forum-card:hover {
  background: rgba(26, 26, 28, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.forum-card-body {
  flex: 1;
  min-width: 0;
}

.forum-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0f0f0;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.forum-card-desc {
  font-size: 0.82rem;
  color: #6b6b6b;
  line-height: 1.45;
  margin: 0 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.forum-card-stats {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: #6b6b6b;
  font-weight: 500;
}

.forum-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.forum-card-stats svg {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.forum-card-stats strong {
  color: #a8a8a8;
  font-weight: 600;
}

/* Kategori grid (2 sütun) */
.forum-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .forum-grid { grid-template-columns: 1fr; }
}

/* Bölüm başlığı (XDA'daki "General Discussion" gibi) */
.forum-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.forum-section-head h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f0f0f0;
  margin: 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forum-section-head h2::before {
  content: '';
  width: 3px;
  height: 16px;
  background: #22c55e;
  border-radius: 2px;
}

.forum-section-head .view-all {
  font-size: 0.78rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.forum-section-head .view-all:hover {
  color: #93c5fd;
}

/* Kompakt sayı formatı */
.compact-num {
  font-feature-settings: 'tnum';
  font-weight: 600;
}

/* Sidebar kategori link - XDA tarzı */
.side-link-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #a8a8a8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.12s ease;
}

.side-link-cat:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f0f0f0;
}

.side-link-cat .cat-icon-mini {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.side-link-cat .cat-icon-mini svg {
  width: 15px;
  height: 15px;
}

.side-link-cat .cat-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Renkli kategori noktaları (sidebar için) */
.cat-color-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Konu sayıları - sidebar sağda */
.side-count-new {
  font-size: 0.7rem;
  color: #5a5a5a;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.side-link-cat:hover .side-count-new {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

/* Header iyileştirme */
.site-header {
  height: 58px !important;
}

.brand-text {
  font-size: 1.1rem !important;
  letter-spacing: -0.035em !important;
}

/* Sidebar active link - XDA tarzı */
.side-link.active::before {
  left: -12px !important;
}

/* Empty state */
.empty-state-modern {
  padding: 48px 20px;
  text-align: center;
  color: #5a5a5a;
  font-size: 0.88rem;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
}

/* Tag pill iyileştirme */
.tag-pill-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Thread satırı - XDA benzeri */
.thread-row-refined {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(20, 20, 22, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  margin-bottom: 8px;
}

.thread-row-refined:hover {
  background: rgba(26, 26, 28, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.thread-row-refined .thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-size: 0.9rem;
}

.thread-row-refined .thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thread-row-refined .thread-body {
  flex: 1;
  min-width: 0;
}

.thread-row-refined .thread-title-new {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.thread-row-refined .thread-meta-new {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: #6b6b6b;
  flex-wrap: wrap;
}

.thread-row-refined .thread-meta-new strong {
  color: #a8a8a8;
  font-weight: 600;
}

.thread-row-refined .thread-stats-new {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #6b6b6b;
}

.thread-row-refined .thread-stats-new span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Kart hover efekti iyileştirme */
.forum-card:hover .icon-box {
  transform: scale(1.05);
  border-color: rgba(34, 197, 94, 0.25);
}

/* Section head view-all link */
.view-all-link {
  font-size: 0.75rem;
  color: #6b6b6b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.12s ease;
  padding: 4px 8px;
  border-radius: 5px;
}

.view-all-link:hover {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.08);
}

/* Compact number formatting */
.num-compact {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Hero actions - dikdörtgen butonlar */
.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}

.hero-btn-primary {
  background: linear-gradient(180deg, #2dd675 0%, #22c55e 100%);
  color: #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 2px 8px rgba(34, 197, 94, 0.25);
}

.hero-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  filter: brightness(1.05);
}

.hero-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #d4d4d4;
}

.hero-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

/* Sidebar'ı sol kenara yapıştır */
body .layout-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
}

body .site-sidebar,
body aside.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body .layout-main {
  padding-left: 32px !important;
}

/* Sidebar'ın iç boşluğu */
.sidebar {
  padding: 20px 14px 40px 20px !important;
}

/* Mobile'da tekrar padding */
@media (max-width: 900px) {
  body .layout-main {
    padding: 16px 14px 60px !important;
  }
}

/* === TS | DEV Badge === */
.ts-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

.ts-dev-badge .ts-part {
  color: #4ade80;
}

.ts-dev-badge .ts-sep {
  color: #4a4a4a;
  font-weight: 400;
}

.ts-dev-badge .dev-part {
  color: #a8a8a8;
}

/* === Sidebar Refined — Ana sayfadaki eski sidebar'ı düzelt === */
.sidebar-refined {
  padding: 16px 12px 40px 16px !important;
  background: #0c0c0e !important;
}

/* Ana sayfadaki side-link'leri XDA tarzına çevir */
.sidebar-refined .side-link {
  padding: 7px 10px !important;
  border-radius: 7px !important;
  font-size: 0.83rem !important;
  font-weight: 500 !important;
  color: #a8a8a8 !important;
  letter-spacing: -0.005em !important;
  transition: all 0.12s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  position: relative !important;
}

.sidebar-refined .side-link:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #f0f0f0 !important;
}

.sidebar-refined .side-link.active {
  background: rgba(34, 197, 94, 0.1) !important;
  color: #34d97a !important;
  font-weight: 600 !important;
}

.sidebar-refined .side-link.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #22c55e;
  border-radius: 0 2px 2px 0;
}

.sidebar-refined .side-icon {
  width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  opacity: 0.7 !important;
}

.sidebar-refined .side-count {
  font-size: 0.68rem !important;
  color: #5a5a5a !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 1px 7px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  margin-left: auto !important;
}

.sidebar-refined .side-link:hover .side-count {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
}

.sidebar-refined .side-label {
  font-size: 0.62rem !important;
  color: #4a4a4a !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  padding: 0 10px !important;
  margin-bottom: 6px !important;
  margin-top: 4px !important;
}

.sidebar-refined .side-section {
  margin-bottom: 18px !important;
}

/* Sidebar sol kenara yapıştır - gap kaldır */
body .layout-wrap,
body .layout-wrap.layout-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
}

body .site-sidebar,
body aside.site-sidebar,
body aside.sidebar,
body .sidebar-refined {
  padding: 16px 12px 40px 20px !important;
  margin: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  position: sticky !important;
  top: 56px !important;
  height: calc(100vh - 56px) !important;
}

/* index.html sidebar'ı için de aynı */
body .sidebar.sidebar-refined {
  padding: 16px 12px 40px 20px !important;
}

/* Layout grid'i düzelt */
body .layout-wrap {
  display: grid !important;
  grid-template-columns: 260px 1fr !important;
}

/* Main içeriği sola yakın tut */
body .layout-main {
  padding-left: 32px !important;
  padding-right: 32px !important;
}

/* Mobile'da grid tek sütun */
@media (max-width: 900px) {
  body .layout-wrap {
    grid-template-columns: 1fr !important;
  }
  body .layout-main {
    padding: 16px 14px 60px !important;
  }
}

/* Ana sayfa sidebar fix — body altında direkt olan */
body > aside#sidebar,
body > aside.site-sidebar,
body > aside.sidebar-refined {
  position: fixed !important;
  left: 0 !important;
  top: 56px !important;
  bottom: 0 !important;
  width: 260px !important;
  padding: 20px 12px 40px 20px !important;
  background: #0c0c0e !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  overflow-y: auto !important;
  z-index: 30 !important;
}

/* Ana sayfa içeriği sidebar'ın sağına kaydır */
body > .layout-main,
body > main,
body > main.main,
body > .content-wrap {
  margin-left: 260px !important;
}

/* Ana sayfadaki main içeriği için özel padding */
body > .layout-main {
  padding: 28px 32px 60px !important;
}

/* Mobile'da geçersiz kıl */
@media (max-width: 900px) {
  body > aside#sidebar,
  body > aside.site-sidebar {
    position: fixed !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 45 !important;
  }
  body > aside#sidebar.open,
  body > aside.site-sidebar.open {
    transform: translateX(0) !important;
  }
  body > .layout-main,
  body > main,
  body > .content-wrap {
    margin-left: 0 !important;
    padding: 16px 14px 60px !important;
  }
}

/* Scrollbar */
body > aside#sidebar::-webkit-scrollbar { width: 4px; }
body > aside#sidebar::-webkit-scrollbar-thumb { background: #232323; border-radius: 2px; }

/* Ana sayfa sidebar fix — class="main" için */
body > main.main {
  margin-left: 260px !important;
  padding: 28px 32px 60px !important;
  min-height: calc(100vh - 56px) !important;
}

/* Ana sayfadaki main içindeki content-wrap */
body > main.main .content-wrap,
body > main.main > div {
  max-width: 100% !important;
}

/* Sidebar fixed pozisyon */
body > aside#sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 56px !important;
  bottom: 0 !important;
  width: 260px !important;
  padding: 20px 12px 40px 20px !important;
  background: #0c0c0e !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  overflow-y: auto !important;
  z-index: 30 !important;
}

/* Mobile'da main margin sıfırla */
@media (max-width: 900px) {
  body > main.main {
    margin-left: 0 !important;
    padding: 16px 14px 60px !important;
  }
  body > aside#sidebar {
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 45 !important;
  }
  body > aside#sidebar.open {
    transform: translateX(0) !important;
  }
}

/* Sidebar scrollbar */
body > aside#sidebar::-webkit-scrollbar { width: 4px; }
body > aside#sidebar::-webkit-scrollbar-thumb { background: #232323; border-radius: 2px; }

/* === KESİN ÇÖZÜM: .layout içindeki sidebar === */
.layout {
  display: grid !important;
  grid-template-columns: 260px 1fr !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  padding-top: 56px !important;
  min-height: 100vh !important;
}

.layout > aside#sidebar,
.layout > aside.site-sidebar,
.layout > aside.sidebar-refined {
  position: sticky !important;
  top: 56px !important;
  height: calc(100vh - 56px) !important;
  width: 260px !important;
  padding: 20px 12px 40px 20px !important;
  background: #0c0c0e !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  overflow-y: auto !important;
  margin: 0 !important;
  z-index: 30 !important;
}

.layout > main.main,
.layout > main {
  padding: 28px 32px 60px !important;
  margin: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Mobile */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr !important;
    padding-top: 56px !important;
  }
  .layout > aside#sidebar {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    height: calc(100vh - 56px) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 45 !important;
  }
  .layout > aside#sidebar.open {
    transform: translateX(0) !important;
  }
  .layout > main.main {
    padding: 16px 14px 60px !important;
  }
}

/* Scrollbar */
.layout > aside#sidebar::-webkit-scrollbar { width: 4px; }
.layout > aside#sidebar::-webkit-scrollbar-thumb { background: #232323; border-radius: 2px; }

/* === DÜZ SİYAH ARKA PLAN === */
body {
  background: #0a0a0c !important;
}

.grid-bg {
  display: none !important;
}

/* === KONULAR GRID (2 SÜTUN) === */
#threads,
.threads-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

#threads > * {
  margin-bottom: 0 !important;
  height: 100% !important;
}

@media (max-width: 900px) {
  #threads {
    grid-template-columns: 1fr !important;
  }
}

/* === YENİ KONU BUTONU EMOJİSİZ === */
.btn-new .btn-emoji,
.btn-new .emoji {
  display: none !important;
}

.btn-new .btn-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-new .btn-icon svg {
  width: 14px !important;
  height: 14px !important;
}

/* === ARAMA KUTUSU SVG İKON === */
.header-search::before,
.search-box::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-size: 16px 16px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 0.7 !important;
  font-size: 0 !important;
}

/* === MOBILE FIX — Kesin Çözüm === */
@media (max-width: 900px) {
  
  /* Header */
  .site-header,
  header {
    height: 52px !important;
    padding: 0 12px !important;
    gap: 8px !important;
  }
  
  .brand-text {
    font-size: 0.95rem !important;
  }
  
  .brand-icon {
    width: 26px !important;
    height: 26px !important;
  }
  
  /* Arama kutusu mobile'da gizle */
  .header-search,
  #layoutSearch,
  #headerSearch {
    display: none !important;
  }
  
  /* Hamburger menü */
  .hamburger {
    display: flex !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e5e5e5 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    padding: 0 !important;
    margin-right: 8px !important;
    cursor: pointer !important;
  }
  
  /* Layout: tek sütun */
  .layout-wrap,
  .layout {
    grid-template-columns: 1fr !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 52px !important;
    max-width: 100% !important;
  }
  
  /* Sidebar: gizli, drawer olarak açılır */
  .layout > aside#sidebar,
  .layout-wrap > aside.site-sidebar,
  aside.site-sidebar,
  aside.sidebar,
  aside#sidebar {
    position: fixed !important;
    top: 52px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    padding: 16px 12px 40px 16px !important;
    background: #0a0a0c !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 100 !important;
    overflow-y: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
  
  .layout > aside#sidebar.open,
  .layout-wrap > aside.site-sidebar.open,
  aside.site-sidebar.open,
  aside.sidebar.open,
  aside#sidebar.open {
    transform: translateX(0) !important;
  }
  
  /* Sidebar overlay */
  .sidebar-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    top: 52px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 95 !important;
  }
  
  .sidebar-overlay.active {
    display: block !important;
  }
  
  /* Main içerik */
  .layout > main.main,
  .layout-wrap > main.layout-main,
  main.main,
  main.layout-main,
  main {
    margin-left: 0 !important;
    padding: 16px 14px 60px !important;
    min-height: calc(100vh - 52px) !important;
  }
  
  /* Konular grid: tek sütun */
  #threads,
  .threads-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  /* Sayfa başlığı kompakt */
  .page-title-compact,
  .page-title {
    font-size: 1.15rem !important;
  }
  
  .page-sub-compact,
  .page-sub {
    font-size: 0.8rem !important;
  }
  
  .page-header-compact {
    padding: 0 0 16px !important;
    margin-bottom: 16px !important;
  }
  
  /* TS | DEV badge küçült */
  .ts-dev-badge {
    font-size: 0.55rem !important;
    padding: 3px 8px !important;
    margin-bottom: 8px !important;
  }
  
  /* Section başlıkları */
  .sec-head,
  .forum-section-head {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .sec-head h2 {
    font-size: 0.9rem !important;
  }
  
  /* Yeni konu butonu */
  .btn-new {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
  
  /* Konu kartları */
  .thread-card,
  .thread-row {
    padding: 12px 14px !important;
  }
  
  .thread-card-title,
  .thread-title {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }
  
  .thread-card-meta,
  .thread-meta {
    font-size: 0.72rem !important;
  }
  
  /* Konu detay */
  .thread-main {
    padding: 16px !important;
  }
  
  .thread-h1 {
    font-size: 1.2rem !important;
    line-height: 1.3 !important;
  }
  
  /* Rich content */
  .rich-content {
    font-size: 0.9rem !important;
  }
  
  .rich-content h3 {
    font-size: 1.05rem !important;
  }
  
  .rich-content h4 {
    font-size: 0.95rem !important;
  }
  
  .rich-content pre {
    padding: 12px !important;
    font-size: 0.8rem !important;
    overflow-x: auto !important;
  }
  
  .rich-content table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }
  
  /* Yorumlar */
  .comment {
    padding: 14px !important;
  }
  
  .comment-head {
    font-size: 0.78rem !important;
  }
  
  /* Yorum alanı */
  .reply-area {
    margin-top: 18px !important;
  }
  
  /* Profile */
  .profile-head {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  .avatar-wrap {
    width: 96px !important;
    height: 96px !important;
  }
  
  .avatar-circle {
    width: 96px !important;
    height: 96px !important;
    font-size: 2.2rem !important;
  }
  
  .profile-name {
    font-size: 1.35rem !important;
    justify-content: center !important;
  }
  
  .profile-meta {
    justify-content: center !important;
  }
  
  /* Search / Members */
  .user-grid,
  .forum-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Notification dropdown */
  .notif-dropdown {
    width: calc(100vw - 24px) !important;
    right: -8px !important;
    max-width: 380px !important;
  }
  
  /* Hero actions */
  .hero-actions {
    flex-direction: column !important;
  }
  
  .hero-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Çok küçük ekranlar için ekstra */
@media (max-width: 400px) {
  .header-right a[href^="/profile/"] {
    max-width: 36px !important;
    padding: 4px !important;
  }
  .header-right .header-username {
    display: none !important;
  }
}

/* === MOBILE FIX v2 — index.html sidebar === */
@media (max-width: 900px) {
  
  /* Hamburger */
  .hamburger {
    display: flex !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e5e5e5 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    padding: 0 !important;
    margin-right: 8px !important;
    cursor: pointer !important;
    z-index: 60 !important;
  }
  
  /* Sidebar */
  #sidebar,
  .site-sidebar {
    position: fixed !important;
    top: 52px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    padding: 16px 12px 40px 16px !important;
    background: #0a0a0c !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 100 !important;
    overflow-y: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
  
  #sidebar.open,
  .site-sidebar.open {
    transform: translateX(0) !important;
  }
  
  /* Overlay */
  .sidebar-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    top: 52px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 95 !important;
  }
  
  .sidebar-overlay.active {
    display: block !important;
  }
  
  /* Main içerik */
  main.main,
  main.layout-main,
  main {
    margin-left: 0 !important;
    padding: 16px 14px 60px !important;
    width: 100% !important;
  }
  
  /* Layout */
  .layout {
    grid-template-columns: 1fr !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }
  
  /* Konular */
  #threads {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* Hamburger normalde gizli */
.hamburger {
  display: none;
}

@media (max-width: 900px) {
  .hamburger {
    display: flex !important;
  }
}

/* ==========================================
   SİTE GENEL LAYOUT KİLİTLEME (Overrides all)
   ========================================== */

/* 1. Grid yapısını zorla */
.layout, 
.layout-wrap {
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 56px !important; /* Header yüksekliği */
  max-width: 100vw !important;
  min-height: 100vh !important;
  background: #0a0a0c !important;
}

/* 2. Sidebar'ı sola yapıştır */
aside#sidebar,
aside.site-sidebar,
aside.sidebar-refined {
  position: sticky !important;
  top: 56px !important;
  height: calc(100vh - 56px) !important;
  width: 260px !important;
  max-width: 260px !important;
  padding: 20px 14px 40px 20px !important;
  background: #0a0a0c !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin: 0 !important;
  overflow-y: auto !important;
  z-index: 10 !important;
}

/* 3. Ana içerik alanını serbest bırak (Ortalamayı iptal et) */
main.main,
main.layout-main,
main,
.content-wrap {
  margin: 0 !important;
  padding: 28px 40px 60px 32px !important;
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 4. Ana sayfa 2 sütunlu konu grid'i */
#threads {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

#threads > a {
  margin-bottom: 0 !important;
  height: 100% !important;
}

/* 5. Mobil düzeltmeleri */
@media (max-width: 900px) {
  .layout, 
  .layout-wrap {
    grid-template-columns: 1fr !important;
    padding-top: 56px !important;
  }
  
  aside#sidebar,
  aside.site-sidebar {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    height: calc(100vh - 56px) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 50 !important;
  }
  
  aside#sidebar.open,
  aside.site-sidebar.open {
    transform: translateX(0) !important;
  }
  
  main.main,
  main.layout-main,
  main,
  .content-wrap {
    padding: 16px 14px 60px !important;
    margin-left: 0 !important;
  }
  
  #threads {
    grid-template-columns: 1fr !important;
  }
}

/* Footer'ı grid dışına taşı (tam genişlik) */
.site-footer {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  background: #0a0a0c !important;
}

/* Son nokta: Ne olursa olsun bu grid'i kimse bozamaz */
#threads {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

#threads > a {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#threads .thread-card-title {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

@media (max-width: 900px) {
  #threads {
    grid-template-columns: 1fr !important;
  }
}

/* === SORUNU KÖKÜNDEN ÇÖZEN SON KOD === */

/* 1. Ana yerleşimi tam ekrana yay */
.layout, .layout-wrap {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* 2. Ana içerik alanının sağa doğru genişlemesini sağla, sola sıkışmasını engelle */
main.main, main.layout-main, main {
  width: 100% !important;
  max-width: 100% !important;
  padding: 24px 32px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* 3. Konu listesini ZORLA 2 EŞİT sütun yap */
#threads {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important; /* Zorla eşit iki parça */
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 4. Sütunların içindeki uzun yazılar yüzünden genişlemesini engelle */
#threads > a {
  min-width: 0 !important; /* EN ÖNEMLİ KOD: Grid'in şişmesini engeller */
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* 5. Kart içindeki başlıkların taşmasını engelle, alt satıra geçir */
#threads .thread-card-title {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}

/* === REKLAM ALANLARI (PLACEHOLDER) === */
.ads-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #444;
  font-size: 0.75rem;
  font-family: monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 16px 0;
  overflow: hidden;
  position: relative;
}

/* Yatay Banner (Ana sayfa için) */
.ads-banner {
  width: 100%;
  height: 90px;
  grid-column: 1 / -1; /* Grid içindeyse iki sütunu da kapla */
}

/* Dikey Kutu (Sidebar için) */
.ads-sidebar {
  width: 100%;
  height: 250px;
  margin-bottom: 20px;
}

/* Konu İçi (Thread) */
.ads-in-thread {
  width: 100%;
  height: 120px;
  margin: 24px 0;
}

.ads-placeholder::before {
  content: 'REKLAM ALANI';
  color: #555;
}
.ads-placeholder::after {
  content: 'Google AdSense';
  font-size: 0.6rem;
  margin-top: 4px;
  color: #333;
}
