:root {
  --bg-dark: #1a1a3e;
  --bg-darker: #12122b;
  --bg-card: rgba(255, 255, 255, 0.05);
  --accent-gold: #d4af37;
  --accent-gold-light: #eadd95;
  --accent-teal: #4b9b9b;
  --accent-teal-dark: #2c5e5e;
  --text-main: #f0f0f5;
  --text-muted: rgba(240, 240, 245, 0.7);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(212, 175, 55, 0.3);
  --danger: #e06c75;
  --font-heading: 'Outfit', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --shadow-glow: 0 0 15px rgba(212, 175, 55, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: #0b0b1a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
}

.mobile-wrapper {
  position: relative;
  width: 100%;
  max-width: 414px;
  height: 100vh;
  max-height: 896px;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(75, 155, 155, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 40%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 415px) {
  .mobile-wrapper {
    height: 92vh;
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 8px solid #333;
  }
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 40px 70px, #fff, transparent),
    radial-gradient(1px 1px at 50px 160px, #fff, transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, #fff, transparent),
    radial-gradient(1px 1px at 160px 120px, #fff, transparent);
  background-repeat: repeat;
  opacity: 0.3;
  z-index: 0;
}

.mobile-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  padding-bottom: 110px;
  z-index: 1;
}
.mobile-content::-webkit-scrollbar { display: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; font-weight: 500; }
p { margin: 0; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

.p-20 { padding: 20px; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.gold { color: var(--accent-gold); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #b38f26);
  color: var(--bg-darker);
  box-shadow: var(--shadow-glow);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.btn-sm { width: auto; padding: 8px 18px; font-size: 0.85rem; }

.input-group { margin-bottom: 16px; text-align: left; }
.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-left: 4px;
}
.input-control {
  width: 100%;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}
.input-control:focus {
  border-color: var(--accent-gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}
select.input-control { appearance: none; }
select.input-control option { background: var(--bg-darker); }

/* Üst bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 10px;
}
.credit-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
  cursor: pointer;
}
.back-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.back-btn:hover { background: var(--bg-card); }

/* Marka */
.home-brand { text-align: center; margin: 16px 0 26px; }
.home-brand .logo-icon {
  font-size: 3.4rem;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}
.home-brand h1 { font-size: 1.7rem; letter-spacing: 1.5px; color: var(--accent-gold-light); }
.home-brand p { color: var(--text-muted); font-size: 0.9rem; }

/* Fal kartları */
.fal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 24px;
}
.fal-card {
  background: linear-gradient(180deg, rgba(44, 94, 94, 0.4) 0%, rgba(26, 26, 62, 0.6) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 14px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.fal-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}
.fal-card.wide {
  grid-column: span 2;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.2) 0%, rgba(26, 26, 62, 0.6) 100%);
}
.fal-card .fal-icon { font-size: 2.4rem; }
.fal-card span { font-family: var(--font-heading); font-size: 1rem; }
.fal-card small { color: var(--text-muted); font-size: 0.75rem; }

/* Falcı kartı */
.teller-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 20px 12px;
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}
.teller-card:hover { border-color: var(--accent-gold); }
.teller-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}
.teller-info { flex: 1; min-width: 0; }
.teller-name { font-family: var(--font-heading); font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.teller-bio { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.teller-meta { font-size: 0.75rem; color: var(--accent-gold); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
}
.badge.busy { border-color: rgba(224, 108, 117, 0.5); color: var(--danger); }

/* Konu çipleri */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.chip.selected {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.18);
  color: var(--accent-gold-light);
}

/* Tarot ızgarası */
.tarot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 20px;
}
.tarot-card-back {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  background:
    radial-gradient(circle at 50% 35%, rgba(212, 175, 55, 0.25) 0%, transparent 60%),
    linear-gradient(160deg, #23234f, #12122b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.tarot-card-back:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.tarot-card-back.flipped {
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.3), #1a1a3e);
  border-color: var(--accent-gold);
  flex-direction: column;
  gap: 4px;
  font-size: 1.3rem;
}
.tarot-card-back.flipped small { font-size: 0.55rem; text-align: center; color: var(--accent-gold-light); padding: 0 2px; }

/* Fotoğraf yükleme */
.upload-zone {
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(212, 175, 55, 0.05);
}
.upload-zone:hover { background: rgba(212, 175, 55, 0.12); }
.upload-zone .up-icon { font-size: 2.4rem; }
.upload-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold);
  display: block;
  margin: 0 auto;
}

/* Fal sonucu */
.result-paper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 22px;
  font-size: 0.95rem;
  line-height: 1.75;
  white-space: pre-wrap;
}
.result-paper strong { color: var(--accent-gold-light); }

/* Yıldız puanlama */
.rate-stars { display: flex; gap: 8px; justify-content: center; font-size: 1.8rem; }
.rate-stars button { background: none; border: none; cursor: pointer; font-size: inherit; filter: grayscale(1); transition: var(--transition); padding: 2px; }
.rate-stars button.on { filter: none; transform: scale(1.1); }

/* Geçmiş listesi */
.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 20px 10px;
  padding: 14px 16px;
  cursor: pointer;
}
.history-item .h-icon { font-size: 1.6rem; }
.history-item .h-main { flex: 1; }
.history-item .h-title { font-family: var(--font-heading); font-size: 0.95rem; }
.history-item .h-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* Paketler */
.package-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 20px 12px;
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.package-card:hover { border-color: var(--accent-gold); box-shadow: var(--shadow-glow); }
.package-card .pk-badge { font-size: 1.8rem; }
.package-card .pk-credits { font-family: var(--font-heading); font-size: 1.1rem; }
.package-card .pk-price { margin-left: auto; color: var(--accent-gold); font-weight: 600; font-size: 1.05rem; }

/* Alt navigasyon */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 10px 22px;
  background: rgba(26, 26, 62, 0.85);
  backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-light);
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
}
.nav-item .n-icon { font-size: 1.35rem; }
.nav-item span { font-size: 0.68rem; font-weight: 500; }
.nav-item.active { color: var(--accent-gold); }
.nav-item.center-action { transform: translateY(-14px); }
.nav-item.center-action .n-icon {
  background: var(--accent-gold);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* Yükleniyor animasyonu */
.mystic-loader { text-align: center; padding: 60px 30px; }
.mystic-loader .orb {
  font-size: 4rem;
  display: inline-block;
  animation: float 2.2s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.6));
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}
.fade-in { animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Bildirim */
.toast {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 43, 0.95);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  z-index: 500;
  max-width: 85%;
  text-align: center;
  box-shadow: var(--shadow-glow);
}
.toast.error { border-color: var(--danger); }

/* Onboarding */
.onboard-hero { font-size: 4rem; text-align: center; margin: 30px 0 10px; }
.seg-row { display: flex; gap: 10px; }
.seg-row .chip { flex: 1; text-align: center; }

/* Çevrimiçi göstergesi */
.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7ec699;
  box-shadow: 0 0 6px rgba(126, 198, 153, 0.8);
}

/* Falcı sohbeti */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(26, 26, 62, 0.9);
  backdrop-filter: blur(12px);
  z-index: 5;
}
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}
.chat-area::-webkit-scrollbar { display: none; }
.bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.6;
  word-wrap: break-word;
}
.bubble.teller {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 6px;
}
.bubble.teller strong { color: var(--accent-gold-light); }
.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(179, 143, 38, 0.3));
  border: 1px solid var(--border-gold);
  border-bottom-right-radius: 6px;
}
.bubble img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 12px;
  display: block;
}
.bubble.typing { display: flex; gap: 5px; padding: 14px 16px; }
.tdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: tblink 1.2s infinite;
}
.tdot:nth-child(2) { animation-delay: 0.2s; }
.tdot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tblink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.chat-actions {
  padding: 10px 16px 22px;
  border-top: 1px solid var(--border-light);
  background: rgba(26, 26, 62, 0.9);
  backdrop-filter: blur(12px);
}
.row-2 { display: flex; gap: 10px; }

/* VIP falcı kartları */
.vip-card { margin: 0 20px 14px; }
.vip-head { display: flex; align-items: center; gap: 14px; }
.wa-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.25);
}

/* Profil menü satırı */
.profile-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.profile-menu:hover { border-color: var(--accent-gold); }

/* Sihirbaz adım noktaları */
.step-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.sdot {
  width: 26px;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}
.sdot.on { background: var(--accent-gold); box-shadow: 0 0 8px rgba(212, 175, 55, 0.5); }

/* Bekleme sırası ilerleme çubuğu */
.queue-bar {
  width: 70%;
  height: 8px;
  margin: 24px auto 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.queue-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
  transition: width 0.8s ease;
}

/* ==========================================================================
   WebView (iOS/Android) uyumluluğu
   Gerçek cihazda tam ekran; sahte telefon çerçevesi yalnızca masaüstü
   önizlemesinde (≥768px) görünür. Çentik/home göstergesi için safe-area.
   ========================================================================== */
html, body {
  touch-action: manipulation;         /* çift dokunma zoom'unu engelle */
  overscroll-behavior: none;          /* kauçuk kaydırma / pull-to-refresh yok */
  -webkit-text-size-adjust: 100%;
}
button, a, .chip, .nav-item, .fal-card, .teller-card, .tarot-card-back, .package-card, .history-item, .profile-menu {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select { font-size: 16px; } /* iOS'ta odaklanınca zoom yapmasın */

.mobile-wrapper { height: 100vh; height: 100dvh; }

@media (max-width: 767px) {
  .mobile-wrapper {
    max-width: none !important;
    max-height: none !important;
    height: 100dvh !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
@media (min-width: 768px) {
  .mobile-wrapper { height: 92vh; max-height: 896px; }
}

/* Çentik ve home göstergesi boşlukları */
.top-bar { padding-top: calc(20px + env(safe-area-inset-top)); }
.chat-header { padding-top: calc(14px + env(safe-area-inset-top)); }
.bottom-nav { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.chat-actions { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

/* Uygulama içi onay paneli (tarayıcı confirm() yerine) */
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 15, 0.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  z-index: 600;
}
.sheet {
  width: 100%;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-gold);
  border-radius: 24px 24px 0 0;
  padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

/* Açılan (kilitli) kart: tıklanamaz görünümü, hover efekti yok */
.tarot-card-back.flipped { cursor: default; }
.tarot-card-back.flipped:hover { transform: none; box-shadow: none; }

/* 78 kartlık deste: 5 sütunlu ızgara, kart yüzleri SVG görsel */
.tarot-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tarot-card-back { padding: 0; overflow: hidden; }
.tarot-card-back img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; pointer-events: none; }

/* Sohbet baloncuğunda seçilen kartların görselleri */
.bubble .chat-cards { display: flex; gap: 6px; flex-wrap: wrap; }
.bubble .chat-cards img { width: 62px; border-radius: 6px; border: 1px solid var(--border-gold); }
