/* ================= ASTRO EVREN — ana sahne ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #04030c;
  --gold: #ffc14d;
  --ink: #e8ecff;
  --dim: #9aa3c7;
  --glass: rgba(14, 12, 34, 0.62);
  --line: rgba(155, 170, 255, 0.16);
}

html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  user-select: none;
}

#scene { position: fixed; inset: 0; display: block; }

/* ---------- Yükleniyor ---------- */
#loading {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg);
  transition: opacity 0.8s ease, visibility 0.8s;
}
#loading.done { opacity: 0; visibility: hidden; }
.load-star { font-size: 44px; color: var(--gold); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.35); opacity: 1; } }
#loading p { color: var(--dim); letter-spacing: 2px; font-size: 14px; }
.dots::after { content: ''; animation: dots 1.5s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.load-error { max-width: 420px; text-align: center; color: #ff9d9d !important; line-height: 1.6; }

/* ---------- Giriş ---------- */
#intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  text-align: center; padding: 24px;
  background: radial-gradient(ellipse at center, rgba(4,3,12,0.25) 0%, rgba(4,3,12,0.88) 100%);
  transition: opacity 1.2s ease, visibility 1.2s;
}
#intro.hidden { opacity: 0; visibility: hidden; transition: none; }
#intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-eyebrow { color: var(--gold); letter-spacing: 6px; font-size: 12px; }
#intro h1 {
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(44px, 9vw, 96px); letter-spacing: 10px;
  background: linear-gradient(120deg, #fff 10%, var(--gold) 45%, #b28aff 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(255, 193, 77, 0.25);
}
.intro-sub { color: var(--dim); font-size: clamp(14px, 2vw, 17px); line-height: 1.8; font-weight: 300; }
#startBtn {
  margin-top: 14px; padding: 15px 44px;
  font: 600 15px 'Inter', sans-serif; letter-spacing: 3px;
  color: #14102c; background: linear-gradient(120deg, var(--gold), #ffdf9e);
  border: none; border-radius: 40px; cursor: pointer;
  box-shadow: 0 0 34px rgba(255, 193, 77, 0.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
#startBtn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 54px rgba(255, 193, 77, 0.6); }

/* ---------- Logo ---------- */
#brand {
  position: fixed; top: 22px; left: 26px; z-index: 20;
  font-family: 'Cinzel', serif; font-size: 17px; letter-spacing: 4px; color: var(--ink);
  opacity: 0; transition: opacity 1s ease .4s;
}
.brand-star { color: var(--gold); }
body.started #brand { opacity: 1; }

/* ---------- Gezegen menüsü ---------- */
#planetNav {
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%) translateX(-16px);
  z-index: 20; padding: 16px 10px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none;
  transition: opacity .9s ease .8s, transform .9s ease .8s;
  max-height: 82vh; overflow-y: auto;
}
body.started #planetNav { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
#planetNav h3 {
  font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 3px;
  color: var(--gold); text-align: center; margin-bottom: 10px;
}
.nav-head {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 4px 6px; border-radius: 8px;
  transition: background .2s;
}
.nav-head:hover { background: rgba(255, 193, 77, 0.07); }
.nav-arrow { font-size: 9px; color: var(--dim); transition: transform .3s ease; }
.nav-head.closed .nav-arrow { transform: rotate(-90deg); }
.nav-acc { overflow: hidden; max-height: 420px; transition: max-height .45s ease; }
.nav-acc.collapsed { max-height: 0; }
#navList, #navSigns { list-style: none; }
#planetNav li {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px; margin: 2px 0; border-radius: 10px;
  font-size: 13px; color: var(--dim); cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
#planetNav li:hover { background: rgba(155, 170, 255, 0.1); color: var(--ink); }
#planetNav li.active { background: rgba(255, 193, 77, 0.14); color: var(--gold); }
.nav-sym {
  font-size: 16px; width: 18px; text-align: center;
  /* Zodyak glifleri Windows'ta renkli emojiye dönüşmesin — metin sunumlu sembol fontu */
  font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'Noto Sans Symbols', sans-serif;
}

/* ---------- 3B etiketler ---------- */
#labels { position: fixed; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.p-label {
  position: absolute; top: 0; left: 0;
  padding: 3px 10px; border-radius: 20px;
  /* Not: backdrop-filter yok — her karede hareket eden etikette blur, ciddi FPS kaybı yaratır */
  background: rgba(10, 8, 28, 0.78); border: 1px solid var(--line);
  font-size: 11px; letter-spacing: 1.5px; color: var(--dim);
  cursor: pointer; pointer-events: auto; white-space: nowrap;
  transition: color .2s, border-color .2s;
  will-change: transform;
  opacity: 0;
}
body.started .p-label { opacity: 1; }
.p-label:hover { color: var(--gold); border-color: rgba(255, 193, 77, 0.5); }
.p-label span {
  font-size: 13px;
  font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'Noto Sans Symbols', sans-serif;
}

/* ---------- Bilgi paneli ---------- */
#panel {
  position: fixed; top: 50%; right: 26px; z-index: 30;
  width: 348px; max-height: 86vh; overflow-y: auto;
  padding: 30px 26px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 22px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateY(-50%) translateX(40px); opacity: 0; visibility: hidden;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .5s, visibility .5s;
}
#panel.open { transform: translateY(-50%); opacity: 1; visibility: visible; }
#closePanel {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--dim);
  font-size: 17px; cursor: pointer; transition: color .2s, transform .2s;
}
#closePanel:hover { color: #fff; transform: rotate(90deg); }
.p-symbol {
  font-size: 46px; line-height: 1; text-shadow: 0 0 26px currentColor;
  font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'Noto Sans Symbols', sans-serif;
}
#panel h2 {
  font-family: 'Cinzel', serif; font-size: 30px; letter-spacing: 3px; margin-top: 8px;
}
.p-title { color: var(--gold); font-size: 13px; letter-spacing: 1px; margin: 6px 0 16px; }
.meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.meta div {
  background: rgba(155, 170, 255, 0.06); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 6px; text-align: center;
}
.meta b { display: block; font-size: 9px; letter-spacing: 1px; color: var(--dim); text-transform: uppercase; margin-bottom: 4px; }
.meta span { font-size: 11.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  padding: 4px 11px; border-radius: 20px; font-size: 11px;
  background: rgba(255, 193, 77, 0.1); border: 1px solid rgba(255, 193, 77, 0.28); color: #ffd98c;
}
.p-brief { font-size: 13.5px; line-height: 1.75; color: var(--dim); font-weight: 300; margin-bottom: 20px; }
.btn {
  display: block; text-align: center; padding: 13px;
  border-radius: 14px; text-decoration: none;
  font-weight: 600; font-size: 14px; letter-spacing: 2px;
  color: #14102c; background: linear-gradient(120deg, var(--gold), #ffdf9e);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 26px rgba(255, 193, 77, 0.4); }

/* ---------- İpucu ---------- */
#hint {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 20; padding: 9px 22px; border-radius: 30px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; color: var(--dim); white-space: nowrap;
  opacity: 0; transition: opacity 1s ease 1.4s;
}
body.started #hint { opacity: 1; }

/* ---------- Kaydırma çubukları ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: rgba(155, 170, 255, 0.25); border-radius: 4px; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  #planetNav {
    left: 50%; top: auto; bottom: 64px;
    transform: translateX(-50%) translateY(14px);
    display: flex; align-items: center; gap: 4px;
    max-width: 94vw; max-height: none; overflow-x: auto; overflow-y: hidden;
    padding: 8px 12px;
  }
  body.started #planetNav { transform: translateX(-50%); }
  #planetNav h3 { display: none; }
  #navList { display: flex; gap: 2px; }
  #planetNav li { padding: 6px 9px; font-size: 12px; }
  #panel {
    top: auto; bottom: 0; right: 0; left: 0; width: 100%;
    max-height: 62vh; border-radius: 22px 22px 0 0;
    transform: translateY(105%);
  }
  #panel.open { transform: translateY(0); }
  #hint { display: none; }
}

/* ---------- Sağ üst butonlar ---------- */
#topRight {
  position: fixed; top: 20px; right: 26px; z-index: 25;
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
  max-width: min(62vw, 640px);
  opacity: 0; pointer-events: none; transition: opacity 1s ease .6s;
}
body.started #topRight { opacity: 1; pointer-events: auto; }
.tr-btn {
  padding: 9px 18px; border-radius: 30px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--ink); font: 400 12.5px 'Inter', sans-serif; letter-spacing: 1px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: color .2s, border-color .2s, transform .2s;
}
.tr-btn:hover { color: var(--gold); border-color: rgba(255, 193, 77, 0.5); transform: translateY(-1px); }

/* ---------- Canlı gökyüzü paneli ---------- */
#skyPanel, #transitPanel {
  position: fixed; top: 68px; right: 26px; z-index: 26;
  width: 320px; max-height: 76vh; overflow-y: auto;
  padding: 20px 22px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateX(24px); opacity: 0; visibility: hidden;
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .4s, visibility .4s;
}
#skyPanel.open, #transitPanel.open { transform: none; opacity: 1; visibility: visible; }
.sky-head { display: flex; justify-content: space-between; align-items: center; }
.sky-head h3 { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 2px; color: var(--gold); }
#skyClose, #transitClose { background: none; border: none; color: var(--dim); font-size: 15px; cursor: pointer; }
#skyClose:hover, #transitClose:hover { color: #fff; }
.sky-cal {
  display: block; margin-top: 14px; padding: 10px;
  text-align: center; border-radius: 12px; text-decoration: none;
  background: rgba(255, 193, 77, 0.08); border: 1px solid rgba(255, 193, 77, 0.25);
  color: #ffd98c; font-size: 12.5px; letter-spacing: 1px;
  transition: background .2s;
}
.sky-cal:hover { background: rgba(255, 193, 77, 0.16); }
.tp-date { font-size: 11.5px; letter-spacing: 1px; color: var(--dim); margin: 10px 0 4px; }
.tp-item { padding: 12px 0; border-bottom: 1px dashed rgba(155, 170, 255, 0.09); }
.tp-item:last-of-type { border-bottom: none; }
.tp-item h4 { font-size: 12.5px; letter-spacing: .4px; margin-bottom: 6px; font-weight: 600; }
.tp-item p { font-size: 12.5px; line-height: 1.75; color: #c6cdea; font-weight: 300; }
.tp-note { font-size: 11px; color: var(--dim); font-weight: 300; line-height: 1.6; margin-top: 12px; }
.sky-moon { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; }
.sky-moon-emoji { font-size: 34px; line-height: 1; }
.sky-moon b { display: block; font-size: 14px; }
.sky-moon span { font-size: 11.5px; color: var(--dim); }
.sky-next, .sky-retro { font-size: 11.5px; color: var(--dim); margin: 5px 0; line-height: 1.5; }
.sky-next b, .sky-retro b { color: #ffd98c; font-weight: 600; }
.sky-list { list-style: none; margin-top: 12px; }
.sky-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 10px; font-size: 12.5px;
  cursor: pointer; transition: background .2s;
  border-bottom: 1px dashed rgba(155, 170, 255, 0.08);
}
.sky-list li:hover { background: rgba(155, 170, 255, 0.08); }
.sky-sym { color: var(--gold); width: 18px; text-align: center; }
.sky-pos { margin-left: auto; color: var(--dim); font-size: 11.5px; }
.sky-r { font-style: normal; color: #ff9d8a; font-weight: 700; margin-left: 5px; font-size: 10px; }
.sky-loading { color: var(--dim); font-size: 13px; }

/* ---------- Burç etiketleri & harita işaretleri ---------- */
.z-label { font-size: 10px; opacity: 0.85; }
.m-label { font-size: 11px; background: rgba(22, 15, 44, 0.78); }
.nav-sub { margin-top: 12px; }

/* ---------- Canlı konum ---------- */
.p-live {
  display: none;
  margin: -8px 0 18px; padding: 9px 12px;
  border-radius: 10px; font-size: 12px;
  background: rgba(127, 212, 212, 0.08); border: 1px solid rgba(127, 212, 212, 0.3);
  color: #a8e0e0;
}
.p-live .lr { color: #ff9d8a; }
#liveBadge {
  position: fixed; bottom: 20px; right: 26px; z-index: 20;
  padding: 8px 16px; border-radius: 30px;
  background: var(--glass); border: 1px solid rgba(127, 212, 212, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 11.5px; color: #a8e0e0;
  opacity: 0; transition: opacity 1s ease 1.6s;
}
body.started #liveBadge { opacity: 1; }
#liveBadge.hidden { display: none; }

/* ---------- Kara delik geçişi ---------- */
#warpOverlay {
  position: fixed; inset: 0; z-index: 55;
  background: #000; opacity: 0; pointer-events: none;
  transition: opacity .55s ease;
}
#warpOverlay.on { opacity: 1; }
#miniToast {
  position: fixed; top: 74px; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 40; padding: 10px 22px; border-radius: 30px;
  background: var(--glass); border: 1px solid rgba(255, 160, 90, 0.35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 13px; color: var(--ink); white-space: nowrap;
  opacity: 0; visibility: hidden;
  transition: opacity .4s ease, transform .4s ease, visibility .4s;
}
#miniToast.on { opacity: 1; visibility: visible; transform: translateX(-50%); }
.bh-label { border-color: rgba(255, 160, 90, 0.4); color: #ffc9a0; }

/* ---------- Doğum haritası bildirimi ---------- */
#chartToast {
  position: fixed; bottom: 20px; left: 26px; z-index: 25;
  padding: 12px 18px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; color: var(--ink);
}
#chartToast.hidden { display: none; }
#chartToast button {
  margin-left: 10px; padding: 4px 12px;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  color: var(--dim); font-size: 11px; cursor: pointer; transition: color .2s;
}
#chartToast button:hover { color: #fff; }

@media (max-width: 900px) {
  #topRight { top: 14px; right: 12px; }
  .tr-btn { padding: 8px 13px; font-size: 11.5px; }
  #skyPanel, #transitPanel { left: 12px; right: 12px; width: auto; top: 104px; max-height: 58vh; }
  #topRight { max-width: 92vw; }
  #navSigns { display: flex; gap: 2px; }
  .nav-acc, .nav-acc.collapsed { max-height: none; }   /* mobilde akordeon devre dışı */
  #chartToast { bottom: 132px; left: 12px; right: 12px; text-align: center; }
  #liveBadge { display: none; }
}
