/* Müze Gecesi: Elmas Operasyonu · BAIBUSEC Network 101 · Bölüm 5 */

:root {
  --bg: #060A14;
  --panel: #0C1324;
  --panel2: #111A30;
  --cizgi: #1E2B47;
  --cizgi2: #2A3A5E;
  --yazi: #E6ECF8;
  --soluk: #8FA0C4;
  --soluk2: #5E6F96;
  --mavi: #4DA3FF;
  --yesil: #3DD68C;
  --turuncu: #F2B544;
  --kirmizi: #FF7A6B;
  --f-baslik: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-metin: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-kod: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ust-h: 60px;
  --alt-h: 60px;
  --r: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 700px at 50% 30%, #0B1430 0%, var(--bg) 70%);
  color: var(--yazi);
  font-family: var(--f-metin);
  font-size: 15px;
  line-height: 1.45;
  display: grid;
  grid-template-rows: var(--ust-h) 1fr var(--alt-h);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [role="switch"]:focus-visible { outline: 3px solid var(--mavi); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-baslik); margin: 0; letter-spacing: -0.01em; }

/* ---------- düğmeler ---------- */
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-mavi { background: var(--mavi); color: #04101F; }
.btn-mavi:hover { box-shadow: 0 0 0 4px rgba(77,163,255,.25); }
.btn-yesil { background: rgba(61,214,140,.14); color: var(--yesil); border-color: rgba(61,214,140,.5); }
.btn-yesil:hover { background: rgba(61,214,140,.24); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--cizgi2); color: var(--yazi); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-buyuk { min-height: 54px; padding: 0 40px; font-size: 18px; border-radius: 14px; }

/* ---------- üst çubuk ---------- */
.ust {
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
  border-bottom: 1px solid var(--cizgi); background: rgba(6,10,20,.75); backdrop-filter: blur(6px);
  position: relative; z-index: 5;
}
.marka { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marka-elmas { font-size: 26px; filter: drop-shadow(0 0 8px rgba(127,216,255,.6)); }
.marka-ad { font-family: var(--f-baslik); font-weight: 700; font-size: 17px; white-space: nowrap; }
.marka-alt { font-size: 12px; color: var(--soluk); white-space: nowrap; }
.durum { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.saat {
  font-family: var(--f-kod); font-weight: 700; font-size: 18px; color: var(--mavi);
  background: rgba(77,163,255,.1); border: 1px solid rgba(77,163,255,.35);
  padding: 6px 12px; border-radius: 10px; display: flex; gap: 8px; align-items: center;
}
.saat-ikon { font-size: 15px; }
.ilerleme {
  font-weight: 600; font-size: 14px; color: var(--yazi);
  background: rgba(255,255,255,.05); border: 1px solid var(--cizgi2); padding: 8px 12px; border-radius: 10px;
  white-space: nowrap;
}
.ids-ac { display: none; }
.rozet-sayi {
  background: var(--turuncu); color: #1A1200; border-radius: 99px; font-size: 12px; min-width: 22px; height: 22px;
  display: inline-grid; place-items: center; padding: 0 6px; font-weight: 800;
}

/* ---------- sahne ---------- */
.sahne {
  display: grid; grid-template-columns: 360px minmax(0, 1fr) 330px; min-height: 0;
}

/* kartlar: 6 karo + seçili kartın detayı */
.kartlar {
  overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; position: relative;
  border-right: 1px solid var(--cizgi); scrollbar-width: thin; scrollbar-color: var(--cizgi2) transparent;
}
.karolar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.karo {
  position: relative; min-height: 78px; border-radius: 14px; border: 1px solid var(--cizgi);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 8px 4px;
  transition: transform .2s cubic-bezier(.3,1.4,.5,1), border-color .2s, box-shadow .2s, background .2s;
}
.karo:hover { transform: translateY(-2px); border-color: var(--cizgi2); }
.karo.secili { border-color: var(--mavi); box-shadow: 0 0 0 1px var(--mavi), 0 8px 24px rgba(77,163,255,.18); background: linear-gradient(180deg, #13244A, #0D1730); }
.karo.aktif { border-color: var(--turuncu); box-shadow: 0 0 0 1px var(--turuncu), 0 8px 24px rgba(242,181,68,.25); }
.karo.tamam { background: linear-gradient(180deg, #0F2A20, #0B1A16); }
.karo.tamam:not(.secili) { border-color: rgba(61,214,140,.55); }
.karo-no {
  position: absolute; top: 6px; left: 8px; font-size: 11px; font-weight: 800; color: var(--soluk);
}
.karo-ikon { font-size: 26px; line-height: 1.1; }
.karo-ad { font-size: 13px; font-weight: 700; }
.karo-durum { position: absolute; top: 5px; right: 6px; display: flex; gap: 2px; font-style: normal; }
.karo-durum i { font-style: normal; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.karo .d-tik { background: var(--yesil); color: #04140C; font-weight: 900; }
.karo .d-kalkan { background: rgba(61,214,140,.18); }
.karo.denendi .d-tik, .karo.savunmali .d-kalkan { transform: scale(1); }

.kart {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--cizgi2); border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  animation: kartGel .35s cubic-bezier(.3,1.2,.5,1) both;
  transition: border-color .25s, box-shadow .25s;
}
@keyframes kartGel { from { opacity: 0; transform: translateY(8px); } }
.kart.aktif { border-color: rgba(242,181,68,.7); box-shadow: 0 0 0 1px rgba(242,181,68,.3), 0 10px 30px rgba(242,181,68,.12); }
.kart-ust { display: flex; gap: 12px; align-items: center; }
.kart-ikon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px;
  background: rgba(77,163,255,.1); border: 1px solid rgba(77,163,255,.3); flex-shrink: 0;
}
.kart-no { margin: 0; font-size: 12px; font-weight: 700; color: var(--soluk); }
.kart h3 { font-size: 20px; line-height: 1.2; }
.aciklama { margin: 0; font-size: 15px; color: #C5D0E8; }
.saldir {
  background: var(--turuncu); color: #1F1400; width: 100%; min-height: 54px; font-size: 18px; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(242,181,68,.28);
}
.saldir:hover:not([disabled]) { box-shadow: 0 0 0 4px rgba(242,181,68,.25), 0 6px 18px rgba(242,181,68,.28); }
.anahtar {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; width: 100%; text-align: left;
  background: rgba(255,255,255,.03); border: 1px solid var(--cizgi2); border-radius: 14px; font-size: 14px;
  color: var(--soluk); transition: border-color .25s, background .25s, box-shadow .25s;
}
.anahtar-yazi { flex: 1; line-height: 1.3; }
.anahtar-yazi b { color: var(--yazi); font-weight: 700; }
.anahtar-durum { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.anahtar-iz { width: 46px; height: 26px; border-radius: 99px; background: #26314F; position: relative; transition: background .25s; flex-shrink: 0; }
.anahtar-top { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #9FB2D8; transition: transform .25s cubic-bezier(.3,1.4,.5,1), background .25s; }
.anahtar[aria-checked="true"] { color: var(--yesil); border-color: rgba(61,214,140,.6); background: rgba(61,214,140,.08); }
.anahtar[aria-checked="true"] .anahtar-iz { background: rgba(61,214,140,.35); }
.anahtar[aria-checked="true"] .anahtar-top { transform: translateX(20px); background: var(--yesil); }
.anahtar.nabiz { animation: anahtarNabiz 2s ease-in-out infinite; border-color: rgba(61,214,140,.6); }
@keyframes anahtarNabiz { 0%,100% { box-shadow: 0 0 0 0 rgba(61,214,140,0); } 50% { box-shadow: 0 0 0 5px rgba(61,214,140,.25); } }

.son-sonuc { font-size: 14px; color: #DCE4F5; display: none; flex-direction: column; gap: 6px; align-items: flex-start; }
.son-sonuc.var { display: flex; animation: kartGel .3s ease both; }
.ipucu { display: none; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 14px; color: #CFE0FF; }
.ipucu.var { display: flex; animation: kartGel .3s ease both; }
.sonraki { min-height: 44px; }
.pill {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  flex-shrink: 0;
}
.pill-turuncu { background: rgba(242,181,68,.16); color: var(--turuncu); border: 1px solid rgba(242,181,68,.5); }
.pill-yesil { background: rgba(61,214,140,.14); color: var(--yesil); border: 1px solid rgba(61,214,140,.5); }
.pill-mavi { background: rgba(77,163,255,.14); color: var(--mavi); border: 1px solid rgba(77,163,255,.5); }

.mavi-not {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease, opacity .4s;
  opacity: 0; visibility: hidden; margin-top: -12px;
}
.mavi-not > div { overflow: hidden; }
.kart.savunmali .mavi-not { grid-template-rows: 1fr; opacity: 1; visibility: visible; margin-top: 0; }
.mavi-not-ic {
  border-left: 3px solid var(--mavi); background: rgba(77,163,255,.08); border-radius: 0 10px 10px 0;
  padding: 8px 10px; font-size: 14px; color: #CFE0FF;
}
.mavi-not-ic strong { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mavi); margin-bottom: 2px; }

/* kamera paneli */
.kam-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s ease; visibility: hidden; margin-top: -12px; }
.kam-panel > div { overflow: hidden; }
.kam-panel.acik { grid-template-rows: 1fr; visibility: visible; margin-top: 0; }
.kam-panel-ic { border: 1px solid rgba(242,181,68,.5); border-radius: 14px; padding: 10px; background: rgba(242,181,68,.05); }
.kam-panel-baslik { font-size: 13px; font-weight: 800; color: var(--turuncu); margin-bottom: 8px; display: flex; justify-content: space-between; }
.kam-rec { color: #FF7A6B; animation: nabiz 2.2s ease-in-out infinite; }
.kam-ekran { width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; background: #071A14; display: block; border: 2px solid #1F4F3E; box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
.kam-butonlar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.kam-butonlar .btn {
  min-height: 56px; font-size: 14px; padding: 6px; background: rgba(255,255,255,.04); border-color: var(--cizgi2);
  flex-direction: column; gap: 2px;
}
.kam-butonlar .kb-ikon { font-size: 20px; line-height: 1; }
.kam-butonlar .btn:hover:not([disabled]) { border-color: var(--turuncu); }
.kam-butonlar .btn.yapildi { border-color: rgba(242,181,68,.7); color: var(--turuncu); background: rgba(242,181,68,.08); }
/* ---------- harita ---------- */
.harita-alan {
  container-type: size; min-width: 0; min-height: 0; display: grid; place-items: center; padding: 14px;
}
.harita-kutu {
  position: relative; width: min(100cqw, calc(100cqh * 1200 / 760)); aspect-ratio: 1200 / 760;
  border-radius: 18px; overflow: hidden; container-type: inline-size;
  box-shadow: 0 0 0 1px var(--cizgi), 0 30px 80px rgba(0,0,0,.5);
}
.harita-yer, .harita-yer svg { width: 100%; height: 100%; display: block; }
.harita-hata { display: grid; place-items: center; height: 100%; padding: 20px; text-align: center; color: var(--soluk); }
.harita-hata code { font-family: var(--f-kod); color: var(--turuncu); }
.katman-html { position: absolute; inset: 0; pointer-events: none; }

/* SVG metinleri */
#harita text { font-family: var(--f-metin); }
#harita .etiket { font-size: 12px; font-weight: 600; fill: #A9B8DA; }
#harita .etiket-kucuk { font-size: 10px; font-weight: 700; letter-spacing: .08em; fill: #8193BD; }
#harita .soluk { fill: #5E6F96; }
#harita .koyu { fill: #1E2B47; }
#harita .yesil { fill: var(--yesil); }
#harita .turuncu { fill: var(--turuncu); }
#harita .oda-etiket text, #harita .oda-etiket-t { font-family: var(--f-baslik); font-size: 13px; font-weight: 700; letter-spacing: .16em; fill: #5A6F9E; }
#harita .cihaz-yazi { font-family: var(--f-kod); font-size: 9px; font-weight: 700; fill: #9FB2D8; }
#harita .mon-yazi { font-family: var(--f-kod); font-size: 8px; font-weight: 700; fill: #7EE2B0; }
#harita .mon-uyari { font-size: 7px; font-weight: 800; fill: var(--turuncu); letter-spacing: .05em; }
#harita .kam-etiket { font-family: var(--f-kod); font-size: 10px; font-weight: 700; fill: #9FB2D8; }
#harita .rozet-yazi { font-family: var(--f-metin); font-size: 11px; font-weight: 800; fill: var(--yesil); letter-spacing: .04em; }
#harita .fx-yazi { font-family: var(--f-kod); font-size: 11px; font-weight: 700; }

.led { animation: led 2.6s ease-in-out infinite; }
.led-g2 { animation-delay: -.9s; } .led-g3 { animation-delay: -1.7s; }
.led-yesil { fill: var(--yesil); } .led-mavi { fill: var(--mavi); }
@keyframes led { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.yildiz { animation: yildiz 5s ease-in-out infinite; }
.yildiz.y2 { animation-delay: -1.6s; } .yildiz.y3 { animation-delay: -3.2s; }
@keyframes yildiz { 0%,100% { opacity: .9; } 50% { opacity: .3; } }
#elmas-don { transform-box: fill-box; transform-origin: center; animation: elmasDon 6s ease-in-out infinite; }
@keyframes elmasDon { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(.45); } }
#elmas-hale { transform-box: fill-box; transform-origin: center; animation: hale 4s ease-in-out infinite; }
@keyframes hale { 0%,100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
.koni { transition: opacity .4s; }
.ziyaretci { transition: transform .6s ease; }
#ziyaretci-3-ic { transform-box: fill-box; transform-origin: center; transition: transform .6s ease; }
#ziyaretci-3-ic.uzgun { transform: scaleX(-1) translateX(-14px) rotate(-8deg); }
.rozet { transform-box: fill-box; transform-origin: center; }
.rozet-gel { animation: rozetGel 1.4s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes rozetGel { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.halka { transform-box: fill-box; transform-origin: center; animation: halka 1.4s ease-out both; }
@keyframes halka { from { transform: scale(.3); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.yavas-nabiz { transform-box: fill-box; transform-origin: center; animation: nabiz 2.2s ease-in-out infinite; }
@keyframes nabiz { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* HTML katman öğeleri */
.ovl {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none;
  font-size: clamp(11px, 1.25cqw, 18px); z-index: 2;
}
.ovl.alt { transform: translate(-50%, 0); }
.ovl.orta { transform: translate(-50%, -50%); }
.ovl.sol { transform: translate(0, -100%); }
.ovl-ic { animation: ovlGel .35s cubic-bezier(.3,1.4,.5,1) both; transform-origin: 50% 100%; }
.ovl.alt .ovl-ic { transform-origin: 50% 0; }
.ovl-ic.cik { animation: ovlCik .25s ease-in both; }
@keyframes ovlGel { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes ovlCik { to { opacity: 0; transform: scale(.85); } }

.ovl-panel {
  background: rgba(8,13,26,.94); border: 1px solid var(--cizgi2); border-radius: .7em; padding: .6em .8em;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); color: var(--yazi); min-width: 12em; max-width: 26em;
}
.ovl-panel.turuncu { border-color: rgba(242,181,68,.7); }
.ovl-panel.yesil { border-color: rgba(61,214,140,.7); }
.ovl-panel h4 { margin: 0 0 .3em; font-family: var(--f-baslik); font-size: .95em; display: flex; justify-content: space-between; gap: 1em; }
.ovl-panel .kod { font-family: var(--f-kod); font-size: .9em; overflow-wrap: anywhere; line-height: 1.5; }
.ovl-panel .kucuk { font-size: .8em; color: var(--soluk); }
.ovl-panel .buyuk-sayi { font-family: var(--f-kod); font-weight: 700; font-size: 1.25em; color: var(--turuncu); }
.ovl-panel .vurgu-yesil { color: var(--yesil); font-weight: 800; }
.ovl-panel .vurgu-turuncu { color: var(--turuncu); font-weight: 800; }
.ovl-panel .vurgu-kirmizi { color: var(--kirmizi); font-weight: 800; }
.duz-metin { color: var(--turuncu); }
.duz-metin mark { background: rgba(242,181,68,.25); color: #FFE2A0; border-radius: 3px; padding: 0 .15em; }
.sifreli { color: #7E8DB0; }
.ovl-balon {
  background: #F4F7FF; color: #121A2E; border-radius: 1em; padding: .5em .8em; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); position: relative; white-space: nowrap;
}
.ovl-balon::after {
  content: ""; position: absolute; left: 50%; bottom: -.45em; width: .9em; height: .9em; background: #F4F7FF;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.ovl-pill {
  background: rgba(8,13,26,.92); border: 1px solid var(--cizgi2); border-radius: 99px; padding: .3em .8em;
  font-weight: 800; font-size: .9em; white-space: nowrap; color: var(--yazi);
}
.ovl-pill.turuncu { color: var(--turuncu); border-color: rgba(242,181,68,.7); }
.ovl-pill.yesil { color: var(--yesil); border-color: rgba(61,214,140,.7); }
.ovl-pill.mavi { color: var(--mavi); border-color: rgba(77,163,255,.7); }
.ovl-kural {
  font-family: var(--f-kod); font-weight: 700; background: #07140E; color: var(--yesil); border: 2px solid var(--yesil);
  border-radius: .5em; padding: .45em .8em; white-space: nowrap; box-shadow: 0 0 24px rgba(61,214,140,.35);
}
.ovl-login { min-width: 15em; }
.ovl-login .alan {
  display: flex; justify-content: space-between; gap: .8em; background: rgba(255,255,255,.05); border: 1px solid var(--cizgi2);
  border-radius: .4em; padding: .3em .5em; margin-top: .35em; font-family: var(--f-kod); font-size: .9em;
}
.ovl-login .alan span:first-child { color: var(--soluk); font-family: var(--f-metin); }
.ovl-login .durum-satir { margin-top: .45em; font-weight: 800; min-height: 1.3em; }
.salla { animation: salla .45s ease-in-out; }
@keyframes salla { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.ovl-calindi {
  font-family: var(--f-baslik); font-weight: 700; font-size: 3.4em; letter-spacing: .08em; color: #FFE2A0;
  text-shadow: 0 0 30px rgba(242,181,68,.7), 0 4px 0 #6B4A0C; white-space: nowrap;
  background: rgba(20,10,4,.55); padding: .15em .6em; border-radius: .3em; border: 2px solid rgba(242,181,68,.6);
}
.ovl-feed { width: 21em; max-width: 21em; }
.ovl-feed svg { width: 100%; display: block; border-radius: .4em; }

.anlatim {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  background: rgba(6,10,20,.88); border: 1px solid var(--cizgi2); color: var(--yazi);
  padding: .45em 1em; border-radius: 99px; font-weight: 700; font-size: clamp(12px, 1.35cqw, 20px);
  white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .3s; z-index: 4;
}
.anlatim.var { opacity: 1; }
.sonuc {
  position: absolute; left: 50%; bottom: 3%; transform: translate(-50%, 20px); opacity: 0;
  transition: opacity .35s, transform .35s cubic-bezier(.3,1.4,.5,1);
  display: flex; align-items: center; gap: .7em; z-index: 4; max-width: 94%;
  background: rgba(6,10,20,.94); border: 2px solid var(--cizgi2); border-radius: 14px; padding: .55em .9em;
  font-size: clamp(12px, 1.3cqw, 20px); font-weight: 600;
}
.sonuc.var { opacity: 1; transform: translate(-50%, 0); }
.sonuc.basarili { border-color: var(--turuncu); box-shadow: 0 0 30px rgba(242,181,68,.25); }
.sonuc.engel { border-color: var(--yesil); box-shadow: 0 0 30px rgba(61,214,140,.25); }
.sonuc .pill { font-size: .8em; }
.sonuc-ikon { font-size: 1.4em; }
.atla {
  position: absolute; right: 1.5%; top: 2.5%; z-index: 5; background: rgba(6,10,20,.9); border: 1px solid var(--cizgi2);
  font-size: clamp(13px, 1.2cqw, 17px);
}
.atla:hover { background: rgba(30,43,71,.95); }
.harita-kutu::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0;
  box-shadow: inset 0 0 120px 30px rgba(255,110,60,.55); transition: opacity .6s;
}
.harita-kutu.alarm::after { animation: alarm 2.4s ease-in-out infinite; }
@keyframes alarm { 0%,100% { opacity: .15; } 50% { opacity: .85; } }

/* ---------- IDS ---------- */
.ids {
  border-left: 1px solid var(--cizgi); display: flex; flex-direction: column; min-height: 0; background: rgba(6,10,20,.5);
}
.ids-ust { padding: 14px 14px 10px; border-bottom: 1px solid var(--cizgi); display: flex; justify-content: space-between; align-items: flex-start; }
.ids-ust h2 { font-size: 16px; letter-spacing: .06em; }
.ids-slogan { margin: 2px 0 0; color: var(--mavi); font-weight: 700; font-size: 14px; }
.ids-kapat { display: none; min-width: 44px; padding: 0; }
.ids-liste { list-style: none; margin: 0; padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--cizgi2) transparent; }
.ids-satir {
  font-family: var(--f-kod); font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--cizgi); border-left-width: 3px;
  animation: idsGel .45s cubic-bezier(.3,1.3,.5,1) both;
}
.ids-satir time { color: var(--soluk); margin-right: 6px; }
.ids-satir .ids-mesaj { color: #D6DEF0; }
.ids-satir .pill { display: inline-block; margin-top: 6px; font-family: var(--f-metin); }
.ids-satir.tespit { border-left-color: var(--turuncu); }
.ids-satir.engel { border-left-color: var(--yesil); }
.ids-satir.bilgi { border-left-color: var(--mavi); opacity: .8; }
@keyframes idsGel { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- alt çubuk ---------- */
.alt {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; border-top: 1px solid var(--cizgi);
  background: rgba(6,10,20,.75);
}
.alt-not { margin-left: auto; font-size: 12px; color: var(--soluk2); }

/* ---------- açılış ---------- */
.acilis {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 50% 40%, rgba(77,163,255,.14), transparent 70%), rgba(4,7,14,.94);
  transition: opacity .5s ease, visibility .5s;
}
.acilis.gizli { opacity: 0; visibility: hidden; }
.acilis-kutu { max-width: 640px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.acilis-elmas svg { width: 92px; height: 92px; filter: drop-shadow(0 0 22px rgba(127,216,255,.7)); animation: yuz 4s ease-in-out infinite; }
@keyframes yuz { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.acilis-ust { margin: 0; color: var(--mavi); font-weight: 700; letter-spacing: .08em; font-size: 13px; text-transform: uppercase; }
.acilis h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.05; }
.acilis-hikaye { margin: 0; font-size: clamp(16px, 2vw, 20px); color: #CFDAF2; }
.acilis-adimlar { list-style: none; margin: 6px 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.acilis-adimlar li { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--cizgi2); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.adim-no { width: 22px; height: 22px; border-radius: 50%; background: var(--mavi); color: #04101F; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.adim-ikon { font-size: 20px; }
.acilis-kural {
  margin: 4px 0 8px; font-weight: 700; color: var(--turuncu); background: rgba(242,181,68,.1);
  border: 1px solid rgba(242,181,68,.45); padding: 8px 14px; border-radius: 10px;
}
.acilis-sayac { width: 180px; height: 4px; border-radius: 99px; background: var(--cizgi); overflow: hidden; }
.acilis-sayac span { display: block; height: 100%; width: 0; background: var(--mavi); }

/* ---------- final ---------- */
.final {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(4,7,14,.82); backdrop-filter: blur(4px); animation: finalGel .5s ease both;
}
.final[hidden] { display: none; }
@keyframes finalGel { from { opacity: 0; } }
.final-kutu {
  background: linear-gradient(180deg, #0F1A33, #0A1122); border: 1px solid rgba(61,214,140,.5); border-radius: 20px;
  padding: 24px 26px; max-width: 760px; width: 100%; max-height: 100%; overflow: auto; text-align: center;
  box-shadow: 0 0 80px rgba(61,214,140,.18);
}
.final-elmas svg { width: 120px; height: 120px; filter: drop-shadow(0 0 26px rgba(127,216,255,.85)); }
.final-elmas-don { transform-box: fill-box; transform-origin: center; animation: elmasDon 5s ease-in-out infinite; }
.final h2 { font-size: clamp(30px, 5vw, 52px); color: var(--yesil); letter-spacing: .06em; text-shadow: 0 0 24px rgba(61,214,140,.45); }
.final-kutu > p { color: #CFDAF2; margin: 6px 0 16px; }
.final-tablo { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.final-tablo th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--soluk); padding: 8px; border-bottom: 1px solid var(--cizgi2); }
.final-tablo td { padding: 9px 8px; border-bottom: 1px solid var(--cizgi); }
.final-tablo td:last-child { font-family: var(--f-kod); color: var(--mavi); white-space: nowrap; }
.final-tablo td:nth-child(2) { color: var(--yesil); font-weight: 600; }
.final-btn { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

#konfeti { position: fixed; inset: 0; pointer-events: none; z-index: 45; width: 100%; height: 100%; }

/* ---------- orta ekran: IDS çekmece ---------- */
@media (max-width: 1240px) {
  .sahne { grid-template-columns: 320px minmax(0, 1fr); }
  .ids-ac { display: inline-flex; }
  .ids {
    position: fixed; top: var(--ust-h); right: 0; bottom: var(--alt-h); width: min(360px, 92vw); z-index: 20;
    background: rgba(8,12,24,.97); transform: translateX(105%); transition: transform .35s cubic-bezier(.3,1,.4,1);
    box-shadow: -20px 0 60px rgba(0,0,0,.5);
  }
  .ids.acik { transform: none; }
  .ids-kapat { display: inline-flex; }
  .marka-alt { display: none; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  body { display: block; height: auto; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; font-size: 14px; }
  .ust {
    position: sticky; top: 0; flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 8px;
  }
  .marka-ad { font-size: 15px; }
  .marka-elmas { font-size: 20px; }
  .durum { margin-left: 0; width: 100%; order: 3; gap: 8px; }
  .saat { font-size: 15px; padding: 4px 8px; }
  .ilerleme { font-size: 12px; padding: 6px 8px; white-space: normal; flex: 1; }
  .ids-ac { margin-left: auto; padding: 0 10px; }
  #ids-ac-yazi { display: none; }
  .sahne { display: flex; flex-direction: column; }
  .harita-alan { order: 1; container-type: inline-size; padding: 8px; }
  .harita-kutu { width: 100%; border-radius: 12px; }
  .kartlar { order: 2; overflow: visible; border-right: 0; padding: 6px 10px 14px; gap: 10px; }
  .karolar { grid-template-columns: repeat(3, 1fr); }
  .kart { width: 100%; }
  .ids { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 62dvh; border-radius: 18px 18px 0 0; transform: translateY(105%); border-left: 0; border-top: 1px solid var(--cizgi2); }
  .alt { position: sticky; bottom: 0; padding: 8px 10px; flex-wrap: wrap; height: auto; }
  .alt .btn { flex: 1; font-size: 14px; padding: 0 10px; white-space: nowrap; }
  .alt-not { width: 100%; text-align: center; margin: 0; }
  .ovl { font-size: 10px; }
  .ovl-calindi { font-size: 2.6em; }
  .anlatim { font-size: 11px; white-space: normal; text-align: center; border-radius: 12px; bottom: 2%; max-width: 80%; }
  .sonuc { display: none; } /* telefonda sonuç kartın içinde görünür */
  .atla { font-size: 12px; min-height: 36px; padding: 0 10px; }
}

/* ---------- projektör ---------- */
@media (min-width: 1700px) {
  body { font-size: 16px; }
  .sahne { grid-template-columns: 380px minmax(0, 1fr) 350px; }
  .kart h3 { font-size: 18px; }
  .aciklama { font-size: 15px; }
}

/* ---------- hareketi azalt ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .harita-kutu.alarm::after { animation: none !important; opacity: .6; }
}
