/* Akti — sağ alt köşedeki maskot sohbet asistanı */
.akti { --akti-navy: var(--color-experience-navy); --akti-yellow: var(--color-academy-yellow); --akti-spring: cubic-bezier(.34,1.56,.64,1); --akti-ease: cubic-bezier(.22,1,.36,1); position: fixed; right: 24px; bottom: 24px; z-index: 9000; font-family: var(--font-ui); color: var(--akti-navy); }
.akti[hidden], .akti [hidden] { display: none !important; }

/* Başlatıcı: sahne diskinin üstünde zıplayan Akti */
.akti-launcher { width: 92px; height: 104px; position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; transform: translateY(70px) scale(.4); -webkit-tap-highlight-color: transparent; }
.akti.is-in .akti-launcher { animation: aktiArrive .9s var(--akti-spring) forwards; }
.akti-launcher__plate { position: absolute; left: 8px; bottom: 0; width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 50% 28%, #2b82c9 0%, #0b2e52 52%, #071c33 100%); box-shadow: 0 0 0 3px var(--akti-yellow), 0 18px 38px rgba(7,28,51,.42), inset 0 -10px 22px rgba(0,0,0,.35); transition: transform .4s var(--akti-spring), box-shadow .3s ease; }
.akti-launcher__plate::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--akti-yellow); opacity: 0; animation: aktiRing 3.4s ease-out 2.2s infinite; }
.akti-launcher__shadow { position: absolute; left: 50%; bottom: 13px; width: 40px; height: 9px; margin-left: -20px; border-radius: 50%; background: rgba(0,0,0,.38); filter: blur(3px); animation: aktiShadow 3.2s ease-in-out infinite; }
.akti-launcher__img { width: 104px; height: 104px; position: absolute; left: -6px; bottom: 12px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.22)); transform-origin: 50% 100%; animation: aktiFloat 3.2s ease-in-out infinite; pointer-events: none; }
.akti-launcher.is-waving .akti-launcher__img { animation: aktiWave 1.1s var(--akti-ease), aktiFloat 3.2s ease-in-out 1.1s infinite; }
.akti-launcher:hover .akti-launcher__plate, .akti-launcher:focus-visible .akti-launcher__plate { transform: scale(1.06); box-shadow: 0 0 0 4px var(--akti-yellow), 0 22px 44px rgba(7,28,51,.5), inset 0 -10px 22px rgba(0,0,0,.35); }
.akti-launcher:hover .akti-launcher__img { animation: aktiHop .7s var(--akti-spring); }
.akti-launcher:focus-visible { outline: none; }
.akti-launcher:focus-visible .akti-launcher__plate { outline: 3px solid #fff; outline-offset: 4px; }
.akti-launcher__dot { position: absolute; right: 6px; bottom: 2px; width: 16px; height: 16px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px #fff; transform: scale(0); transition: transform .4s var(--akti-spring); }
.akti.has-unread .akti-launcher__dot { transform: scale(1); }
.akti.is-open .akti-launcher { pointer-events: none; animation: none; opacity: 0; transform: translateY(20px) scale(.6); transition: opacity .2s ease, transform .3s ease; }

/* Karşılama balonu */
.akti-teaser { position: absolute; right: 86px; bottom: 76px; width: max-content; max-width: 236px; padding: 14px 34px 14px 16px; border-radius: 20px 20px 6px 20px; background: #fff; box-shadow: 0 18px 46px rgba(7,28,51,.22), 0 0 0 1px rgba(7,28,51,.06); font-size: 14px; line-height: 1.45; transform-origin: 100% 100%; animation: aktiBubble .6s var(--akti-spring) both; }
.akti-teaser p { margin: 0; }
.akti-teaser b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; line-height: 1.05; margin-bottom: 3px; }
.akti-teaser__close { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--color-blue-mist); color: var(--akti-navy); font-size: 17px; line-height: 1; cursor: pointer; }
.akti.is-open .akti-teaser { display: none; }

/* Panel */
.akti-panel { width: 404px; height: min(660px, calc(100dvh - 48px)); position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column; border-radius: 30px; background: var(--color-ice-canvas); box-shadow: 0 40px 100px rgba(4,17,31,.45), 0 0 0 1px rgba(7,28,51,.08); transform-origin: 100% 100%; opacity: 0; transform: translateY(26px) scale(.9); transition: opacity .3s ease, transform .5s var(--akti-ease); }
.akti.is-open .akti-panel { opacity: 1; transform: none; }

.akti-head { min-height: 148px; position: relative; display: flex; align-items: flex-end; gap: 4px; padding: 18px 18px 18px 162px; border-radius: 30px 30px 0 0; background: linear-gradient(160deg, #0b2e52 0%, #071c33 70%); color: #fff; }
.akti-head__light { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.akti-head__light::before { content: ""; position: absolute; left: -40px; top: -120px; width: 260px; height: 320px; background: conic-gradient(from 160deg at 50% 0%, transparent 0deg, rgba(245,200,76,.32) 18deg, transparent 40deg, rgba(43,130,201,.35) 62deg, transparent 86deg); filter: blur(6px); transform-origin: 50% 0; animation: aktiBeam 7s ease-in-out infinite alternate; }
.akti-head__light::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(98,167,68,.28), transparent 65%); }
.akti-stage { position: absolute; left: 4px; bottom: 6px; width: 146px; height: 146px; pointer-events: none; }
.akti-stage__spot { position: absolute; left: 50%; bottom: 0; width: 120px; height: 26px; margin-left: -60px; border-radius: 50%; background: radial-gradient(closest-side, rgba(245,200,76,.55), transparent); }
.akti-stage__img { width: 168px; height: 168px; position: absolute; left: -11px; bottom: 4px; object-fit: contain; transform-origin: 50% 100%; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); animation: aktiFloat 3.6s ease-in-out infinite; }
.akti.is-open .akti-stage__img { animation: aktiDrop .9s var(--akti-spring) both, aktiFloat 3.6s ease-in-out .9s infinite; }
.akti-stage__img.is-swap { animation: aktiPop .5s var(--akti-spring), aktiFloat 3.6s ease-in-out .5s infinite !important; }
.akti-spark { position: absolute; width: 14px; height: 14px; background: var(--akti-yellow); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: aktiTwinkle 2.4s ease-in-out infinite; }
.akti-spark--1 { left: 6px; top: 6px; }
.akti-spark--2 { right: 2px; top: 30px; width: 10px; height: 10px; background: #fff; animation-delay: .8s; }
.akti-spark--3 { left: 22px; bottom: 54px; width: 8px; height: 8px; background: #8fd3ff; animation-delay: 1.5s; }
.akti-head__text { position: relative; flex: 1; min-width: 0; padding-bottom: 2px; }
.akti-eyebrow { margin: 0 0 4px; color: var(--akti-yellow); font: 600 10px/1 var(--font-mono); letter-spacing: .12em; }
.akti-title { margin: 0; font-family: var(--font-display); font-size: 46px; font-weight: 700; line-height: .86; letter-spacing: .01em; text-transform: uppercase; }
.akti-status { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; color: #b9d1e3; font-size: 12.5px; }
.akti-status i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: aktiLive 2s ease-out infinite; }
.akti.is-thinking .akti-status i { background: var(--akti-yellow); animation-duration: .9s; }
.akti-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s ease, transform .3s var(--akti-spring); }
.akti-close:hover { background: rgba(255,255,255,.22); transform: rotate(90deg); }
.akti-close span, .akti-close span::after { position: absolute; left: 11px; top: 18px; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); content: ""; }
.akti-close span::after { left: 0; top: 0; transform: rotate(90deg); }

/* Mesajlar */
.akti-log { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 20px 16px 10px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; }
.akti-msg { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; animation: aktiMsg .45s var(--akti-ease) both; }
.akti-msg--bot::before { content: ""; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--akti-yellow) var(--akti-face) center/122% no-repeat; box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(7,28,51,.15); }
.akti-msg__body { min-width: 0; max-width: calc(100% - 38px); }
.akti-bubble { padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: #fff; box-shadow: 0 1px 0 rgba(7,28,51,.06), 0 0 0 1px var(--color-cool-border); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.akti-bubble p { margin: 0; }
.akti-bubble p + p, .akti-bubble p + ul, .akti-bubble ul + p { margin-top: 7px; }
.akti-bubble ul { margin: 0; padding-left: 18px; }
.akti-bubble li { margin: 2px 0; }
.akti-bubble li::marker { color: var(--color-brand-blue); }
.akti-bubble a { color: var(--color-brand-blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.akti-bubble.is-streaming::after { content: ""; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--color-brand-blue); animation: aktiCaret .8s steps(2) infinite; }
.akti-msg--user { justify-content: flex-end; }
.akti-msg--user .akti-msg__body { max-width: 84%; }
.akti-msg--user .akti-bubble { border-radius: 18px 18px 6px 18px; background: var(--color-academy-navy); box-shadow: none; color: #fff; }
.akti-typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.akti-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--akti-yellow); animation: aktiDots 1.1s ease-in-out infinite; }
.akti-typing i:nth-child(2) { background: var(--color-bright-blue); animation-delay: .15s; }
.akti-typing i:nth-child(3) { background: var(--color-academy-green); animation-delay: .3s; }
.akti-note { margin: 6px 0 0 4px; color: var(--color-secondary-text); font-size: 12px; }
.akti-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.akti-action { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--color-cool-border); color: var(--akti-navy); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: transform .25s var(--akti-spring), box-shadow .2s ease, background .2s ease; animation: aktiMsg .45s var(--akti-ease) both; }
.akti-action::after { content: "→"; transition: transform .25s var(--akti-ease); }
.akti-action:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--color-brand-blue), 0 6px 14px rgba(23,104,172,.15); }
.akti-action:hover::after { transform: translateX(3px); }
.akti-action--primary { background: var(--akti-yellow); box-shadow: 0 6px 16px rgba(245,200,76,.45); }
.akti-action--primary:hover { box-shadow: 0 10px 22px rgba(245,200,76,.6); }
.akti-action--whatsapp { background: #1f9d55; box-shadow: none; color: #fff; }
.akti-action--whatsapp:hover { box-shadow: 0 8px 18px rgba(31,157,85,.35); }

/* Hızlı sorular ve yazma alanı */
.akti-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 16px 12px; }
.akti-chips button { padding: 8px 12px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--color-cool-border); color: var(--akti-navy); font: 600 12.5px/1.2 var(--font-ui); cursor: pointer; transition: background .2s ease, box-shadow .2s ease, transform .25s var(--akti-spring); animation: aktiMsg .5s var(--akti-ease) both; }
.akti-chips button:nth-child(2) { animation-delay: .06s; } .akti-chips button:nth-child(3) { animation-delay: .12s; } .akti-chips button:nth-child(4) { animation-delay: .18s; }
.akti-chips button:hover { background: var(--akti-yellow); box-shadow: none; transform: translateY(-2px); }
.akti-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 14px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1.5px var(--color-cool-border), 0 8px 20px rgba(7,28,51,.06); transition: box-shadow .2s ease; }
.akti-form:focus-within { box-shadow: 0 0 0 2px var(--color-brand-blue), 0 8px 24px rgba(23,104,172,.14); }
.akti-form textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 10px 0; border: 0; outline: 0; resize: none; background: none; color: var(--akti-navy); font: 15px/1.35 var(--font-ui); }
.akti-form textarea::placeholder { color: #8a9aa9; }
.akti-send { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 15px; background: var(--akti-yellow); color: var(--akti-navy); cursor: pointer; transition: transform .25s var(--akti-spring), opacity .2s ease; }
.akti-send svg { width: 20px; height: 20px; }
.akti-send:hover:not(:disabled) { transform: scale(1.08) rotate(-6deg); }
.akti-send:disabled { opacity: .45; cursor: default; }
.akti-foot { margin: 0; padding: 8px 18px 12px; color: var(--color-secondary-text); font-size: 11px; line-height: 1.4; text-align: center; }
.akti-foot a { color: inherit; text-decoration: underline; }

@keyframes aktiArrive { 0% { opacity: 0; transform: translateY(70px) scale(.4); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes aktiFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes aktiShadow { 0%,100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.78); opacity: .55; } }
@keyframes aktiWave { 0% { transform: rotate(0); } 20% { transform: rotate(-11deg) translateY(-4px); } 40% { transform: rotate(9deg) translateY(-6px); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } 100% { transform: rotate(0); } }
@keyframes aktiHop { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(2px) scale(1.08,.9); } 60% { transform: translateY(-14px) scale(.95,1.06); } 100% { transform: translateY(0) scale(1); } }
@keyframes aktiRing { 0% { opacity: .9; transform: scale(1); } 70%,100% { opacity: 0; transform: scale(1.45); } }
@keyframes aktiBubble { from { opacity: 0; transform: translateY(12px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes aktiDrop { 0% { opacity: 0; transform: translateY(-60px) scale(.7) rotate(-12deg); } 100% { opacity: 1; transform: none; } }
@keyframes aktiPop { 0% { transform: scale(.88); } 55% { transform: scale(1.07) translateY(-6px); } 100% { transform: scale(1); } }
@keyframes aktiTwinkle { 0%,100% { opacity: .25; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@keyframes aktiBeam { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@keyframes aktiLive { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 100% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } }
@keyframes aktiMsg { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes aktiDots { 0%,80%,100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes aktiCaret { 50% { opacity: 0; } }

@media (max-width: 640px) {
  .akti { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .akti-launcher { width: 78px; height: 88px; }
  .akti-launcher__plate { left: 7px; width: 64px; height: 64px; }
  .akti-launcher__img { width: 88px; height: 88px; left: -5px; bottom: 10px; }
  .akti-launcher__shadow { bottom: 11px; }
  .akti-launcher__dot { right: 4px; bottom: 0; }
  .akti-teaser { right: 74px; bottom: 62px; max-width: 210px; font-size: 13.5px; }
  .akti-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; transform: translateY(40px); }
  .akti-head { min-height: calc(164px + env(safe-area-inset-top)); padding: calc(16px + env(safe-area-inset-top)) 16px 18px 142px; border-radius: 0; }
  .akti-stage { width: 132px; height: 136px; left: 2px; bottom: 6px; }
  .akti-stage__img { width: 130px; height: 130px; left: 0; bottom: 0; }
  .akti-close { top: calc(12px + env(safe-area-inset-top)); }
  .akti-title { font-size: 40px; }
  .akti-form { margin-bottom: 4px; }
  .akti-form textarea { font-size: 16px; }
  .akti-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  html.akti-lock, html.akti-lock body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .akti *, .akti *::before, .akti *::after { animation: none !important; transition-duration: .01ms !important; }
  .akti-launcher { opacity: 1; transform: none; }
}
@media print { .akti { display: none !important; } }
