/* Kök Değişkenler & Tema */
:root {
  --bg-color: #000000;
  --surface-col: #050505;
  --surface-border: #222222;
  --primary: #ffffff;
  --primary-hover: #e0e0e0;
  --text-main: #ffffff;
  --text-muted: #8e8e93; /* Premium gray */
  --accent: #222222; /* Replaced orange with dark gray for buttons */
  --error: #ef233c;
  --success: #2a9d8f;
  --font-main: 'Outfit', -apple-system, sans-serif;
}

* {
  margin: 0;
  box-sizing: border-box;
}

input, textarea {
  -webkit-user-select: auto !important;
  user-select: auto !important;
}

body, html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Animasyonlu Arka Plan Çemberleri İPTAL - OLED Black */
.blob-bg {
  display: none !important;
}

/* Uygulama Ana Konteyner - Minimalist Frame */
.glass-container {
  width: 100%;
  max-width: 600px; /* Mobile focused max width */
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  margin: 0;
  background: var(--bg-color);
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Ekran Geçişleri */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  padding: 30px;
  animation: fadeIn 0.4s ease forwards;
}
.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* Tipografi & Bileşenler */
h1.logo {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: -1px;
}
h1.logo span {
  font-weight: 700;
  color: var(--primary);
}

/* Auth Ekranı */
#auth-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.auth-box {
  background: transparent;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  /* Removed heavy borders and shadows for minimal luxury */
}

.subtitle {
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.otp-info {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 20px;
}

/* Form Elemanları */
.input-group {
  position: relative;
  margin-bottom: 25px;
  text-align: left;
}

.input-group input {
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s;
  outline: none;
}

.input-group label {
  position: absolute;
  top: 15px;
  left: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: 0.3s ease all;
  font-size: 1rem;
}

.input-group input:focus,
.input-group input:valid {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.4);
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
  top: -10px;
  left: 10px;
  font-size: 0.8rem;
  background: var(--bg-color);
  padding: 0 5px;
  color: var(--primary);
  border-radius: 4px;
}

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: var(--primary);
  color: var(--bg-color);
  width: 100%;
  border-radius: 4px;
}

.primary-btn:hover {
  background: var(--primary-hover);
}

.primary-btn:active {
  transform: scale(0.98);
}

.link-btn {
  display: block;
  margin-top: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.2s;
}
.link-btn:hover { color: white; }

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 30px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
  padding: 5px 10px;
  border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
  color: white;
  background: var(--surface-col);
}

.icon-btn {
  background: transparent;
  color: var(--text-muted);
  padding: 8px;
  border-radius: 50%;
  border: 1px solid transparent;
}
.icon-btn:hover {
  color: var(--error);
  background: rgba(239, 35, 60, 0.1);
}

/* Feed & Profile Layouts */
.section-desc {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feed-grid, .manifest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px; /* Seamless premium instagram look */
  padding-bottom: 20px;
}

@media (max-width: 600px) {
  .feed-grid, .manifest-grid { grid-template-columns: repeat(3, 1fr); gap: 1px; }
  
  .glass-container { margin: 0; width: 100vw !important; flex: 1; min-height: 100vh; border-radius: 0; border: none; }
  .screen { padding: 0; } /* Remove side padding on mobile for edge-to-edge grids */
}

/* Instagram Kartları */
.card {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0; 
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.02);
}

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0; /* Premium sharp edge */
  position: relative;
}

/* Kart İçi Görsel (Kare Crop) */
.card-img {
  width: 100%;
  height: 100%;           
  object-fit: cover;
  background: rgba(255, 255, 255, 0.03); 
}

/* Fiyatı Gizleme Toggle Sınıfı */
.prices-hidden .price-badge {
   display: none !important;
}

.price-badge {
   position: absolute;
   bottom: 8px;
   left: 8px;
   z-index: 10;
   display: inline-flex;
   align-items: center;
   background: rgba(255, 255, 255, 0.95);
   color: #000;
   box-shadow: 0 4px 10px rgba(0,0,0,0.15);
   font-size: 0.8rem;
   font-weight: 800;
   padding: 4px 10px;
   border-radius: 12px;
}

/* Dikey Instagram Post (Reels) Akışı */
.vertical-snap-container {
   width: 100vw;
   height: 100%;
   overflow-y: scroll;
   scroll-snap-type: y mandatory;
   display: flex;
   flex-direction: column;
   background: #000;
}

/* Scrollbarı gizle (mobil Instagram deneyimi için) */
.vertical-snap-container::-webkit-scrollbar {
   display: none;
}

.vertical-post {
   width: 100%;
   height: 100%;
   min-height: 100%;
   scroll-snap-align: start;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   padding: 0; /* Remove padding for edge-to-edge content */
   box-sizing: border-box;
}

.vertical-post-wrapper {
   width: 100%;
   max-width: 600px; /* Match global glass-container max width */
   height: 100%;
   background: var(--surface-col);
   border-radius: 0; /* Edge to edge */
   overflow: hidden;
   border: none;
   box-shadow: none;
   display: flex;
   flex-direction: column;
}

.detail-img-side {
   width: 100%;
   background: #000;
   display: flex;
   align-items: center;
   justify-content: center;
   border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-img-side img {
   width: 100%;
   max-height: 55vh;
   object-fit: contain; 
}

.detail-info-side {
   padding: 20px;
   display: flex;
   flex-direction: column;
}

.detail-comment {
   margin-top: 15px;
   color: var(--text-light);
   font-size: 0.95rem;
   line-height: 1.4;
}

.skeleton {
  min-height: 150px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Profile Header */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  padding: 30px 10px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 20px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar {
  width: 70px;
  height: 70px;
  background: var(--surface-col);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 300;
  color: white;
  border: 1px solid var(--surface-border);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 6px;
  font-family: inherit;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.4;
}
.icon-btn:hover {
  opacity: 0.7;
}
.icon-btn.active-btn {
  opacity: 1 !important;
}
.btn-lbl {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.stats {
  display: flex;
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.stats strong { color: white; }

input:checked + .slider {
  background-color: var(--success);
}
input:focus + .slider {
  box-shadow: 0 0 1px var(--success);
}
input:checked + .slider .slider-knob {
  transform: translateX(14px);
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}
.modal:not(.hidden) {
  opacity: 1; pointer-events: auto;
}

.modal-content {
  background: #151821;
  padding: 30px;
  border-radius: 20px;
  width: 100%; max-width: 450px;
  position: relative;
  border: 1px solid var(--surface-border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  transform: translateY(20px);
  transition: 0.3s;
}
.modal:not(.hidden) .modal-content {
  transform: translateY(0);
}

.close-btn {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}
.close-btn:hover { color: white; }

.modal-content h2 { margin-bottom: 25px; }

/* Toasts */
#toast {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  background: var(--surface-col);
  backdrop-filter: blur(10px);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column; align-items: flex-start; gap: 20px;
  }
  .add-btn { width: 100%; }
}

@keyframes pulseStore {
  0% { transform: scale(0.95); opacity: 0.7; filter: drop-shadow(0 0 0px var(--primary)); }
  50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 15px var(--primary)); }
  100% { transform: scale(0.95); opacity: 0.7; filter: drop-shadow(0 0 0px var(--primary)); }
}

/* AI Scanning Animasyonu */
.ai-scan-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.ai-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: aiPulse 1s infinite ease-in-out;
}
.ai-dot:nth-child(2) { animation-delay: 0.15s; }
.ai-dot:nth-child(3) { animation-delay: 0.3s; }
.ai-text {
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-left: 5px;
  animation: aiTextPulse 1.5s infinite ease-in-out;
}
@keyframes aiPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); box-shadow: 0 0 10px var(--primary); }
}
@keyframes aiTextPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; text-shadow: 0 0 8px var(--primary); }
}

/* ====== INSTAGRAM STYLE LAYOUT ====== */

.instagram-layout {
  padding-bottom: 70px !important; /* Space for bottom nav */
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  padding-top: calc(env(safe-area-inset-top, 45px) + 15px);
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 100;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  transition: all 0.3s ease;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.nav-item.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-item.active svg {
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(157, 78, 221, 0.5));
}

.nav-item.add-icon svg {
  stroke: var(--text-main);
}

/* User List (Search / Notifications) */
.user-list {
  display: flex;
  flex-direction: column;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.2s;
}
.user-row:active {
  background: rgba(255,255,255,0.05);
}
.user-row img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.user-row .info {
  flex: 1;
}
.user-row h4 { margin: 0; font-size: 1rem; color: var(--text-main); }
.user-row p { margin: 3px 0 0; font-size: 0.85rem; color: var(--text-muted); }

.follow-btn, .approve-btn {
  padding: 6px 16px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
}
.following-btn {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  border: 1px solid var(--surface-border);
}

/* Profile Instagram Header */
.profile-stats-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 20px;
}
.profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  padding: 2px;
  object-fit: cover;
}
.stats-group {
  display: flex;
  flex: 1;
  justify-content: space-around;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 1.2rem;
  color: var(--text-main);
}
.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.profile-bio {
  padding: 0 20px 15px 20px;
}
#profile-action-container {
  padding: 0 20px 15px 20px;
}
.profile-edit-btn {
  width: 100%;
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 8px;
  font-weight: 600;
}

/* Auth Toggles */
.auth-toggle {
  display: flex;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  margin-bottom: 25px;
  padding: 5px;
}
.auth-toggle button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  background: transparent;
  border: none;
  font-size: 1rem;
}
.auth-toggle button.active {
  background: var(--surface-bg);
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.social-btn * {
  pointer-events: none;
}
.google-btn {
  background: white;
  color: black;
  border: none;
}
.apple-btn {
  background: #000;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--surface-border);
}
.divider span { padding: 0 10px; }

/* Profile Tabs */
.profile-tabs {
  display: flex;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}
.profile-tab-btn {
  flex: 1;
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.profile-tab-btn.active {
  color: var(--text-main);
  border-bottom: 2px solid var(--accent);
}

.search-bar {
  width: 100%;
  padding: 10px 15px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}

.buy-item-btn {
  background: #25d366; /* WhatsApp yeşili / Satın alma yeşili */
  color: white;
  margin-top: 10px;
  border: none;
  width: 100%;
}
.pending-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #ffb703;
  color: black;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: bold;
  z-index: 10;
}
