html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Görünür olunca beliren içerik: js/main.js .in sınıfını ekler, geçiş burada.
   JS yoksa <noscript> kuralı içeriği açık bırakır. */
[data-reveal]:not(.done) {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform 1s cubic-bezier(.16, 1, .3, 1);
}
[data-reveal].in:not(.done) {
  opacity: 1;
  transform: none;
}

.js-no-motion [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Shrink navbar on scroll */
#navbar.is-scrolled > div:first-child {
  box-shadow: 0 8px 30px -10px rgba(12, 74, 110, 0.25);
}

::selection {
  background: #0f8279;
  color: #ffffff;
}

details summary::-webkit-details-marker {
  display: none;
}

/* ================= AÇILIŞ ANİMASYONU (çene + implant) ================= */
.intro { display: none; }
.intro-on body { overflow: hidden; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #0e4048 0%, #071f25 55%, #030f12 100%);
  color: #fff; gap: 1.25rem; padding: 1.5rem;
  transition: opacity 1.3s cubic-bezier(.65,0,.35,1) .15s, visibility 1.5s;
}
.intro.intro-out { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-video, .intro-stage svg, .intro-title, .intro-sub { transition: transform 1.4s cubic-bezier(.6,0,.2,1), opacity 1s ease, filter 1.2s ease, letter-spacing 1.4s ease; }
.intro.intro-out .intro-video, .intro.intro-out .intro-stage svg { transform: scale(1.35); opacity: 0; filter: blur(8px); }
.intro.intro-out .intro-title { transform: scale(1.12); opacity: 0; letter-spacing: .08em; filter: blur(4px); }
.intro.intro-out .intro-sub { opacity: 0; transform: translateY(8px); }
.intro.intro-out .intro-skip { opacity: 0; transition: opacity .3s; }
.intro::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 42%, rgba(127,229,219,.6), rgba(60,201,189,.15) 35%, transparent 60%); }
.intro.intro-out::after { animation: intro-bloom 1.5s ease-out forwards; }
@keyframes intro-bloom { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2.8); } }

/* Site girişi: menü iner, hero çerçevesi yakınlaşarak netleşir */
.site-enter #navbar { animation: nav-in 1.1s .55s cubic-bezier(.2,.8,.2,1) both; }
.site-enter .hero-frame { animation: hero-in 1.8s .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-36px); } to { opacity: 1; transform: none; } }
@keyframes hero-in { from { opacity: 0; transform: scale(1.12) translateY(30px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
.intro-stage { width: min(900px, 94vw); }
.intro-stage svg { width: 100%; height: auto; overflow: visible; }

.intro-stage.has-video { width: min(780px, 94vw); aspect-ratio: 3 / 2; overflow: hidden; }
.intro-video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; mix-blend-mode: screen; background: transparent; } /* saf siyah arka plan görünmez olur */
.intro-skip { z-index: 2; }
.intro-oynat { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 30px; border-radius: 24px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); color: #fff; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); }
.intro-oynat:hover { background: rgba(0,0,0,.7); }
.in-jaw { opacity: 0; animation: in-fade .9s .1s ease forwards; }

.in-screw { opacity: 0; animation: in-screw .6s var(--d) cubic-bezier(.25,.9,.3,1) forwards; }
@keyframes in-screw {
  0% { opacity: 0; transform: translateY(-190px); }
  25% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
.in-crown { opacity: 0; animation: in-crown .7s var(--d) cubic-bezier(.3,1.3,.5,1) forwards; }
@keyframes in-crown {
  0% { opacity: 0; transform: translateY(-150px); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
.in-spark { opacity: 0; transform: scale(.2); animation: in-spark .7s var(--d) ease-out forwards; }
@keyframes in-spark { 0% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1) rotate(20deg); } 100% { opacity: 0; transform: scale(.4) rotate(45deg); } }

.intro-title { font-family: Figtree, sans-serif; font-weight: 800; letter-spacing: -.01em; text-align: center; line-height: 1.05;
  font-size: clamp(1.9rem, 6vw, 3.4rem); }
.intro-title .ch { display: inline-block; opacity: 0; transform: translateY(18px); animation: in-up .6s var(--d) cubic-bezier(.2,.8,.2,1) forwards; }
.intro-title .sky { color: #3CC9BD; }
.intro-sub { font-size: .8rem; letter-spacing: .35em; text-transform: uppercase; opacity: 0; color: rgba(255,255,255,.7);
  animation: in-fade .8s var(--d) ease forwards; text-align: center; }
@keyframes in-up { to { opacity: 1; transform: none; } }
@keyframes in-fade { to { opacity: 1; } }

.intro-skip { position: absolute; right: 1.25rem; bottom: 1.25rem; cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25);
  padding: .55rem 1rem; border-radius: .75rem; font-size: .85rem; font-weight: 600; transition: background .2s; }
.intro-skip:hover { background: rgba(255,255,255,.2); }

@media (prefers-reduced-motion: reduce) { .intro { display: none !important; } .intro-on body { overflow: auto; } .site-enter #navbar, .site-enter .hero-frame { animation: none; } }

#navbar.is-scrolled > div:first-child { background: rgba(8, 26, 31, 0.85); }

@media (max-width: 640px) {
  .intro-stage.has-video { aspect-ratio: 4 / 5; width: 100%; max-width: 420px; }
  .intro-video { object-position: 50% 50%; }
}

/* Mobil üst menü: çerçeve yok; kaydırınca yazılar okunsun diye yumuşak koyu geçiş */
@media (max-width: 1023px) {
  #navbar { top: .5rem; left: .75rem; right: .75rem; }
  #navbar.is-scrolled > div:first-child {
    background: linear-gradient(to bottom, rgba(8,26,31,.94) 0%, rgba(8,26,31,.7) 60%, rgba(8,26,31,0) 100%);
    box-shadow: none; border-radius: 0;
    margin: -.5rem -.75rem 0; padding: .5rem .75rem 1.25rem; max-width: none;
  }
}

/* =====================================================================
   HASTA / DOKTOR ARAYÜZÜ (giriş sonrası) — ümitapp'in siyah/altın kimliği
   ===================================================================== */
.app-body { background: #080B0D; color: #F3F1EC; }
.app-shell { min-height: 100vh; display: flex; }
.app-yan { position: fixed; inset: 0 auto 0 0; width: 260px; display: none; flex-direction: column; gap: 4px;
  padding: 22px 16px; background: #0E1214; border-right: 1px solid rgba(213,166,66,.12); z-index: 40; }
@media (min-width: 1024px) { .app-yan { display: flex; } .app-ana { margin-left: 260px; } }
.app-ana { flex: 1; min-width: 0; padding-bottom: 96px; }
@media (min-width: 1024px) { .app-ana { padding-bottom: 40px; } }

.app-nav { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 14px;
  color: #B9B6AE; font-weight: 600; font-size: .92rem; cursor: pointer; transition: background .2s, color .2s; text-align: left; }
.app-nav:hover { background: rgba(255,255,255,.04); color: #F3F1EC; }
.app-nav[aria-selected="true"] { background: linear-gradient(135deg, rgba(213,166,66,.22), rgba(213,166,66,.08)); color: #FFE5A4;
  box-shadow: inset 0 0 0 1px rgba(213,166,66,.35); }
.app-nav svg { flex-shrink: 0; }

.app-ust { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: rgba(8,11,13,.86); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.05); }
@media (min-width: 768px) { .app-ust { padding: 18px 32px; } }
.app-ikon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  background: #151818; color: #F3F1EC; cursor: pointer; border: 1px solid rgba(255,255,255,.06); transition: border-color .2s; }
.app-ikon-btn:hover { border-color: rgba(213,166,66,.5); }
.app-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; font-weight: 800; font-size: .9rem;
  background: linear-gradient(135deg, #D5A642, #8A6A22); color: #171511; cursor: pointer; }
.app-rozet { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: #E0615C; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

.app-alt { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(14,18,20,.96); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(213,166,66,.15); }
@media (min-width: 1024px) { .app-alt { display: none; } }
.app-alt .app-nav { flex-direction: column; gap: 4px; padding: 6px 4px; font-size: 10.5px; font-weight: 600; width: auto; flex: 1; text-align: center; border-radius: 12px; }
.app-alt .app-nav[aria-selected="true"] { background: transparent; box-shadow: none; color: #D5A642; }

.app-icerik { padding: 20px; max-width: 1180px; }
@media (min-width: 768px) { .app-icerik { padding: 28px 32px; } }

.profil-satir { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.profil-k { font-size: .85rem; color: #A8A49C; }
.profil-v { font-size: .9rem; color: #F3F1EC; text-align: right; word-break: break-all; }

/* Ağız şeması — DentalChartScreen ile aynı görünüm */
.sema-secici { display: flex; gap: 12px; margin-bottom: 14px; }
.sema-cene { flex: 1; height: 36px; border-radius: 18px; font-size: 12px; color: #fff; cursor: pointer; transition: background .16s; }
.sema-cene.secili { background: #D4A444; font-weight: 700; }
.sema-sahne { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 1; }
.sema-resim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.sema-dis { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(23,22,19,.9); border: 1.1px solid #D5A642; box-shadow: 0 1px 5px rgba(0,0,0,.45);
  color: #FFE5A4; font-size: 10.5px; font-weight: 900; line-height: 1; cursor: pointer; transition: transform .15s; }
.sema-dis:hover { transform: scale(1.12); }
.sema-dis.islemli { background: color-mix(in srgb, var(--renk) 85%, transparent); color: #171511; }
.sema-dis.secili { outline: 3px solid #FFE5A4; outline-offset: 2px; }
@media (max-width: 420px) { .sema-dis { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 9.5px; } }
.sema-lejant { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; justify-content: center; }
.sema-lejant-oge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #AAB4C1; }
.sema-lejant-nokta { width: 10px; height: 10px; border-radius: 999px; }

/* Açılır listeler (select): açılan menü tarayıcının beyaz zemininde açılıp beyaz yazıyı görünmez yapıyordu.
   Menü koyu zeminde açılır; seçenekler açık renkte, seçili/üzerine gelinen satır turkuaz. */
select { color-scheme: dark; cursor: pointer; }
select option, select optgroup { background-color: #121b23; color: #eef3f5; }
select option:checked { background-color: #0f8279; color: #ffffff; }
select option:disabled { color: #6b7883; }
.app-body select option, .app-body select optgroup { background-color: #1a1d1d; color: #f3f1ec; }
.app-body select option:checked { background-color: #8a6a22; color: #ffffff; }

/* Kimlik bilgileri uyarısı (kayıt + hasta profili) ve kilitli bilgi satırları */
.kimlik-uyari { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(233, 162, 59, .1); border: 1px solid rgba(233, 162, 59, .35); color: #f1dcb4; font-size: 14px; line-height: 1.55; }
.kimlik-uyari svg { width: 22px; height: 22px; flex: none; color: #e9a23b; margin-top: 1px; }
.kimlik-uyari b { color: #fff3dc; font-weight: 600; }
.kimlik-liste { border-top: 1px solid rgba(255, 255, 255, .08); }
.kimlik-satir { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 2px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.kimlik-satir dt { color: #a8a49c; font-size: 14px; }
.kimlik-satir dd { margin: 0; display: inline-flex; align-items: center; gap: 10px; color: #f3f1ec; font-weight: 600; text-align: right; }
.kimlik-satir dd svg { width: 16px; height: 16px; opacity: .55; flex: none; }
/* Destek sekmesi yalnızca destek hesabında görünür (js/destek.js html.destek-acik ekler) */
[data-sekme="destek"] { display: none !important; }
.destek-acik [data-sekme="destek"] { display: flex !important; }

/* Panellerde (siyah/altın) ana buton altın zemin üzerinde koyu yazı */
.app-body .bg-fill.text-white, .app-body .bg-fill .text-white { color: #1a1406; }
