/* SOHBET SOKAĞI — Özel stiller (animasyonlar + tema köprüsü) */

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg, #FAF7F3);
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent, #FF5A3C); color: #fff; }

.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

@keyframes heart-pop {
  0% { transform: scale(0); opacity: 0; }
  15% { transform: scale(1.25); opacity: 1; }
  30% { transform: scale(0.92); }
  45% { transform: scale(1.05); }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4) translateY(-10px); opacity: 0; }
}
.animate-heart-pop { animation: heart-pop 0.9s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards; }

@keyframes flash-fade {
  0% { opacity: 0; transform: scale(1.4); }
  20% { opacity: 1; transform: scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.9); }
}
.animate-flash { animation: flash-fade 0.6s ease forwards; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.animate-scale-in { animation: scale-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-in { animation: fade-in 0.25s ease both; }

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, rgba(128,115,100,.08) 25%, rgba(128,115,100,.18) 37%, rgba(128,115,100,.08) 63%);
  background-size: 400px 100%;
  animation: shimmer 1.3s infinite linear;
}

@keyframes story-progress { from { width: 0%; } to { width: 100%; } }
.story-progress-run { animation: story-progress 5s linear forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.animate-toast-in { animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.animate-sheet-up { animation: sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }

.ring-gradient {
  background: linear-gradient(45deg, var(--g-from, #FF8A00), var(--g-to, #E1306C), var(--g-from, #FF8A00));
}

.video-ease { transition: opacity 0.4s ease; will-change: transform, opacity; }

/* Video performance optimizations */
video {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
}

.pb-safe { padding-bottom: env(safe-area-inset-bottom, 0); }

.modal-hidden { display: none !important; }

.line-clamp-1, .line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }

/* ============================================================
   INSTAGRAM TARZI HİKAYE HALKALARI (IP tabanlı izlenme durumu)
   ============================================================ */

.story-ring {
  display: block !important;
  padding: 2.5px;
  border-radius: 9999px !important;
  background: linear-gradient(45deg, #FF3040 0%, #FF6A00 25%, #EE2A7B 60%, #FF3040 100%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease, opacity 0.4s ease;
  box-sizing: border-box !important;
  -moz-box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
}
.story-item:hover .story-ring { transform: scale(1.06); }
.story-item:active .story-ring { transform: scale(0.95); }

/* İzlenmiş hikaye: renkli halka söner, soluk griye döner */
.story-ring.is-seen {
  background: var(--line);
  opacity: 0.85;
}
.story-ring.is-seen .story-ring-inner { filter: saturate(0.75) brightness(0.97); }

.story-ring-inner {
  display: block !important;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border-radius: 9999px !important;
  border: 3px solid var(--bg);
  background: #e5e5e5;
  box-sizing: border-box !important;
  -moz-box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
}

@media (min-width: 640px) {
  .story-ring-inner { width: 66px; height: 66px; }
}

/* ============================================================
   RESPONSIVE İNCE AYARLAR — iPhone / Android / Masaüstü
   ============================================================ */

/* iOS güvenli alanlar */
body { padding-top: env(safe-area-inset-top, 0); }
.pb-safe { padding-bottom: calc(env(safe-area-inset-bottom, 0) + 0.25rem); }

/* iOS'ta input odaklanınca sayfa zoom yapmasın */
input, textarea, select, button { font-size: 16px; }
@media (min-width: 480px) {
  input, textarea, select { font-size: 14px; }
}

/* Dokunmatik hedefler en az 44px (Apple HIG) */
@media (hover: none) and (pointer: coarse) {
  nav a, nav button, header button, header a { min-height: 44px; }
}

/* Yatay taşmayı kesin olarak engelle */
html, body { max-width: 100%; overflow-x: hidden; }
img, video { max-width: 100%; }

/* Masaüstünde ferah görünüm */
@media (min-width: 1024px) {
  .ss-shell { box-shadow: 0 0 60px rgba(28, 22, 17, 0.07); }
}

/* Çok küçük telefonlarda (iPhone SE) alt menü sıkışmasın */
@media (max-width: 380px) {
  nav .ss-nav-label { display: none; }
  nav a { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* Yüksek DPI ekranlarda yazı netliği */
@media (-webkit-min-device-pixel-ratio: 2) {
  body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
}

/* Yükleme ilerleme çubuğu */
.upload-bar {
  height: 6px;
  border-radius: 9999px;
  background: var(--line);
  overflow: hidden;
}
.upload-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--g-from), var(--g-to));
  transition: width 0.25s ease;
}

/* SPA geçiş göstergesi */
body.ss-loading::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  z-index: 300;
  background: linear-gradient(90deg, var(--g-from), var(--g-to));
  transform-origin: left;
  animation: ss-bar 0.9s ease-in-out infinite;
}
@keyframes ss-bar {
  0% { transform: scaleX(0); opacity: 1; }
  60% { transform: scaleX(0.85); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
body.ss-loading main { opacity: 0.55; transition: opacity 0.15s ease; }

/* Reels kaydırma */
#reelsScroll::-webkit-scrollbar { display: none; }
#reelsScroll { scrollbar-width: none; }

/* DM baloncukları */
[data-dm-badge] { pointer-events: none; }

/* ============================================================
   EMLAK — ÇAPRAZ DURUM ŞERİDİ (SATILDI / KİRALANDI)
   Görseli boydan boya, ortadan çapraz kaplar.
   ============================================================ */
.status-ribbon-wrap {
  position: absolute;
  inset: 0;
  z-index: 15;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-ribbon {
  width: 190%;
  text-align: center;
  transform: rotate(-21deg);
  padding: 10px 0;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 7px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  border-top: 2px solid rgba(255, 255, 255, .55);
  border-bottom: 2px solid rgba(255, 255, 255, .55);
  opacity: .93;
}
.status-ribbon-lg .status-ribbon {
  font-size: 27px;
  letter-spacing: 11px;
  padding: 14px 0;
}
@media (max-width: 420px) {
  .status-ribbon { font-size: 16px; letter-spacing: 5px; padding: 8px 0; }
}

/* Hikaye "ekle" halkası için iç kutu arka planı */
.story-ring-inner { background: var(--bg); }
