/*
 * Ana sayfa "agent'lar canlı inşa ediyor" giriş efekti.
 * Yalnız efekt çalışırken eklenen ab-* sınıfları ve #ab-layer/#ab-dock katmanları biçimlendirilir;
 * efekt bitince/atlanınca bu sınıflar kaldırılır ve site eski haline döner.
 */
:root {
  --ab-ink: #0f172a;
  --ab-ghost: rgba(100, 116, 139, .55);
  --ab-guide: #ec4899;
  --ab-guide-soft: rgba(236, 72, 153, .28);
  --ab-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* İlk ziyarette, efekt hazırlanana kadar işaretli öğeler görünmez (tam sayfa bir anlığına parlamasın) */
html.ab-preload [data-build] { opacity: 0; animation: ab-unhide 0s linear 3s forwards; } /* betik çalışmazsa 3 sn sonra görünür */
@keyframes ab-unhide { to { opacity: 1; } }

/* Efekt sürerken kaydırılarak gelen öğeler ekran kenarında yatay kaydırma yaratmasın */
html.ab-running, html.ab-running body { overflow-x: clip; }

/* --- öğe aşamaları --- */
.ab-pos { position: relative; }
.ab-pending,
.ab-pending *:not([data-build-visual]):not([data-build-visual] *):not(.text-gradient) {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.ab-pending::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 10px;
  border: 1px dashed var(--ab-ghost); background: rgba(59, 130, 246, .04);
}
.ab-gray { filter: grayscale(1) brightness(.85); }
.ab-anim { transition: filter .8s ease; }
.ab-tx .ab-r { visibility: hidden; }
.ab-tx.ab-typing .ab-s::after {
  content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 1px; vertical-align: -.1em;
  background: #f59e0b; animation: ab-blink .7s infinite;
}
.ab-v { transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.ab-v.ab-off { opacity: 0 !important; transform: scale(.8); }
@keyframes ab-blink { 50% { opacity: .25; } }

/* --- imleç katmanı (tıklamaları engellemez) --- */
#ab-layer { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 60; overflow: hidden; }
.ab-cur { position: absolute; left: 0; top: 0; transition-property: transform, opacity; transition-timing-function: cubic-bezier(.45, .05, .25, 1); }
.ab-cur.ab-gone { opacity: 0; transition-duration: .6s !important; }
.ab-cur.ab-idle { opacity: .45; }
.ab-cur svg { display: block; filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .35)); }
.ab-cur .ab-chip {
  position: absolute; left: 15px; top: 15px; width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center; border: 1.5px solid #fff; box-shadow: 0 3px 8px rgba(15, 23, 42, .3); transition: transform .2s;
}
.ab-cur .ab-chip:empty { transform: scale(0); }
.ab-cur .ab-chip svg { width: 12px; height: 12px; filter: none; }
.ab-cur.ab-click > svg { animation: ab-tap .25s; }
@keyframes ab-tap { 50% { transform: scale(.8); } }

.ab-sel { position: absolute; border: 1.5px solid; border-radius: 2px; animation: ab-pop .2s ease-out; }
.ab-sel.ab-dash { border-style: dashed; animation: none; }
.ab-sel i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1.5px solid; }
.ab-sel i:nth-child(1) { left: -4px; top: -4px; } .ab-sel i:nth-child(2) { right: -4px; top: -4px; }
.ab-sel i:nth-child(3) { left: -4px; bottom: -4px; } .ab-sel i:nth-child(4) { right: -4px; bottom: -4px; }
.ab-dim, .ab-wh, .ab-gap span {
  position: absolute; font: 600 10px var(--ab-mono); color: #fff; padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}
.ab-dim { left: 50%; bottom: -22px; transform: translateX(-50%); }
.ab-wh { background: var(--ab-guide); animation: ab-pop .2s; }
.ab-guide { position: absolute; background: var(--ab-guide); opacity: .9; animation: ab-pop .15s; }
.ab-guide.ab-h { height: 1px; } .ab-guide.ab-vt { width: 1px; }
.ab-pad {
  position: absolute; display: grid; place-items: center; font: 600 10px var(--ab-mono); color: #be185d;
  background: repeating-linear-gradient(45deg, var(--ab-guide-soft) 0 2px, transparent 2px 6px); animation: ab-pop .2s;
}
.ab-gap { position: absolute; width: 1px; background: var(--ab-guide); animation: ab-pop .2s; }
.ab-gap::before, .ab-gap::after { content: ""; position: absolute; left: -4px; width: 9px; height: 1px; background: var(--ab-guide); }
.ab-gap::before { top: 0; } .ab-gap::after { bottom: 0; }
.ab-gap span { left: 6px; top: 50%; transform: translateY(-50%); background: var(--ab-guide); }
.ab-sw {
  position: absolute; display: flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 8px; white-space: nowrap;
  background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
  font: 600 10px var(--ab-mono); color: var(--ab-ink); animation: ab-pop .2s ease-out;
}
.ab-sw b { width: 14px; height: 14px; border-radius: 4px; display: block; }
@keyframes ab-pop { from { opacity: 0; transform: scale(.94); } }

/* --- alt kontrol çubuğu --- */
#ab-dock {
  position: fixed; left: 50%; z-index: 70; width: min(760px, calc(100% - 24px)); transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 7px; padding: 8px 10px; border-radius: 12px;
  background: rgba(15, 23, 42, .92); backdrop-filter: blur(10px); border: 1px solid rgba(148, 163, 184, .25);
  color: #e2e8f0; font: 12px var(--ab-mono); box-shadow: 0 12px 32px rgba(15, 23, 42, .35);
  transition: opacity .45s ease, transform .45s ease;
}
#ab-dock.ab-hide { opacity: 0; transform: translateX(-50%) translateY(16px) scale(.96); pointer-events: none; }
.ab-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ab-dots { display: flex; gap: 4px; }
.ab-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.ab-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ab-meter { flex: 1; min-width: 60px; height: 4px; border-radius: 4px; background: rgba(148, 163, 184, .25); overflow: hidden; }
.ab-meter span { display: block; height: 100%; width: 0; background: #3b82f6; transition: width .3s; }
.ab-pill { padding: 3px 9px; border-radius: 20px; background: rgba(148, 163, 184, .25); color: #f8fafc; font-weight: 600; white-space: nowrap; }
.ab-pill.ab-live { background: #22c55e; color: #052e16; }
.ab-log { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #94a3b8; }
.ab-log b { font-weight: 600; }
.ab-btn {
  border: 0; border-radius: 6px; padding: 5px 9px; cursor: pointer; white-space: nowrap;
  background: rgba(148, 163, 184, .22); color: #f8fafc; font: 600 12px var(--ab-mono);
}
.ab-btn:hover { background: rgba(148, 163, 184, .35); }
.ab-btn[aria-pressed="true"] { background: #3b82f6; color: #fff; }
.ab-btn:focus-visible, #ab-replay:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* bitince küçük "Tekrar oynat" */
#ab-replay {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(15, 23, 42, .88); color: #f8fafc; font: 600 12px var(--ab-mono);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .3); transition: opacity .3s ease, transform .3s ease;
}
#ab-replay.ab-in { animation: ab-pop .35s ease-out; }
#ab-replay i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: block; }

@media (max-width: 480px) {
  #ab-dock { font-size: 11px; gap: 6px; padding: 7px 8px; }
  .ab-btn { padding: 5px 7px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #ab-layer, #ab-dock { display: none !important; }
}
