/* ==========================================================
   Doğum Günü — arayüz katmanı
   3D sahne canvas'ta; buradaki her şey onun üstünde yüzüyor.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #05060f;
  color: #f4ecdf;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body { touch-action: manipulation; }

#sahne {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}

.katman {
  position: fixed; inset: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.gecirgen { pointer-events: none; }

.gizli { display: none !important; }

/* ---------- ortak yumuşak geçiş ---------- */
.solur { opacity: 0; transition: opacity .9s ease; }
.gorunur { opacity: 1; }

/* ==========================================================
   YÜKLEME EKRANI
   ========================================================== */

#yukleme {
  z-index: 60;
  background:
    radial-gradient(120% 90% at 50% 8%, #16183a 0%, #0a0b1c 45%, #05060f 100%);
  transition: opacity .8s ease, visibility .8s;
}
#yukleme.bitti { opacity: 0; visibility: hidden; pointer-events: none; }

/* arka planda hafif hareket eden yıldız dokusu */
#yukleme::before {
  content: "";
  position: absolute; inset: -20%;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.1px 1.1px at 70% 20%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.6px 1.6px at 45% 70%, rgba(255,225,180,.5), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.2px 1.2px at 12% 80%, rgba(255,255,255,.3), transparent),
    radial-gradient(1.3px 1.3px at 60% 88%, rgba(255,215,170,.4), transparent);
  background-size: 100% 100%;
  animation: yildiz-kay 60s linear infinite alternate;
  opacity: .8;
}
@keyframes yildiz-kay { from { transform: translate3d(0,0,0) } to { transform: translate3d(-3%, -2%, 0) } }

.yuk-kutu {
  position: relative;
  width: min(560px, 88vw);
  padding: 0 4px;
  animation: yuk-gir .8s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes yuk-gir { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

.yuk-ust {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.yuk-etiket {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(244,236,223,.5); font-weight: 600;
}
.yuk-yuzde {
  font-variant-numeric: tabular-nums;
  font-size: 34px; font-weight: 300; line-height: 1;
  color: var(--vurgu, #ffcf8a);
  text-shadow: 0 0 26px rgba(255,190,110,.35);
}
.yuk-yuzde small { font-size: 15px; opacity: .55; margin-left: 2px; }

/* --- ilerleme çubuğu --- */
.yuk-bar {
  position: relative;
  height: 4px; width: 100%;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.yuk-dolgu {
  position: absolute; inset: 0 auto 0 0;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff9a4d, var(--vurgu, #ffcf8a) 60%, #fff2d8);
  box-shadow: 0 0 18px rgba(255,180,100,.6);
  transition: width .35s cubic-bezier(.3,.9,.3,1);
}
.yuk-parlak {
  position: absolute; top: 0; bottom: 0; width: 90px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  filter: blur(2px);
  animation: parla 1.6s ease-in-out infinite;
}
@keyframes parla { 0% { left: -90px } 100% { left: 100% } }

.yuk-alt {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; gap: 16px;
  font-size: 12.5px;
}
.yuk-dosya {
  color: rgba(244,236,223,.42);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 62%;
}
.yuk-mb {
  color: rgba(244,236,223,.8);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* --- adım listesi (oyun yükleme ekranı hissi) --- */
.yuk-adimlar {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; gap: 9px;
}
.yuk-adimlar li {
  display: flex; align-items: center; gap: 11px;
  font-size: 13px;
  color: rgba(244,236,223,.28);
  transition: color .4s ease;
}
.yuk-adimlar li i {
  width: 7px; height: 7px; flex: 0 0 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  transition: background .4s ease, box-shadow .4s ease, transform .4s ease;
}
.yuk-adimlar li.aktif { color: rgba(244,236,223,.85); }
.yuk-adimlar li.aktif i {
  background: var(--vurgu, #ffcf8a);
  box-shadow: 0 0 12px rgba(255,190,110,.8);
  animation: nabiz 1.1s ease-in-out infinite;
}
.yuk-adimlar li.tamam { color: rgba(244,236,223,.55); }
.yuk-adimlar li.tamam i {
  background: #7bd88f; box-shadow: 0 0 8px rgba(123,216,143,.5); animation: none;
}
@keyframes nabiz { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.45); opacity: .65 } }

.yuk-ipucu {
  margin-top: 24px;
  min-height: 34px;
  font-size: 13px; line-height: 1.5;
  color: rgba(244,236,223,.4);
  font-style: italic;
  transition: opacity .5s ease;
}

/* --- BAŞLA butonu --- */
.basla {
  margin-top: 26px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 17px 22px;
  border: 1px solid rgba(255,207,138,.4);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,207,138,.13), rgba(255,207,138,.04));
  color: #ffe9c8;
  font-family: inherit;
  cursor: pointer;
  animation: basla-gir .7s cubic-bezier(.2,.8,.2,1) both;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
  box-shadow: 0 0 0 rgba(255,190,110,0);
}
.basla span { font-size: 15px; letter-spacing: .3em; font-weight: 600; }
.basla small { font-size: 10.5px; letter-spacing: .16em; color: rgba(255,233,200,.45); text-transform: lowercase; }
.basla:hover {
  transform: translateY(-2px);
  border-color: rgba(255,207,138,.75);
  box-shadow: 0 10px 40px rgba(255,170,80,.22);
}
.basla:active { transform: translateY(0); }
@keyframes basla-gir { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

/* ==========================================================
   BAŞLIK (isim)
   ========================================================== */
.baslik {
  position: absolute;
  top: clamp(38px, 9vh, 90px);
  left: 50%; transform: translateX(-50%) translateY(-12px);
  text-align: center;
  opacity: 0;
  transition: opacity 1.6s ease, transform 1.6s cubic-bezier(.2,.8,.2,1);
  text-shadow: 0 2px 30px rgba(0,0,0,.85);
}
.baslik.ac { opacity: 1; transform: translateX(-50%) translateY(0); }
.baslik-ust {
  display: block;
  font-size: clamp(10px, 1.5vw, 13px);
  letter-spacing: .48em; text-transform: uppercase;
  color: rgba(255,225,190,.62);
  margin-bottom: 12px;
  padding-left: .48em;
}
.baslik-isim {
  display: block;
  font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
  font-size: clamp(34px, 7.2vw, 82px);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1;
  color: #fff4e2;
  text-shadow: 0 0 50px rgba(255,190,110,.4), 0 2px 24px rgba(0,0,0,.6);
}

/* ==========================================================
   ÜFLEME İPUCU
   ========================================================== */
.ipucu {
  position: absolute;
  bottom: clamp(42px, 8vh, 84px);
  left: 50%; transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1);
  text-align: center;
}
.ipucu.ac { opacity: 1; transform: translateX(-50%) translateY(0); animation: ipucu-sallan 3.4s ease-in-out infinite 1s; }
@keyframes ipucu-sallan { 0%,100% { transform: translateX(-50%) translateY(0) } 50% { transform: translateX(-50%) translateY(-5px) } }

.ipucu-ic {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 20px;
  border-radius: 99px;
  background: rgba(10,10,22,.42);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13.5px;
  color: rgba(255,240,222,.88);
  white-space: nowrap;
}
.tus {
  padding: 4px 12px;
  border-radius: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  border-bottom-width: 2.5px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .06em;
}
.ipucu-ya { color: rgba(255,240,222,.4); font-size: 12px; }
.mik { display: inline-flex; align-items: center; gap: 7px; opacity: .35; transition: opacity .5s ease; }
.mik.aktif { opacity: 1; }
.mik-nokta {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff5f6d; box-shadow: 0 0 9px rgba(255,95,109,.85);
}
.mik.aktif .mik-nokta { animation: nabiz 1.5s ease-in-out infinite; }

/* mikrofon üfleme seviye çubuğu */
.ufleme-olcer {
  height: 3px; width: 100%;
  margin-top: 10px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  opacity: 0; transition: opacity .5s ease;
}
.ipucu.mik-var .ufleme-olcer { opacity: 1; }
.ufleme-dolgu {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7bd8ff, var(--vurgu, #ffcf8a));
  box-shadow: 0 0 10px rgba(255,190,110,.6);
  transition: width .08s linear;
}

/* pastayı çevirme ipucu — yalnızca inceleme açıkken */
.inceleme-ipucu {
  display: none;
  margin: 10px auto 0;
  width: fit-content;
  padding: 5px 13px;
  border-radius: 99px;
  background: rgba(10,10,22,.36);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11px;
  letter-spacing: .13em;
  color: rgba(255,240,222,.6);
}
.ipucu.inceleme-var .inceleme-ipucu { display: block; }

/* ==========================================================
   SÖZLER
   ========================================================== */
.sozler {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, 86vw);
  text-align: center;
}
.soz {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(calc(-50% + 26px));
  opacity: 0;
  font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
  font-size: clamp(21px, 3.6vw, 40px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .015em;
  color: #fff3e3;
  text-shadow: 0 0 44px rgba(0,0,0,.9), 0 2px 20px rgba(0,0,0,.8);
  transition: opacity 1.15s ease, transform 1.15s cubic-bezier(.2,.8,.2,1), filter 1.15s ease;
  filter: blur(6px);
}
.soz.ac { opacity: 1; transform: translateY(-50%); filter: blur(0); }
.soz.kapan { opacity: 0; transform: translateY(calc(-50% - 26px)); filter: blur(6px); }

/* ==========================================================
   GALERİ ALTYAZI + FİNAL
   ========================================================== */
.galeri-altyazi {
  position: absolute;
  bottom: clamp(46px, 9vh, 90px);
  left: 50%; transform: translateX(-50%);
  font-size: clamp(12px, 1.6vw, 15px);
  letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,235,210,.5);
  opacity: 0; transition: opacity 1s ease;
  text-shadow: 0 2px 18px rgba(0,0,0,.9);
  pointer-events: none;
}
.galeri-altyazi.ac { opacity: 1; }

.final {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0; visibility: hidden;
  transition: opacity 1.6s ease, visibility 1.6s;
}
.final.ac { opacity: 1; visibility: visible; }
/* yıldızlar gökyüzüne isim yazarken final sözü onun altına iner */
.final.yildizli { top: 76%; }
.final.yildizli .final-metin { font-size: clamp(20px, 3.4vw, 36px); }
.final-metin {
  margin: 0 0 34px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 5vw, 54px);
  color: #fff4e4;
  text-shadow: 0 0 60px rgba(255,190,110,.45), 0 2px 24px rgba(0,0,0,.7);
}
.tekrar {
  pointer-events: auto;
  padding: 12px 30px;
  border-radius: 99px;
  border: 1px solid rgba(255,207,138,.35);
  background: rgba(255,207,138,.07);
  color: rgba(255,233,200,.85);
  font-family: inherit; font-size: 12.5px;
  letter-spacing: .26em; text-transform: uppercase;
  cursor: pointer;
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.tekrar:hover { background: rgba(255,207,138,.16); border-color: rgba(255,207,138,.7); transform: translateY(-1px); }

/* ==========================================================
   SES BUTONU
   ========================================================== */
.ses-btn {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 40;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,10,22,.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,240,222,.7);
  cursor: pointer;
  opacity: 0; transform: scale(.85);
  transition: opacity .6s ease, transform .3s cubic-bezier(.2,.8,.2,1), color .3s ease, border-color .3s ease;
}
.ses-btn.ac { opacity: 1; transform: scale(1); }
.ses-btn:hover { color: #fff; border-color: rgba(255,207,138,.5); }
.ses-btn svg { width: 21px; height: 21px; fill: currentColor; }
.ses-btn .ses-kapali { display: none; }
.ses-btn.sessiz .ses-acik { display: none; }
.ses-btn.sessiz .ses-kapali { display: block; }
.ses-btn.sessiz { color: rgba(255,240,222,.32); }

/* ==========================================================
   VİNYET / KARARTMA
   ========================================================== */
.vinyet {
  position: fixed; inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(115% 85% at 50% 46%, transparent 42%, rgba(3,4,12,.55) 82%, rgba(3,4,12,.86) 100%);
  opacity: .9;
}
.karartma {
  position: fixed; inset: 0;
  z-index: 8;
  pointer-events: none;
  background: #03040c;
  opacity: 0;
  transition: opacity 1.2s ease;
}

/* ==========================================================
   ATIF / NOSCRIPT
   ========================================================== */
.atif {
  position: fixed;
  bottom: 6px; left: 50%; transform: translateX(-50%);
  z-index: 3;
  width: 96vw; text-align: center;
  font-size: 9.5px; line-height: 1.4;
  color: rgba(255,240,222,.13);
  pointer-events: none;
  transition: opacity .6s ease;
}
.atif.sakli { opacity: 0; }

.noscript {
  position: fixed; inset: 0; z-index: 99;
  display: grid; place-items: center;
  background: #05060f; color: #f4ecdf; font-size: 16px;
}

/* ==========================================================
   KÜÇÜK EKRAN
   ========================================================== */
@media (max-width: 620px) {
  .yuk-adimlar { gap: 7px; }
  .yuk-adimlar li { font-size: 12px; }
  .yuk-dosya { max-width: 50%; font-size: 11px; }
  .yuk-mb { font-size: 11.5px; }
  .ipucu-ic { font-size: 12px; padding: 9px 15px; gap: 8px; }
  .ipucu-ya { display: none; }
  .atif { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ipucu.ac { animation: none; }
  .yuk-parlak, #yukleme::before { animation: none; }
}
