/* ============================================================
   ASİSTAN PENCERESİ — liquid glass tasarımı
   Kaynak: docs/asistan-web-ornek.html (kullanıcının onayladığı prototip).
   Yalnızca #ai-kapla içinde geçerli; başka ekrana sızmaz.

   KULLANICI KARARI (2026-11-19): bu pencere uygulamanın genel "sakin kart
   dili"nin DIŞINDA — blur, cam, ince (200) yazı ağırlığı ve Outfit yazı
   tipi burada BİLEREK kullanılıyor. tasarim.css'in "tek ağırlık 500"
   kuralı bu pencerede !important + daha yüksek özgüllükle ezilir.

   Açık/koyu: tarayıcı/uygulama temasını izler (prefers-color-scheme;
   [data-theme] ile zorlanabilir).
   ============================================================ */

/* Outfit (SIL OFL 1.1) — self-host, CDN yok, file:// ile de çalışır.
   latin-ext: ı ş ğ İ Ş Ğ ç ö ü burada. */
@font-face {
  font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/outfit-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- Kaplama ---------- */
.ai-kapla {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(8,24,44,.34);
  animation: aiKaplaGir .22s ease both;
}
.ai-kapla.hidden { display: none; }
@keyframes aiKaplaGir { from { opacity: 0; } to { opacity: 1; } }
body.ai-acik { overflow: hidden; }

/* ---------- Kart ---------- */
.ai-kart {
  /* açık mod değişkenleri */
  --ai-bg: linear-gradient(180deg, #8cc4e0 0%, #a9d8e8 28%, #4b8fb9 58%, #0b4a78 82%, #063a60 100%);
  --ai-dk1: #0a4670; --ai-dk2: #052f52; --ai-dk3: #0a4a7a;
  --ai-gl: #f4f6ef; --ai-gl-o: 1; --ai-gl2: #d9f0f6; --ai-gl2-o: .8;
  --ai-ust: linear-gradient(180deg, rgba(5,52,92,.72) 0%, rgba(5,52,92,.45) 26%, rgba(5,52,92,0) 52%);
  --ai-grain: .32; --ai-scrim: rgba(4,38,72,.66);
  --ai-alan-bg: rgba(255,255,255,.92); --ai-alan-gol: 0 8px 28px rgba(5,47,82,.22);
  --ai-alan-yazi: #06283f; --ai-alan-ipucu: #4a6b80;
  --ai-gonder-bg: #06283f; --ai-gonder-yazi: #fff;
  --ai-balon: linear-gradient(180deg, rgba(22,26,34,.5), rgba(14,18,26,.4));
  --ai-balon-kenar: inset 0 .5px 0 rgba(255,255,255,.4), inset 0 0 0 .5px rgba(255,255,255,.16), inset 0 -10px 18px rgba(255,255,255,.07);
  --ai-sq: 36px;

  position: relative; overflow: hidden; display: flex; flex-direction: column;
  width: 100%; max-width: 860px; height: min(86dvh, 760px);
  border-radius: var(--ai-sq); corner-shape: squircle;
  background: #0b4a78; color: #fff;
  font-family: "Outfit", ui-rounded, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 40px 100px rgba(0,0,0,.4), 0 0 0 .5px rgba(255,255,255,.35);
  animation: aiKartGir .35s cubic-bezier(.2,.9,.3,1.05) both;
}
@keyframes aiKartGir { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ai-kart {
    --ai-bg: linear-gradient(180deg, #0b1b30 0%, #0a233f 38%, #071a31 70%, #040e1c 100%);
    --ai-dk1: #0c2f55; --ai-dk2: #05172d; --ai-dk3: #0b3562;
    --ai-gl: #1f6aa8; --ai-gl-o: .5; --ai-gl2: #15497d; --ai-gl2-o: .6;
    --ai-ust: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 45%);
    --ai-grain: .2; --ai-scrim: rgba(1,8,18,.6);
    --ai-alan-bg: rgba(255,255,255,.1); --ai-alan-gol: 0 8px 28px rgba(0,0,0,.45), inset 0 0 0 .5px rgba(255,255,255,.2), inset 0 .5px 0 rgba(255,255,255,.3);
    --ai-alan-yazi: rgba(232,242,252,.92); --ai-alan-ipucu: rgba(222,236,250,.5);
    --ai-gonder-bg: rgba(232,242,252,.92); --ai-gonder-yazi: #06283f;
    --ai-balon: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
    --ai-balon-kenar: inset 0 .5px 0 rgba(255,255,255,.28), inset 0 0 0 .5px rgba(255,255,255,.12);
    background: #040a13;
  }
}
:root[data-theme="dark"] .ai-kart {
  --ai-bg: linear-gradient(180deg, #0b1b30 0%, #0a233f 38%, #071a31 70%, #040e1c 100%);
  --ai-dk1: #0c2f55; --ai-dk2: #05172d; --ai-dk3: #0b3562;
  --ai-gl: #1f6aa8; --ai-gl-o: .5; --ai-gl2: #15497d; --ai-gl2-o: .6;
  --ai-ust: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 45%);
  --ai-grain: .2; --ai-scrim: rgba(1,8,18,.6);
  --ai-alan-bg: rgba(255,255,255,.1); --ai-alan-gol: 0 8px 28px rgba(0,0,0,.45), inset 0 0 0 .5px rgba(255,255,255,.2), inset 0 .5px 0 rgba(255,255,255,.3);
  --ai-alan-yazi: rgba(232,242,252,.92); --ai-alan-ipucu: rgba(222,236,250,.5);
  --ai-gonder-bg: rgba(232,242,252,.92); --ai-gonder-yazi: #06283f;
  --ai-balon: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
  --ai-balon-kenar: inset 0 .5px 0 rgba(255,255,255,.28), inset 0 0 0 .5px rgba(255,255,255,.12);
  background: #040a13;
}
.ai-kart *, .ai-kart *::before, .ai-kart *::after { box-sizing: border-box; }
.ai-kart button, .ai-kart textarea { font-family: inherit; }

/* Akış çocukları arka planın üstünde */
.ai-kart > .ai-selam, .ai-kart > .ai-ornekler, .ai-kart > .ai-sahne, .ai-kart > .ai-yaz { position: relative; z-index: 1; }

/* ---------- Hareketli arka plan ---------- */
.ai-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: var(--ai-bg); }
.ai-bg i { position: absolute; border-radius: 50%; will-change: transform; }
.ai-bg .dk1 { width: 460px; height: 380px; left: -200px; top: -110px; background: var(--ai-dk1); filter: blur(60px); animation: aiD1 17s ease-in-out infinite alternate; }
.ai-bg .dk2 { width: 620px; height: 480px; left: -60px; bottom: -190px; background: var(--ai-dk2); filter: blur(60px); animation: aiD2 21s ease-in-out infinite alternate; }
.ai-bg .dk3 { width: 340px; height: 300px; right: -170px; top: 470px; background: var(--ai-dk3); filter: blur(55px); animation: aiD3 15s ease-in-out infinite alternate; }
.ai-bg .gl { width: 560px; height: 300px; left: -170px; top: 250px; background: var(--ai-gl); opacity: var(--ai-gl-o); filter: blur(46px);
  border-radius: 60% 40% 70% 30%; transform: rotate(38deg); animation: aiGl 13s ease-in-out infinite alternate; }
.ai-bg .gl2 { width: 300px; height: 220px; right: -60px; top: 120px; background: var(--ai-gl2); opacity: var(--ai-gl2-o); filter: blur(55px); animation: aiD3 19s ease-in-out infinite alternate-reverse; }
.ai-bg::after { content: ""; position: absolute; inset: 0; opacity: var(--ai-grain); mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.ai-bg::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--ai-ust); }
.ai-bg .scrim { inset: 0; border-radius: 0; background: var(--ai-scrim); opacity: 0; transition: opacity .9s; z-index: 3; will-change: auto; }
.ai-kart.listening .ai-bg .scrim { opacity: 1; }
@keyframes aiGl { 0% { transform: rotate(34deg) translate(0,0) scale(1); } 50% { transform: rotate(44deg) translate(60px,40px) scale(1.12); } 100% { transform: rotate(30deg) translate(120px,-30px) scale(.95); } }
@keyframes aiD1 { to { transform: translate(110px, 70px) scale(1.2); } }
@keyframes aiD2 { to { transform: translate(140px, -70px) scale(1.15); } }
@keyframes aiD3 { to { transform: translate(-90px, -60px) scale(1.25); } }

/* ---------- Üst düğmeler ---------- */
.ai-xbtn { position: absolute; top: 20px; right: 20px; z-index: 8; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  color: rgba(232,242,252,.85); cursor: pointer; background: rgba(255,255,255,.14);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: grid; place-items: center; transition: background .2s; }
.ai-xbtn:hover { background: rgba(255,255,255,.24); }
.ai-xbtn:focus-visible, .ai-mik:focus-visible, .ai-ornek:focus-visible { outline: 2px solid rgba(190,230,255,.9); outline-offset: 2px; }
.ai-xbtn svg { width: 18px; height: 18px; }
.ai-xbtn.ai-xtemizle { right: 68px; }
.ai-gizli { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* ---------- Karşılama ---------- */
.ai-selam { padding: 54px 56px 0; color: rgba(222,236,250,.72); text-shadow: 0 2px 16px rgba(5,47,82,.25);
  max-height: 260px; overflow: hidden; transition: max-height .7s cubic-bezier(.4,0,.2,1), opacity .45s, padding .7s; }
.ai-selam .l1, .ai-selam .l2 { font-size: 46px; line-height: 1.12; font-weight: 100; letter-spacing: -.01em; }
.ai-selam .l2 { margin-top: 4px; }
.ai-selam .l2 b { font-weight: 500; letter-spacing: -.02em; color: rgba(228,240,252,.82); }
.ai-kart.started .ai-selam { max-height: 0; opacity: 0; padding-top: 0; }

/* ---------- Örnek sorular: aşağıdan yukarı akan liste ---------- */
.ai-ornekler { height: 210px; margin-top: 26px; overflow: hidden; padding: 0 56px; text-shadow: 0 2px 14px rgba(5,47,82,.3);
  transition: height .7s cubic-bezier(.4,0,.2,1), margin .7s cubic-bezier(.4,0,.2,1), opacity .45s;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 70%, transparent 100%); }
.ai-ornekler::before, .ai-ornekler::after { content: ""; position: absolute; left: 0; right: 0; height: 70px; z-index: 2; pointer-events: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ai-ornekler::before { top: 0; -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.ai-ornekler::after { bottom: 0; -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
.ai-iz { display: flex; flex-direction: column; align-items: flex-start; animation: aiYuksel 18s linear infinite; }
.ai-ornekler:hover .ai-iz { animation-play-state: paused; }
.ai-ornek { border: 0; background: none; padding: 11px 0; text-align: left; cursor: pointer; font-weight: 300; font-size: 22px; line-height: 1.25;
  color: rgba(222,236,250,.68); letter-spacing: -.005em; max-width: 560px; transition: color .2s; }
.ai-ornek:hover { color: rgba(240,248,255,.95); }
@keyframes aiYuksel { to { transform: translateY(-33.3333%); } }
.ai-kart.started .ai-ornekler { height: 0; margin-top: 0; opacity: 0; pointer-events: none; }

/* ---------- Sahne: sohbet + canlı yazı ---------- */
.ai-sahne { flex: 1; min-height: 0; position: relative; }
.ai-akis { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 72px 44px 16px; display: flex; flex-direction: column; gap: 16px;
  scrollbar-width: none; transition: opacity .6s, filter .6s; }
.ai-akis::-webkit-scrollbar { display: none; }
.ai-kart.listening .ai-akis { opacity: .2; filter: blur(5px); }

.ai-canli { position: absolute; left: 56px; bottom: clamp(150px, 44%, 360px); width: max-content; max-width: 700px; z-index: 3;
  transition: opacity .45s, filter .45s; text-shadow: 0 2px 20px rgba(5,47,82,.35); }
.ai-canli.out { opacity: 0; filter: blur(9px); }
.ai-sat { font-size: 50px; font-weight: 200; line-height: 1.14; letter-spacing: -.015em; color: rgba(228,240,252,.84); margin: 4px 0;
  transition: filter .7s, opacity .7s; }
.ai-sat[data-age="1"] { filter: blur(2.5px); opacity: .55; }
.ai-sat[data-age="2"] { filter: blur(5px); opacity: .32; }
.ai-sat[data-age="3"] { filter: blur(8px); opacity: .16; }

/* ---------- Kelime kelime belirme (blur reveal) ---------- */
.ai-k { display: inline-block; opacity: 0; filter: blur(9px); transform: translateY(6px);
  transition: opacity .7s ease, filter .7s ease, transform .7s ease; transition-delay: var(--d, 0ms); }
.ai-k.in, .ai-goster .ai-k { opacity: 1; filter: blur(0); transform: none; }

/* ---------- Mesaj balonları — liquid glass ---------- */
.ai-balon { position: relative; color: rgba(232,242,252,.88); font-size: 16.5px; line-height: 1.38; letter-spacing: 0;
  padding: 14px 22px; max-width: min(640px, 92%); flex-shrink: 0; border-radius: 38px; corner-shape: squircle;
  background: var(--ai-balon); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: var(--ai-balon-kenar); }
.ai-soru { align-self: flex-end; white-space: pre-wrap; }
.ai-cevap, .ai-bekleyen { align-self: flex-start; animation: aiPop .5s cubic-bezier(.3,1.4,.4,1) both; transform-origin: 0 100%; }
/* asistan balonunun kenarında dönen buz çizgisi */
.ai-cevap::before, .ai-bekleyen::before { content: ""; position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; padding: .75px; pointer-events: none; opacity: .7;
  background: conic-gradient(from var(--a), rgba(127,216,255,.95), rgba(255,255,255,.1), rgba(79,157,255,.8), rgba(255,255,255,.1), rgba(127,230,224,.9), rgba(127,216,255,.95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: aiDon 6s linear infinite; }
@keyframes aiPop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aiDon { to { --a: 360deg; } }
.ai-bekleyen { width: 68px; height: 44px; padding: 0; display: grid; place-items: center; overflow: hidden; }
.ai-buyu { overflow: hidden; transition: width .95s cubic-bezier(.22,1.15,.3,1), height .95s cubic-bezier(.22,1.15,.3,1); }
.ai-hata { align-self: flex-start; color: #ffe1db; background: linear-gradient(180deg, rgba(120,30,24,.5), rgba(70,16,14,.42));
  box-shadow: inset 0 .5px 0 rgba(255,190,180,.4), inset 0 0 0 .5px rgba(255,150,140,.28); }
.ai-nokta { display: flex; gap: 5px; transition: opacity .2s; }
.ai-nokta i { width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .5; box-shadow: 0 0 10px rgba(150,225,255,.9); animation: aiNokta 1.2s infinite ease-in-out; }
.ai-nokta i:nth-child(2) { animation-delay: .16s; } .ai-nokta i:nth-child(3) { animation-delay: .32s; }
@keyframes aiNokta { 0%, 80%, 100% { transform: translateY(0) scale(.85); opacity: .35; } 40% { transform: translateY(-4px) scale(1.1); opacity: 1; } }

/* Cevap içeriği (ai/bicim.js yapısından kurulur) */
.ai-cevap-ic { font-size: 16.5px; font-weight: 200; line-height: 1.38; color: rgba(232,242,252,.88); }
.ai-paragraf { margin: 0 0 8px; }
.ai-balon > .ai-paragraf:last-child, .ai-cevap-ic > :last-child { margin-bottom: 0; }
.ai-alt-baslik { margin: 12px 0 6px; font-size: 16.5px; color: rgba(240,248,255,.95); letter-spacing: -.005em; }
.ai-cevap-ic > .ai-alt-baslik:first-child { margin-top: 0; }
.ai-liste { margin: 0 0 8px; padding-left: 20px; }
.ai-liste li { margin: 4px 0; }
.ai-durum { margin: 0; font-size: 13.5px; opacity: .75; }
.ai-hata .ai-durum { margin-top: 6px; }
.ai-tablo-sar { overflow-x: auto; margin: 4px 0 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ai-tablo { border-collapse: collapse; width: 100%; font-size: 15px; }
html body .ai-kart .ai-tablo, html body .ai-kart .ai-tablo thead, html body .ai-kart .ai-tablo tr, html body .ai-kart .ai-tablo th, html body .ai-kart .ai-tablo td { background: transparent !important; box-shadow: none !important; }
.ai-tablo th, .ai-tablo td { padding: 7px 12px 7px 0; text-align: left; border-bottom: .5px solid rgba(255,255,255,.18); white-space: nowrap; }
.ai-tablo th { color: rgba(222,236,250,.65); font-size: 13px; }
.ai-tablo tbody tr:last-child td { border-bottom: none; }
.ai-tablo th:not(:first-child) { text-align: right; padding-right: 0; padding-left: 12px; }
.ai-tablo .ai-sayi { text-align: right; padding-right: 0; padding-left: 12px; font-variant-numeric: tabular-nums; }

/* Bekleme: geçen süre yazısı + kaynak satırı */
.ai-bekle-yazi { align-self: flex-start; margin: -8px 0 0 14px; font-size: 13px; font-weight: 300; color: rgba(236,244,252,.7); text-shadow: 0 1px 8px rgba(5,40,75,.7); }
.ai-kaynak { align-self: flex-start; margin: -6px 0 0 12px; font-size: 12.5px; font-weight: 300; color: rgba(236,244,252,.8); text-shadow: 0 1px 8px rgba(5,40,75,.7);
  opacity: 0; filter: blur(6px); transition: opacity .8s, filter .8s; }
.ai-kaynak.in { opacity: 1; filter: none; }
.ai-kaynak-hata { color: #ffd3cb; }

/* ---------- Asistan düşünürken: alttan yükselen, blurlu canlı varlık ---------- */
.ai-alive { position: absolute; left: 0; right: 0; bottom: 0; height: 520px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.1s ease; overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 100%); mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 100%); }
.ai-kart.thinking .ai-alive { opacity: 1; }
.ai-alive i { position: absolute; filter: blur(36px); will-change: transform; }
.ai-alive .a1 { width: 300px; height: 280px; left: -70px; bottom: -20px; background: #3f8cff; animation: aiAl1 6.5s ease-in-out infinite alternate; }
.ai-alive .a2 { width: 280px; height: 260px; right: -70px; bottom: 0; background: #6fd0ff; animation: aiAl2 8s ease-in-out infinite alternate; }
.ai-alive .a3 { width: 240px; height: 230px; left: 80px; bottom: 10px; background: #62e3da; opacity: .95; animation: aiAl3 5.5s ease-in-out infinite alternate; }
.ai-alive .core { width: 230px; height: 230px; left: 50%; margin-left: -115px; bottom: 50px; filter: blur(28px);
  background: radial-gradient(circle, #fff 0%, #bfeaff 42%, transparent 70%); animation: aiNefes 2.6s ease-in-out infinite; }
@keyframes aiAl1 { 0% { border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; transform: translate(0,0) rotate(0) scale(1); }
  50% { border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%; transform: translate(110px,-50px) rotate(40deg) scale(1.25); }
  100% { border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; transform: translate(40px,20px) rotate(-20deg) scale(.95); } }
@keyframes aiAl2 { 0% { border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; transform: translate(0,0) rotate(0) scale(1.05); }
  50% { border-radius: 60% 40% 55% 45% / 40% 60% 40% 60%; transform: translate(-100px,-60px) rotate(-35deg) scale(1.3); }
  100% { border-radius: 50% 50% 45% 55% / 60% 40% 60% 40%; transform: translate(-30px,10px) rotate(25deg) scale(.9); } }
@keyframes aiAl3 { 0% { border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%; transform: translate(-60px,0) scale(.9); }
  50% { border-radius: 40% 60% 60% 40% / 55% 45% 55% 45%; transform: translate(60px,-70px) scale(1.3); }
  100% { border-radius: 60% 40% 45% 55% / 50% 50% 50% 50%; transform: translate(10px,10px) scale(1); } }
@keyframes aiNefes { 0%, 100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.3); opacity: 1; } }
:root[data-theme="dark"] .ai-alive { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ai-alive { mix-blend-mode: screen; } }

/* ---------- Mesaj kutusu ---------- */
.ai-yaz { padding: 10px 32px 28px; display: flex; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.ai-alan { flex: 1; min-height: 58px; background: var(--ai-alan-bg); display: flex; align-items: flex-end; padding: 0 9px 0 24px; gap: 6px;
  box-shadow: var(--ai-alan-gol); border-radius: 29px; corner-shape: squircle;
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  transition: opacity .3s .35s, transform .5s cubic-bezier(.3,1.2,.4,1) .35s; }
.ai-giris { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: none; font-size: 16.5px; line-height: 1.4; font-weight: 300;
  color: var(--ai-alan-yazi); padding: 17px 0; max-height: 160px; }
.ai-giris::placeholder { color: var(--ai-alan-ipucu); font-weight: 300; }
.ai-giris:disabled { opacity: .6; }
.ai-gonder, .ai-dur { width: 40px; height: 40px; margin-bottom: 9px; padding: 0; border: 0; background: var(--ai-gonder-bg); color: var(--ai-gonder-yazi);
  display: grid; place-items: center; border-radius: 50%; cursor: pointer; flex: none; }
.ai-gonder:disabled { opacity: .4; cursor: default; }
.ai-gonder svg, .ai-dur svg { width: 18px; height: 18px; }
.ai-dur.hidden, .ai-gonder.hidden { display: none; }
.ai-mik { width: 58px; height: 58px; padding: 0; border: 0; color: #fff; display: grid; place-items: center; flex-shrink: 0; cursor: pointer;
  background: rgba(255,255,255,.2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.55); border-radius: 50%;
  transition: transform .45s cubic-bezier(.3,1.3,.4,1) .45s, opacity .3s .45s; }
.ai-mik.hidden { display: none; }
.ai-mik:disabled { opacity: .45; cursor: default; }
.ai-mik svg { width: 22px; height: 22px; }
.ai-kart.listening .ai-alan { opacity: 0; transform: translateX(40px) scale(.9); pointer-events: none; transition-delay: 0s; }
.ai-kart.listening .ai-mik { transform: scale(.15); opacity: 0; pointer-events: none; transition: transform .35s, opacity .25s; }

/* ---------- Mikrofon aktifken pencere kenarında dönen yumuşak glow (keskin çizgi yok) ---------- */
.ai-edge { --c1:#7fd8ff; --c2:#d9f6ff; --c3:#4f9dff; --c4:#ffffff; --c5:#7fe6e0; --c6:#5a7dff;
  position: absolute; inset: 0; border-radius: var(--ai-sq); corner-shape: squircle; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .9s; }
.ai-kart.listening .ai-edge { opacity: 1; }
.ai-edge .g { position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; }
.ai-edge .g i { position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; padding: var(--w);
  background: conic-gradient(from var(--a), var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: aiDon 7s linear infinite; }
.ai-edge .g2 { filter: blur(12px); opacity: calc(.75 + var(--lvl, 0) * .25); } .ai-edge .g2 i { --w: 14px; }
.ai-edge .g3 { filter: blur(26px); opacity: calc(.5 + var(--lvl, 0) * .4); } .ai-edge .g3 i { --w: 38px; animation-duration: 11s; animation-direction: reverse; }

/* ---------- Mikrofon: alttan yukarı kademeli blur + ışık, çerçevesiz ----------
   Hiçbir blur katmanı ölçeklenmez/kesilmez: yalnızca solar; ışık ve ikon
   mikrofon butonundan büyür. */
.ai-dome { --lvl: 0; --gx: -370px; --mx: -370px; position: absolute; left: 50%; bottom: 0; width: 900px; max-width: 100%; height: 560px; margin-left: -450px; z-index: 4; pointer-events: none; cursor: pointer; }
.ai-kart.listening .ai-dome { pointer-events: auto; }
.ai-dome .tint { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(ellipse 52% 78% at 50% 100%, rgba(255,255,255,.82) 0%, rgba(175,218,246,.5) 38%, rgba(120,180,225,.16) 68%, rgba(120,180,225,0) 100%); }
.ai-kart.listening .ai-dome .tint { opacity: 1; transition: opacity .7s ease .1s; }
.ai-dome .bs { position: absolute; inset: 0; pointer-events: none; }
.ai-dome .bs i { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity .35s ease; }
.ai-kart.listening .ai-dome .bs i { opacity: 1; transition: opacity .7s ease .1s; }
.ai-dome .glow { position: absolute; left: 50%; bottom: -150px; width: 400px; height: 400px; margin-left: -200px; opacity: 0;
  transform: translate(var(--gx), 0) scale(.14); transition: transform .45s ease, opacity .3s ease; }
.ai-kart.listening .ai-dome .glow { opacity: 1; transform: none; transition: transform .95s cubic-bezier(.2,1.1,.3,1), opacity .5s ease; }
.ai-dome .glow i { display: block; width: 100%; height: 100%; border-radius: 50%; filter: blur(10px);
  background: radial-gradient(circle, rgba(255,255,255,.85), rgba(150,210,245,.3) 52%, transparent 70%);
  transform: scale(calc(.9 + var(--lvl) * .6)); transition: transform .12s linear; }
.ai-dome .mk { position: absolute; left: 50%; bottom: 74px; width: 100px; height: 100px; margin-left: -50px; color: #fff; opacity: 0;
  transform: translate(var(--mx), 66px) scale(.4); transition: transform .4s ease, opacity .25s ease; filter: drop-shadow(0 6px 22px rgba(5,47,82,.35)); }
.ai-kart.listening .ai-dome .mk { opacity: 1; transform: none; transition: transform .95s cubic-bezier(.2,1.1,.3,1), opacity .5s ease .1s; }
.ai-dome .mk svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(calc(1 + var(--lvl) * .12)); transition: transform .12s linear; }
.ai-dome .mk .sharp { -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.15) 0%, #000 75%); mask-image: linear-gradient(to top, rgba(0,0,0,.15) 0%, #000 75%); }
.ai-dome .mk .soft { filter: blur(4px); -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%); mask-image: linear-gradient(to top, #000 0%, transparent 85%); }
.ai-dome .ipucu { position: absolute; left: 0; right: 0; bottom: 38px; text-align: center; font-size: 13px; font-weight: 300; letter-spacing: .02em; color: rgba(222,236,250,.78); opacity: 0; transition: opacity .25s; }
.ai-kart.listening .ai-dome .ipucu { opacity: 1; transition: opacity .6s ease .5s; }

/* Genel textarea/düğme stilleri (tasarim.css, styles.css) bu pencerede geçerli değil. */
html body .ai-kart .ai-giris { background: transparent !important; border: 0 !important; box-shadow: none !important; outline: 0 !important;
  color: var(--ai-alan-yazi) !important; padding: 17px 0 !important; min-height: 0 !important; border-radius: 0 !important; height: auto; }
html body .ai-kart .ai-giris::placeholder { color: var(--ai-alan-ipucu) !important; }

/* ---------- Yazı ağırlığı ----------
   tasarim.css: `html body * { font-weight: 500 !important }`. Bu pencerede
   Outfit'in ince ağırlıkları kullanılıyor; özgüllük bilerek daha yüksek. */
html body .ai-kart, html body .ai-kart * { font-weight: 200 !important; }
html body .ai-kart .ai-selam .l1, html body .ai-kart .ai-selam .l2 { font-weight: 100 !important; }
html body .ai-kart .ai-selam .l2 b { font-weight: 500 !important; }
html body .ai-kart .ai-ornek, html body .ai-kart .ai-giris, html body .ai-kart .ai-giris::placeholder,
html body .ai-kart .ai-bekle-yazi, html body .ai-kart .ai-kaynak, html body .ai-kart .ai-ipucu, html body .ai-kart .ai-durum { font-weight: 300 !important; }
html body .ai-kart .ai-balon strong, html body .ai-kart .ai-cevap-ic strong, html body .ai-kart .ai-k.b { font-weight: 400 !important; }
html body .ai-kart .ai-tablo th { font-weight: 300 !important; }

/* ---------- Telefon genişliği: tam ekran ---------- */
@media (max-width: 500px) {
  .ai-kapla { padding: 0; }
  .ai-kart { --ai-sq: 0px; max-width: 100%; height: 100dvh; border-radius: 0; }
  .ai-selam { padding: calc(64px + env(safe-area-inset-top)) 24px 0; }
  .ai-selam .l1, .ai-selam .l2 { font-size: 36px; }
  .ai-ornekler { padding: 0 24px; height: 178px; margin-top: 22px; }
  .ai-ornek { font-size: 20px; max-width: 330px; }
  .ai-akis { padding: 64px 18px 14px; }
  .ai-balon { max-width: 96%; font-size: 15.5px; padding: 13px 18px; }
  .ai-cevap-ic { font-size: 15.5px; }
  .ai-yaz { padding: 8px 18px calc(10px + env(safe-area-inset-bottom)); }
  .ai-mik { width: 54px; height: 54px; }
  .ai-alan { min-height: 54px; }
  .ai-canli { left: 26px; bottom: 330px; max-width: 342px; }
  .ai-sat { font-size: 38px; }
  .ai-dome { width: 130vw; margin-left: -65vw; max-width: none; height: 400px; --gx: -150px; --mx: -150px; }
  .ai-alive { height: 460px; }
  .ai-edge { border-radius: 0; }
  .ai-xbtn { top: calc(14px + env(safe-area-inset-top)); }
}

/* ---------- Hareketi azalt: animasyonlar kapalı ---------- */
@media (prefers-reduced-motion: reduce) {
  .ai-kapla, .ai-kart, .ai-kart *, .ai-kart *::before, .ai-kart *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .ai-alive i { animation: none; }
}
