/* ==========================================================
   MyMuhit — style.css
   iPhone 11 boyutu: 414 × 896 px
   Strateji: html = masaüstü sahne, body = telefon kasası
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --phone-w: 414px;
  --phone-h: 896px;
  --nav-h:   60px;
  --topbar-h: 56px;
  --notch-h: 44px;           /* iPhone 11 status bar alanı */

  /* Renk paleti — Nextdoor/Instagram ferahlığı */
  --bg:        #ffffff;
  --bg-soft:   #f4f5f7;
  --bg-card:   #ffffff;
  --bg-input:  #f0f2f5;

  --text-1: #0d0d0d;
  --text-2: #6b7280;
  --text-3: #9ca3af;

  --accent:       #1a6ef5;
  --accent-dim:   #e8f0fe;
  --accent-dark:  #1558d4;

  --green:  #16a34a;
  --red:    #dc2626;
  --amber:  #d97706;
  --teal:   #0d9488;

  --border:   #e5e7eb;
  --border-2: #d1d5db;

  --shadow-card: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-nav:  0 -1px 0 rgba(0,0,0,.06), 0 -4px 24px rgba(0,0,0,.04);
  --shadow-phone: 0 40px 100px rgba(0,0,0,.40), 0 10px 30px rgba(0,0,0,.25);

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-pill: 999px;
  --r-phone: 55px;   /* iPhone 11 köşe yarıçapı */

  --font: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── MASAÜSTÜ SAHNESİ ────────────────────────────────────── */
html {
  min-height: 100%;
  background: #1a1a2e;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(26,110,245,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(13,148,136,.14) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 90%, rgba(220,38,38,.08) 0%, transparent 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  font-family: var(--font);
}

/* ── TELEFON KASASI (body = iPhone 11) ───────────────────── */
body {
  position: relative;
  width:  var(--phone-w);
  height: var(--phone-h);
  min-height: var(--phone-h);
  max-height: var(--phone-h);
  overflow: hidden;

  background: var(--bg-soft);
  border-radius: var(--r-phone);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-1);

  /* Kasanın dış çerçevesi */
  box-shadow:
    0 0 0 2px #2a2a4a,
    0 0 0 10px #111120,
    0 0 0 12px #2a2a4a,
    var(--shadow-phone);

  /* iPhone 11 — yandan fark edilir geniş bezeli görünüm */
  outline: 14px solid #111120;
  outline-offset: 2px;
}

/* Notch çentiği */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 30px;
  background: #111120;
  border-radius: 0 0 22px 22px;
  z-index: 9999;
  pointer-events: none;
}

/* Status bar şeridi (notch altı beyaz dolgu) */
body::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--notch-h);
  background: var(--bg);
  border-radius: var(--r-phone) var(--r-phone) 0 0;
  z-index: 9990;
  pointer-events: none;
}

/* ── TAB İÇERİKLERİ ──────────────────────────────────────── */
/* Her .tab-content tam alanı kaplar, kendi içinde kaydırılır */

.tab-content {
  display: none;
  position: absolute;
  top: var(--notch-h);            /* status bar altından başla */
  left: 0; right: 0;
  bottom: var(--nav-h);           /* bottom-nav üzerinde bit */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-soft);
  scrollbar-width: none;
}
.tab-content::-webkit-scrollbar { display: none; }

/* JS switchTab → display:block */
.tab-content[style*="display: block"],
.tab-content[style*="display:block"] {
  display: block;
}

/* Başlangıç: ilk sekme (akis) görünür */
#akis { display: block; }

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  height: 62px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 32px rgba(0,0,0,.28);
  display: flex;
  align-items: center;
  z-index: 900;
  border-radius: 999px;
  overflow: hidden;
  padding: 0 8px;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-3);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: color .15s var(--ease), background .15s var(--ease);
  padding: 8px 4px;
  border-radius: 999px;
}

.nav-btn i {
  font-size: 22px;
  transition: transform .2s var(--ease);
}

.nav-btn:active i { transform: scale(.85); }
.nav-btn:active    { background: var(--bg-soft); }

.nav-btn.active {
  color: var(--accent);
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  position: relative;
}

/* Aktif gösterge — ince üst çizgi */
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2.5px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}

.nav-btn i {
  font-size: 22px;
}

.nav-plus {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 2px 12px rgba(26,110,245,.4);
  transition: transform .15s;
}

.nav-plus:active {
  transform: scale(.93);
}

/* ── ÜST BAR ─────────────────────────────────────────────── */
.top-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -.5px;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  cursor: pointer;
}

.header-icons i {
  font-size: 22px;
  padding: 6px;
  border-radius: var(--r-md);
  transition: background .15s;
}

.header-icons i:active { background: var(--bg-soft); }

/* ── AKIŞ EKRANI ─────────────────────────────────────────── */
#akis .top-header {
  background: #fff;
}

#akis .top-header .logo {
  font-size: 20px;
  color: var(--accent);
}

.feed-container {
  padding: 12px 14px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Gönderi paylaşım kutusu */
.compose-box {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.compose-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.compose-placeholder {
  flex: 1;
  font-size: 14px;
  color: var(--text-3);
  background: var(--bg-input);
  border-radius: var(--r-pill);
  padding: 10px 14px;
  border: none;
  outline: none;
  font-family: var(--font);
}

/* Gönderi kartı */
.post-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.post-meta h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.post-meta p {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.post-body p {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.55;
}

/* Gönderi aksiyon satırı */
.post-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-soft);
  border: none;
  border-radius: var(--r-pill);
  padding: 6px 12px;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}

.post-action-btn:active {
  background: var(--accent-dim);
  color: var(--accent);
}

.post-action-btn.liked {
  color: var(--red);
  background: #fef2f2;
}

/* Muhtar rozeti */
.muhtar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--r-pill);
  padding: 2px 8px;
  margin-top: 3px;
}

/* ── MENÜ EKRANI — Telegram Stili ───────────────────────── */
.menu-container {
  padding-bottom: 80px;
  background: #f2f2f7;
  min-height: 100%;
}

/* Profil başlık — Telegram ortalı koyu */
.menu-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 16px 24px;
  background: #111120;
  position: relative;
}

/* Düzenle butonu */
.menu-edit-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; color: #fff; font-size: 13px; font-weight: 600;
  padding: 5px 16px; cursor: pointer; font-family: var(--font);
}

.menu-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  object-fit: cover; cursor: pointer;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #1a6ef5, #0d9488);
  color: #fff; font-size: 36px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.menu-avatar-initials {
  display: flex; align-items: center; justify-content: center;
}

.menu-header-name {
  color: #fff; font-size: 20px; font-weight: 700;
  text-align: center; margin-bottom: 4px;
}
.menu-header-sub {
  color: rgba(255,255,255,.55); font-size: 13px; text-align: center;
}

.menu-profile-info { display: none; }
.menu-profile-card { display: none; }
.menu-title { display: none; }
.menu-compact-bar { display: none; }
.menu-header-info { display: none; }
.menu-header-bg { display: none; }

/* Bölüm başlığı */
.menu-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #8e8e93;
  padding: 18px 16px 6px;
  text-transform: none;
  letter-spacing: 0;
}

/* Kart grubu — iOS ayarlar / Telegram gibi */
.menu-list {
  padding: 14px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-group {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #0d0d0d;
  text-decoration: none;
  transition: background .12s;
  position: relative;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font);
}

/* Telegram tarzı: ikon kutusu renkli */
.menu-item .menu-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: #fff;
}

/* Her ikon için farklı renk — Telegram renk paleti */
.menu-icon.blue   { background: #2196f3; }
.menu-icon.teal   { background: #0d9488; }
.menu-icon.green  { background: #34c759; }
.menu-icon.orange { background: #ff9500; }
.menu-icon.red    { background: #ff3b30; }
.menu-icon.purple { background: #af52de; }
.menu-icon.indigo { background: #5856d6; }
.menu-icon.pink   { background: #ff2d55; }
.menu-icon.amber  { background: #d97706; }
.menu-icon.gray   { background: #8e8e93; }
.menu-icon.cyan   { background: #32ade6; }

.menu-item-label {
  flex: 1;
  text-align: left;
}

/* Sağ ok — Telegram chevron */
.menu-item::after {
  content: '';
  width: 7px; height: 7px;
  border-top: 1.5px solid #c7c7cc;
  border-right: 1.5px solid #c7c7cc;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Ayırıcı çizgi */
.menu-item + .menu-item::before {
  content: '';
  position: absolute;
  top: 0; left: 58px; right: 0;
  height: 1px;
  background: #f2f2f7;
}

.menu-item:active {
  background: #f2f2f7;
}

/* Çıkış butonu kırmızı */
.menu-item.danger { color: #ff3b30; }
.menu-item.danger::after {
  border-color: #ffb3b0;
}

/* Toggle switch içeren menu-item'lerde CSS oku gizle */
.menu-item:has(.toggle-switch)::after { display: none; }
/* Statik değer gösteren (ok istemediğimiz) öğeler */
.menu-item.no-arrow::after { display: none; }
/* Ayarlar alt-ekranlarında explicit chevron ikonlarını standart ok ile değiştir */
.menu-item > .menu-item-chevron { color: #c7c7cc; font-size: 16px; flex-shrink: 0; }

/* ── İLAN KATEGORİ BAR ───────────────────────────────────── */
.ilan-kat-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 12px 4px;
  scrollbar-width: none;
}
.ilan-kat-bar::-webkit-scrollbar { display: none; }

.ilan-kat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: .65;
  transition: opacity .15s;
}
.ilan-kat.active { opacity: 1; }
.ilan-kat.active .ilan-kat-ikon { box-shadow: 0 0 0 2.5px currentColor; }

.ilan-kat-ikon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform .15s, box-shadow .15s;
}
.ilan-kat:active .ilan-kat-ikon { transform: scale(.9); }

.ilan-kat span {
  font-size: 10px;
  font-weight: 600;
  color: #374151;
  letter-spacing: .1px;
}

/* dinamik-ilanlar sarmalayıcısı grid'e sığsın */
#dinamik-ilanlar { display: contents; }

/* ── İLAN GRID KARTI ─────────────────────────────────────── */
.ilan-gkart {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  border: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
}
.ilan-gkart-foto {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.ilan-gkart-foto-yok {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ilan-gkart-ic {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.ilan-gbadge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .4px;
  align-self: flex-start;
}
.ilan-gkart-baslik {
  font-size: 12px;
  font-weight: 700;
  color: #0d0d0d;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}
.ilan-gkart-fiyat {
  font-size: 14px;
  font-weight: 800;
  color: #0d9488;
  margin-top: 1px;
}
.ilan-gkart-meta {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 1px;
}

/* ── PAYLAŞIM MODAL KARTLARI ─────────────────────────────── */
.paylasim-karti {
  background: var(--kart-bg, #f4f5f7);
  border: 1.5px solid rgba(0,0,0,.06);
  padding: 16px 10px;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.paylasim-karti:active {
  transform: scale(.95);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border-color: var(--kart-renk, #1a6ef5);
}
.paylasim-karti-ikon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.paylasim-karti-baslik {
  font-size: 13px;
  font-weight: 800;
  color: #0d0d0d;
  letter-spacing: -.2px;
  line-height: 1.2;
  text-align: center;
}
.paylasim-karti-aciklama {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  line-height: 1.3;
  margin-top: -4px;
  text-align: center;
}

/* Gizlilik seçenek satırı seçiliyken arkaplan vurgusu */
.gorsel-gizlilik-secili { background: var(--bg-soft) !important; }
.gorsel-gizlilik-secili::after { display: none !important; }

/* ── PROFİL / GÜVENLİK / GENEL BAKIŞ İÇ EKRANLAR ──────── */
/* Bunlar padding:16px ile HTML'de tanımlı;
   .tab-content overflow-y:auto ile kaydırılır */

/* Profil formu inputları temizle */
#profil_ekran input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, background .2s;
}

#profil_ekran input[type="text"]:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26,110,245,.08);
}

#profil_ekran input[type="text"]::placeholder { color: var(--text-3); }

/* Profil kaydet butonu */
#profil_ekran button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,110,245,.35);
  transition: all .2s;
}

#profil_ekran button[type="submit"]:active {
  transform: scale(.97);
  box-shadow: 0 2px 8px rgba(26,110,245,.25);
}

/* HTML'deki inline kartlar (tüm sekmelerde) */
.post-card,
div[style*="background-color: #1e293b"],
div[style*="background: linear-gradient(135deg, #ef4444"],
div[style*="background: linear-gradient(135deg, #0f172a"] {
  border-radius: var(--r-xl) !important;
  margin-bottom: 12px;
}

/* ── BUTONLAR (HTML inline butonları dahil) ──────────────── */
button:not(.nav-btn):not(#profil_ekran button[type="submit"]):not(.post-action-btn) {
  border-radius: var(--r-pill) !important;
  font-family: var(--font) !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all .15s !important;
}

/* ── BOŞ DURUM ───────────────────────────────────────────── */
.tab-content > div[style*="text-align: center"][style*="margin-top: 50px"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
}

/* ── KAYDIRMA ÇUBUĞU ─────────────────────────────────────── */
.tab-content {
  scrollbar-width: none;
}

/* ── MOBİL (gerçek telefon) ──────────────────────────────── */
/* Gerçek telefonda kasayı kaldır, tam ekran ol */
@media (max-width: 500px) {
  html {
    display: block;
    padding: 0;
    background: var(--bg-soft);
    min-height: 100dvh;
  }

  body {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    outline: none;
  }

  body::before,
  body::after {
    display: none;
  }

  .tab-content {
    top: 0;
  }

  .bottom-nav {
    border-radius: 0;
  }
}

/* ── ERİŞİLEBİLİRLİK ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}