/* ==========================================================================
   LOVEQUEST WEB & MOBILE UNIFIED DESIGN SYSTEM
   Matches React Native styles & Instagram Web layout standard
   ========================================================================== */

:root {
  --primary: #FF3B82;
  --primary-hover: #DE0046;
  --primary-glow: rgba(255, 59, 130, 0.35);
  --anniv-gradient: linear-gradient(135deg, #181135 0%, #290E52 100%);
  --radar-radial: radial-gradient(circle, rgba(255, 59, 130, 0.15) 0%, rgba(10, 10, 15, 0.95) 75%);
  --bg-dark: #000000;
  --bg-sidebar: #050505;
  --bg-card: #121214;
  --bg-elevated: #18181B;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 59, 130, 0.4);
  --text-white: #FFFFFF;
  --text-light: #E2E8F0;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-family);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
}

.verified-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
  line-height: 0;
}

/* Master Layout Grid */
.app-layout-shell {
  display: flex;
  justify-content: stretch;
  min-height: 100vh;
  background-color: var(--bg-dark);
  width: 100%;
}

/* ==================== 1. DESKTOP SIDEBAR ==================== */
.ig-sidebar {
  display: none;
  width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px 20px;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  z-index: 50;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 8px 10px 24px;
}
.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px var(--primary-glow);
}
.brand-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #FFFFFF 40%, #FF3B82 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
}
.nav-btn i {
  font-size: 1.35rem;
  width: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
  transform: translateX(3px);
}
.nav-btn.active {
  color: var(--text-white);
  font-weight: 800;
  background: rgba(255, 59, 130, 0.1);
}
.nav-btn.active i {
  color: var(--primary);
  transform: scale(1.1);
}
.nav-badge {
  margin-left: auto;
  background-color: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}
.nav-badge.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
}

.sidebar-bottom {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.logged-user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logged-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
  overflow: hidden;
}
.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  object-fit: cover;
  border: 1.5px solid var(--border-subtle);
}
.user-text strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.user-text small {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.btn-logout {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px;
  transition: color 0.15s;
}
.btn-logout:hover {
  color: #EF4444;
}

/* ==================== 2. MAIN FEED STAGE (RESPONSIVE) ==================== */
.main-content-stage {
  flex: 1;
  width: 100%;
  max-width: 960px; /* Geniş ekranı dolduran ferah görünüm */
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background-color: var(--bg-dark);
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

/* Mobil Üst Bar */
.mobile-top-bar {
  height: 56px;
  flex-direction: row;
  align-items: center;
  padding: 0 16px;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.app-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg, #FFFFFF 40%, #FF3B82 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-icon-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.15s;
}
.header-icon-btn:hover {
  transform: scale(1.1);
  color: var(--primary);
}
.dot-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background-color: #EF4444;
  border: 1.5px solid #000000;
}

/* Tab Sayfaları */
.tab-page {
  display: none;
  width: 100%;
  flex: 1;
  padding-bottom: 80px;
}
.tab-page.active {
  display: block;
}

/* ==================== 3. STORIES & ANNIVERSARY BAR ==================== */
.stories-container {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 18, 20, 0.4);
}
.stories-scroll {
  display: flex;
  padding: 0 14px;
  overflow-x: auto;
  gap: 14px;
  scrollbar-width: none;
}
.stories-scroll::-webkit-scrollbar {
  display: none;
}
.story-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.story-wrapper:hover {
  transform: translateY(-2px);
}
.my-story-base {
  position: relative;
  width: 66px;
  height: 66px;
}
.story-ring-container {
  width: 66px;
  height: 66px;
  border-radius: 33px;
  padding: 2.5px;
  background: linear-gradient(45deg, #F59E0B, #FF3B82, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-ring-container.seen {
  background: rgba(255, 255, 255, 0.2);
}
.story-img-inner {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background-color: #000000;
  padding: 2px;
}
.story-img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
}
.plus-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background-color: var(--primary);
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
}
.story-name-text {
  color: var(--text-white);
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
  width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Yıldönümü & Kısayollar Barı */
.anniversary-bar-container {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.anniversary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 59, 130, 0.25);
  background: var(--anniv-gradient);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.anniversary-left {
  display: flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
}
.anniversary-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  background: rgba(255, 59, 130, 0.2);
  border: 1px solid rgba(255, 59, 130, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 16px;
}
.anniversary-text-wrapper {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
}
.anniv-partner-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.anniversary-title {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.anniv-edit-icon-badge {
  font-size: 10px;
  color: var(--text-dim);
}
.anniversary-days-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.2px;
}

.anniversary-actions {
  display: flex;
  gap: 8px;
}
.mini-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mini-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.mini-action-btn i {
  font-size: 13px;
}
.mini-action-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}
.text-sky { color: #38BDF8 !important; }
.text-purple { color: #C084FC !important; }
.text-pink { color: #FF3B82 !important; }
.text-red { color: #EF4444 !important; }

/* ==================== 4. POST CARD COMPONENT ==================== */
.feed-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.post-card {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-dark);
  margin-bottom: 12px;
}
.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}
.post-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.post-avatar-ring {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--primary), #DE0046);
}
.post-avatar {
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
  background: #18181B;
}
.post-username {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}
.post-location {
  font-size: 11px;
  color: var(--text-dim);
}
.post-menu-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}

.post-media-container {
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #121214;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
  display: block;
}
.upload-preview-video {
  max-width: 100%;
  max-height: 380px;
  background: #000;
  border-radius: 12px;
  object-fit: contain;
}
.center-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 5.5rem;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s;
  z-index: 10;
}
.center-heart.pop {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 1;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px 4px;
  align-items: center;
}
.post-actions-left {
  display: flex;
  gap: 16px;
}
.action-btn {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.15s, color 0.15s;
}
.action-btn:hover {
  transform: scale(1.15);
}
.action-btn.liked {
  color: var(--primary);
}

.post-footer {
  padding: 4px 14px 14px;
}
.likes-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}
.caption-row {
  font-size: 13px;
  line-height: 19px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.caption-user {
  font-weight: 800;
  color: var(--text-white);
  margin-right: 6px;
  cursor: pointer;
}
.mention-link {
  color: #38BDF8;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.mention-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}
.hashtag-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.hashtag-link:hover {
  text-decoration: underline;
}

/* Mention Autocomplete Box */
.mention-autocomplete-box {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  z-index: 50;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mention-sug-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.mention-sug-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.mention-sug-item:last-child {
  border-bottom: none;
}
.mention-sug-avatar {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  object-fit: cover;
}
.mention-sug-meta {
  display: flex;
  flex-direction: column;
}
.mention-sug-name {
  font-size: 12px;
  font-weight: 700;
  color: #FFF;
}
.mention-sug-handle {
  font-size: 11px;
  color: #94A3B8;
}
.comments-link {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
}
.post-time-text {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* Empty State */
.empty-feed {
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.empty-feed-title {
  font-size: 18px;
  font-weight: 800;
  margin-top: 14px;
  color: var(--text-white);
}
.empty-feed-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
  max-width: 320px;
}
.empty-feed-btn {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all 0.2s ease;
}
.empty-feed-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ==================== 5. RADAR SCREEN ==================== */
.radar-page-wrap {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.radar-head-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
}
.radar-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #10B981;
}
.radar-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  animation: pulseGreen 1.5s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.radar-sonar-disc {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 160px;
  background: var(--radar-radial);
  border: 1.5px solid rgba(255, 59, 130, 0.35);
  box-shadow: 0 0 30px rgba(255, 59, 130, 0.15);
  overflow: hidden;
  margin: 10px auto 20px;
}
.sonar-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(255, 59, 130, 0.4) 0deg, transparent 65deg);
  border-radius: 50%;
  animation: radarRotate 4s linear infinite;
  pointer-events: none;
}
@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.sonar-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255, 59, 130, 0.25);
}
.sonar-circle.c1 { width: 33%; height: 33%; }
.sonar-circle.c2 { width: 66%; height: 66%; }
.sonar-circle.c3 { width: 90%; height: 90%; }

.sonar-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}
.sonar-pin.center-me {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.sonar-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.sonar-avatar-img.me {
  border-color: #10B981;
}
.sonar-avatar-img.partner {
  border-color: #EC4899;
}
.sonar-pin-tag {
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.85);
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 3px;
  border: 1px solid var(--border-subtle);
}

.radar-info-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}
.radar-info-card strong {
  display: block;
  font-size: 14px;
  color: var(--text-white);
}
.radar-info-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 12px;
}
.btn-refresh-radar {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-refresh-radar:hover {
  background: rgba(255, 255, 255, 0.15);
}

.radar-nearby-section {
  width: 100%;
}
.section-sub-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.nearby-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nearby-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
}
.nearby-user-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nearby-avatar {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  object-fit: cover;
}
.nearby-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}
.nearby-distance {
  font-size: 11px;
  color: #10B981;
}
.btn-wave-action {
  background: rgba(255, 59, 130, 0.15);
  border: 1px solid rgba(255, 59, 130, 0.3);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== 6. INBOX & CHAT SCREEN ==================== */
.inbox-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px - 60px);
}
.inbox-search-box {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.inbox-search-input {
  width: 100%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px 10px 36px;
  color: var(--text-white);
  font-size: 13px;
  outline: none;
}
.search-icon {
  position: absolute;
  left: 26px;
  top: 20px;
  color: var(--text-dim);
  font-size: 13px;
}
.inbox-list {
  flex: 1;
  overflow-y: auto;
}
.inbox-thread-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background-color 0.15s;
}
.inbox-thread-row:hover {
  background-color: var(--bg-card);
}
.inbox-avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  object-fit: cover;
}
.inbox-meta {
  flex: 1;
  overflow: hidden;
}
.inbox-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}
.inbox-last-msg {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Active Conversation Fullscreen / Flyout */
.conversation-view {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-dark);
  z-index: 100;
  flex-direction: column;
}
.conversation-view.open {
  display: flex;
}
.chat-head {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 18, 20, 0.95);
  backdrop-filter: blur(12px);
}
.chat-back-btn {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-head-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.chat-head-info strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  font-size: 14px;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-dot {
  font-size: 8px;
  color: #10B981;
}
.chat-stream {
  flex: 1;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble {
  max-width: 78%;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 19px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble.target {
  align-self: flex-start;
  background-color: var(--bg-elevated);
  color: var(--text-white);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-subtle);
}
.chat-input-bar {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
}
.chat-text-input {
  flex: 1;
  min-width: 0;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 10px 18px;
  color: var(--text-white);
  font-size: 13.5px;
  outline: none;
}
.btn-chat-media-upload {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  width: 38px;
  height: 38px;
  border-radius: 19px;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-chat-media-upload:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.chat-bubble img.chat-media-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  margin-bottom: 4px;
}
.chat-bubble video.chat-media-video {
  max-width: 100%;
  max-height: 240px;
  border-radius: 12px;
  display: block;
  background: #000;
  margin-bottom: 4px;
}
.btn-chat-send {
  background: var(--primary);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s;
}
.btn-chat-send:hover {
  transform: scale(1.05);
}

/* ==================== 7. EXPLORE & SEARCH SCREEN ==================== */
.explore-page-wrap {
  padding: 12px 14px;
}
.explore-search-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 10px;
  margin-bottom: 14px;
}
.explore-search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 13px;
  outline: none;
}
.explore-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.explore-grid-item {
  aspect-ratio: 1/1;
  background-color: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.explore-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.explore-grid-item:hover img {
  transform: scale(1.04);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.search-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
}

/* ==================== 8. PROFILE SCREEN ==================== */
.profile-screen-wrap {
  display: flex;
  flex-direction: column;
}
.profile-cover-area {
  width: 100%;
  height: 180px;
  background-color: var(--bg-elevated);
  position: relative;
}
.profile-cover-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.profile-header-meta {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
}
.profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -50px;
  margin-bottom: 14px;
  position: relative;
  z-index: 10;
}
.profile-avatar-ring {
  width: 100px;
  height: 100px;
  border-radius: 50px;
  padding: 4px;
  background: var(--bg-dark);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}
.profile-main-avatar {
  width: 100%;
  height: 100%;
  border-radius: 46px;
  object-fit: cover;
  display: block;
  background-color: #121214;
}
.profile-actions-btns {
  display: flex;
  gap: 8px;
}
.btn-profile-primary {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-profile-primary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}
.btn-profile-secondary {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-user-display {
  font-size: 18px;
  font-weight: 800;
}
.verified-badge-icon {
  color: #38BDF8;
  font-size: 14px;
}
.profile-user-handle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 1px;
}
.profile-user-bio {
  font-size: 13px;
  color: var(--text-light);
  margin: 10px 0 16px;
  line-height: 20px;
}
.profile-stats-bar {
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-item strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-white);
}
.stat-item span {
  font-size: 11px;
  color: var(--text-dim);
}
.profile-posts-title-bar {
  padding: 14px 16px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* ==================== 9. SETTINGS SCREEN ==================== */
.settings-screen-wrap {
  padding: 16px;
}
.settings-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin: 18px 0 8px;
}
.settings-card-group {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s;
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-row:hover {
  background-color: rgba(255, 255, 255, 0.03);
}
.setting-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.setting-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.setting-icon-box.pink { background: rgba(255, 59, 130, 0.15); color: var(--primary); }
.setting-icon-box.purple { background: rgba(192, 132, 252, 0.15); color: #C084FC; }
.setting-icon-box.red { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.setting-icon-box.blue { background: rgba(56, 189, 248, 0.15); color: #38BDF8; }
.setting-icon-box.slate { background: rgba(148, 163, 184, 0.15); color: #94A3B8; }

.setting-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}
.setting-row-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.chevron-icon {
  color: var(--text-dim);
  font-size: 12px;
}

/* ==================== 10. SAĞ MASAÜSTÜ WIDGET PANELİ ==================== */
.desktop-right-sidebar {
  display: none;
  width: 340px;
  padding: 24px 20px;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
}
.right-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  border-radius: 16px;
}
.right-avatar {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  object-fit: cover;
}
.right-user-meta strong {
  display: block;
  font-size: 13px;
  color: var(--text-white);
}
.right-user-meta small {
  font-size: 11px;
  color: var(--text-dim);
}
.btn-right-action {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.right-widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}
.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.widget-btn-cta {
  width: 100%;
  margin-top: 12px;
  background: rgba(255, 59, 130, 0.15);
  border: 1px solid rgba(255, 59, 130, 0.3);
  color: var(--primary);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.widget-btn-cta:hover {
  background: var(--primary);
  color: white;
}
.suggested-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.right-footer-meta {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 16px;
  padding-left: 6px;
}

/* ==================== 11. MOBİL ALT TAB BAR ==================== */
.mobile-bottom-nav {
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 50;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.tab-btn.active {
  color: var(--primary);
}
.badge-dot {
  position: absolute;
  top: 10px;
  right: 28%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
}

/* ==================== 12. MODALLER & ARAYÜZ FORMLARI ==================== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-backdrop.active {
  display: flex;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}
.auth-box.wide-modal {
  max-width: 520px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-close-modal, .btn-modal-close-cross {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}
.btn-modal-close-cross {
  position: absolute;
  top: 18px;
  right: 18px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: 12px;
}
.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.auth-input-group {
  margin-bottom: 14px;
}
.auth-input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.auth-input-group input, .custom-textarea {
  width: 100%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text-white);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.auth-input-group input:focus, .custom-textarea:focus {
  border-color: var(--primary);
}

.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  color: white;
  padding: 13px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
}
.btn-auth-submit:hover {
  transform: translateY(-1px);
}
.btn-text-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  margin-top: 12px;
  display: block;
  width: 100%;
  text-align: center;
}
.auth-error-text {
  color: #EF4444;
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
  font-weight: 600;
}

/* File Dropzone */
.file-upload-dropzone {
  width: 100%;
  height: 180px;
  border: 2px dashed rgba(255, 59, 130, 0.35);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 59, 130, 0.04);
  overflow: hidden;
  position: relative;
}
.file-upload-dropzone:hover {
  background: rgba(255, 59, 130, 0.08);
}
.upload-icon {
  font-size: 38px;
  color: var(--primary);
  margin-bottom: 8px;
}
#postDropPrompt, #storyDropPrompt {
  text-align: center;
  color: var(--text-muted);
}
.upload-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 24 Saatlik Hikaye Oynatıcı Modalı */
.story-player-box {
  width: 100%;
  max-width: 380px;
  height: 640px;
  border-radius: 20px;
  background: #000;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}
.story-progress-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  z-index: 20;
}
.story-progress-fill {
  width: 0%;
  height: 100%;
  background: #FFFFFF;
  transition: width 0.1s linear;
}
.story-player-header {
  position: absolute;
  top: 24px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 20;
}
.story-player-avatar {
  width: 34px;
  height: 34px;
  border-radius: 17px;
  border: 1.5px solid #FFF;
  object-fit: cover;
}
.story-player-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFF;
}
.btn-close-story {
  margin-left: auto;
  background: none;
  border: none;
  color: #FFF;
  font-size: 20px;
  cursor: pointer;
}
.story-player-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Yorumlar & Bildirim Akışı */
.comments-stream, .notif-list-container {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.comment-item-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  object-fit: cover;
}
.comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}
.comment-input-row input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 8px 14px;
  color: white;
  font-size: 13px;
  outline: none;
}
.btn-send-comment {
  background: var(--primary);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  cursor: pointer;
}

/* Çift Kodu Kutusu */
.couple-code-display-box {
  background: rgba(255, 59, 130, 0.08);
  border: 1px dashed var(--primary);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.code-title {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
}
.code-val {
  display: block;
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 2px;
  margin: 6px 0;
}

/* Kumbara Kutusu */
.kumbara-summary-card {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.kumbara-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.kumbara-amount {
  font-size: 32px;
  font-weight: 900;
  color: #38BDF8;
  margin: 6px 0;
}
.kumbara-add-form {
  display: flex;
  gap: 10px;
}
.kumbara-add-form input {
  width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
  color: white;
  font-size: 14px;
  outline: none;
}

/* ==================== INSTAGRAM WEB DESKTOP ENHANCEMENTS ==================== */
.feed-filter-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}
.feed-filter-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  position: relative;
  padding: 4px 0 10px;
  transition: color 0.15s ease;
}
.feed-filter-btn:hover {
  color: #E2E8F0;
}
.feed-filter-btn.active {
  color: #FFFFFF;
}
.feed-filter-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
}

/* Floating Messages Pill at Bottom Right */
.floating-messages-pill {
  position: fixed;
  bottom: 24px;
  right: 28px;
  display: none;
  align-items: center;
  gap: 14px;
  background: #18181B;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: 10px 18px;
  border-radius: 28px;
  cursor: pointer;
  z-index: 99;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.floating-messages-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 59, 130, 0.4);
  box-shadow: 0 14px 35px rgba(255, 59, 130, 0.25);
}
.pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill-icon {
  font-size: 16px;
  color: var(--primary);
}
.pill-text {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}
.pill-badge {
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}
.pill-avatars {
  display: flex;
  align-items: center;
}
.pill-avatar {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  border: 1.5px solid #18181B;
  object-fit: cover;
}

/* ==================== 13. RESPONSIVE MEDIA QUERIES ==================== */
/* Tablet ve Üzeri (768px+) */
@media (min-width: 768px) {
  .ig-sidebar {
    display: flex;
  }
  .mobile-bottom-nav {
    display: none;
  }
  .mobile-top-bar {
    display: none;
  }
  .tab-page {
    padding-bottom: 24px;
  }
  .conversation-view {
    left: 260px;
  }
}

/* Geniş Masaüstü (1150px+) - Instagram Web Tam Görünüm */
@media (min-width: 1150px) {
  .desktop-right-sidebar {
    display: flex;
    width: 340px;
  }
  .floating-messages-pill {
    display: flex;
  }
  .main-content-stage {
    max-width: 630px;
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
  }
  .post-card {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 20px;
    background: var(--bg-card);
    overflow: hidden;
  }
  .stories-container {
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--bg-card);
    margin: 12px 14px 16px;
  }
}
/* ==================== DESKTOP WEB STORY POLICY ==================== */
/* Hide story creation prompt & buttons on desktop per product rule */
@media (min-width: 769px) {
  #btnCreateStory {
    display: none !important;
  }
}
