/* ==========================================================================
   PROVE ID - SLIDE 14 / AI AGENT AVATAR
   Telefonda görüntülü görüşme: konuşan avatar, kullanıcı kamerası,
   altyazı, ekran kaydı ve doğrulama adımları
   ========================================================================== */

.slide.avatar .body { width: 50%; }
.slide.avatar h1 { max-width: 50%; }
.slide.avatar .note { max-width: 50%; }

.ag-scene {
    --tint: #b04ee0;
    --tint-strong: #7b0096;
    --tint-line: color-mix(in srgb, var(--tint) 30%, transparent);
    --s: 1;
    position: absolute;
    right: 3vw;
    top: 0;
    bottom: 0;
    width: 44%;
    display: grid;
    place-items: center;
    perspective: 1600px;
    pointer-events: none;
}

.ag-stage {
    --rx: 4deg;
    --ry: -8deg;
    position: relative;
    width: 600px;
    height: 580px;
    flex: none;
    transform: scale(var(--s)) rotateY(var(--ry)) rotateX(var(--rx));
    transform-style: preserve-3d;
    transition: transform 0.6s var(--px-ease);
    animation: ag-enter 1.1s var(--px-ease) both;
}

@keyframes ag-enter {
    from { opacity: 0; transform: scale(calc(var(--s) * 0.92)) rotateY(-18deg) rotateX(8deg) translateY(30px); }
}

/* Arka plan: parıltı + yörüngeler */
.ag-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 460px;
    height: 460px;
    margin: -230px 0 0 -230px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--tint) 34%, transparent), transparent 65%);
    filter: blur(30px);
    animation: ag-breathe 6s ease-in-out infinite;
}

@keyframes ag-breathe { 50% { transform: scale(1.12); opacity: 0.75; } }

.ag-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    border: 1px dashed var(--tint-line);
    transform: translate(-50%, -50%);
}

.ag-orbit--1 { width: 500px; height: 500px; animation: ag-spin 60s linear infinite; }
.ag-orbit--2 { width: 640px; height: 640px; border-style: solid; border-color: color-mix(in srgb, var(--tint) 12%, transparent); }

.ag-orbit--1::before,
.ag-orbit--1::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    top: -4px;
    left: 50%;
    background: var(--tint);
    box-shadow: 0 0 14px var(--tint);
}

.ag-orbit--1::after { top: auto; bottom: 18%; left: 5%; background: var(--px-cyan); box-shadow: 0 0 14px var(--px-cyan); }

@keyframes ag-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ag-rotate { to { transform: rotate(360deg); } }
@keyframes ag-bob { 50% { translate: 0 -10px; } }

/* Görüntülü görüşme: telefon ekranında konuşan avatar */
.ag-phone {
    position: absolute;
    left: 50%;
    top: 0;
    width: 292px;
    height: 580px;
    margin-left: -146px;
    padding: 12px;
    border-radius: 48px;
    background: linear-gradient(160deg, #2a2f45, #0b0f24);
    box-shadow: 0 0 0 1.5px rgba(138, 162, 255, 0.28) inset, 0 60px 110px -50px color-mix(in srgb, var(--tint) 75%, #000), 0 30px 60px -30px rgba(0, 0, 0, 0.75);
    transform: translateZ(30px);
}

.ag-notch {
    position: absolute;
    z-index: 3;
    top: 22px;
    left: 50%;
    width: 86px;
    height: 24px;
    margin-left: -43px;
    border-radius: 999px;
    background: #05070f;
}

.ag-screen {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 37px;
    background: linear-gradient(180deg, #3c4049 0%, #30343c 48%, #151a2b 78%, #0c1029 100%);
}

.ag-video {
    position: absolute;
    left: 50%;
    top: 46px;
    width: 300px;
    height: 300px;
    margin-left: -150px;
    object-fit: cover;
    -webkit-mask-image: radial-gradient(75% 70% at 50% 42%, #000 62%, transparent 100%);
    mask-image: radial-gradient(75% 70% at 50% 42%, #000 62%, transparent 100%);
    animation: ag-breathe-v 6s ease-in-out infinite;
}

@keyframes ag-breathe-v { 50% { transform: scale(1.025); } }

.ag-top {
    position: absolute;
    z-index: 2;
    top: 56px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ag-brand {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10, 14, 36, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ag-brand-logo { display: block; height: 14px; width: auto; color: #fff; }

.ag-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(10, 14, 36, 0.55);
    font-variant-numeric: tabular-nums;
}

.ag-timer i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 8px #ff4d5e; animation: ag-rec 1.4s ease-in-out infinite; }

.ag-self {
    position: absolute;
    z-index: 2;
    top: 96px;
    right: 14px;
    width: 74px;
    height: 98px;
    overflow: hidden;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.7);
}

.ag-self img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ag-self span {
    position: absolute;
    left: 5px;
    bottom: 5px;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

.ag-caption {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 96px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(12, 16, 41, 0.78);
    border: 1px solid color-mix(in srgb, var(--tint) 45%, transparent);
    box-shadow: 0 0 30px -12px var(--tint);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ag-ctrl {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 28px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.ag-ctrl i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.ag-ctrl svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-ctrl .ag-end { background: #ef4444; box-shadow: 0 10px 22px -8px #ef4444; }
.ag-ctrl .ag-end svg { fill: #fff; stroke: none; }

/* Yüzen kartlar */
.ag-float {
    position: absolute;
    z-index: 3;
    padding: 13px 15px;
    border-radius: 18px;
    color: var(--px-text);
    background: rgba(22, 30, 76, 0.88);
    border: 1px solid rgba(138, 162, 255, 0.25);
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: ag-bob 6s ease-in-out infinite;
}

.ag-label {
    margin-bottom: 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--px-muted);
}

.ag-rec {
    top: 120px;
    left: -6px;
    display: flex;
    align-items: center;
    gap: 11px;
    transform: translateZ(80px);
}

.ag-rec b { display: block; font-size: 13px; }
.ag-rec small { display: block; font-size: 11px; color: var(--px-muted); font-weight: 500; }

.ag-rec-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4d5e;
    box-shadow: 0 0 12px #ff4d5e;
    animation: ag-rec 1.4s ease-in-out infinite;
}

.ag-rec-dot::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #ff4d5e;
    animation: ag-pulse 1.4s ease-out infinite;
}

@keyframes ag-rec { 50% { opacity: 0.35; } }
@keyframes ag-pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.ag-steps {
    width: 236px;
    right: -40px;
    bottom: 150px;
    transform: translateZ(70px);
    animation-delay: -1s;
}

.ag-list { display: grid; gap: 7px; margin: 0; padding: 0; }

.ag-list li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 600;
    color: var(--px-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    animation: ag-row-in 0.6s var(--px-ease) both;
}

.ag-list li:before { display: none; }
.ag-list li em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; color: #34d399; }
.ag-list li.is-pending em { color: var(--tint); }

@keyframes ag-row-in { from { opacity: 0; transform: translateY(8px); } }

.ag-ok {
    width: 20px;
    height: 20px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #34d399;
    background: rgba(16, 185, 129, 0.16);
}

.ag-ok svg { width: 11px; height: 11px; }

.ag-list li.is-pending .ag-ok {
    background: transparent;
    border: 2px solid var(--tint-line);
    border-top-color: var(--tint);
    animation: ag-rotate 0.9s linear infinite;
}

/* Avatarın konuşma altyazısı */
.ag-name {
    display: block;
    margin-bottom: 5px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tint);
}

.ag-lines { position: relative; display: grid; min-height: 40px; }

.ag-lines > span {
    grid-area: 1 / 1;
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    animation: ag-say 12s var(--px-ease) infinite;
}

.ag-lines > span:nth-child(2) { animation-delay: 3s; }
.ag-lines > span:nth-child(3) { animation-delay: 6s; }
.ag-lines > span:nth-child(4) { animation-delay: 9s; }

@keyframes ag-say {
    0% { opacity: 0; transform: translateY(8px); filter: blur(3px); }
    4%, 21% { opacity: 1; transform: none; filter: none; }
    25%, 100% { opacity: 0; transform: translateY(-6px); filter: blur(2px); }
}

.ag-wave { display: flex; align-items: center; gap: 3px; height: 16px; margin-top: 7px; }

.ag-wave i {
    width: 3px;
    height: 4px;
    border-radius: 3px;
    background: var(--tint);
    animation: ag-wave 0.9s ease-in-out infinite;
}

.ag-wave i:nth-child(2) { animation-delay: 0.12s; }
.ag-wave i:nth-child(3) { animation-delay: 0.24s; }
.ag-wave i:nth-child(4) { animation-delay: 0.36s; }
.ag-wave i:nth-child(5) { animation-delay: 0.48s; }
.ag-wave i:nth-child(6) { animation-delay: 0.6s; }
.ag-wave i:nth-child(7) { animation-delay: 0.72s; }

@keyframes ag-wave { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* Azaltılmış hareket: ilk cümle ve tüm mesajlar sabit görünür */
@media (prefers-reduced-motion: reduce) {
    .ag-lines > span:first-child { opacity: 1; }
}

/* ==========================================================================
   AÇIK TEMA — sitedeki orijinal beyaz kart görünümü
   ========================================================================== */
html[data-theme="light"] .ag-scene { --tint: #7b0096; --tint-strong: #5c0072; }



html[data-theme="light"] .ag-float {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(18, 32, 78, 0.08);
    box-shadow: 0 30px 60px -28px rgba(10, 16, 51, 0.38);
    color: #0a1033;
}

html[data-theme="light"] .ag-list li { background: #fff; border-color: rgba(18, 32, 78, 0.08); color: #0a1033; }
html[data-theme="light"] .ag-list li em { color: #059669; }
html[data-theme="light"] .ag-list li.is-pending em { color: var(--tint); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1350px) and (min-width: 761px) { .ag-scene { --s: 0.84; } }
@media (min-width: 761px) and (max-height: 790px) { .ag-scene { --s: 0.8; } }
@media (max-width: 1100px) and (min-width: 761px) {
    .ag-scene { --s: 0.66; right: 0; width: 46%; }
    .slide.avatar .glass-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .slide.avatar .body,
    .slide.avatar h1,
    .slide.avatar .note { width: 100%; max-width: 100%; }
    .ag-scene { position: relative; right: auto; width: 100%; height: 400px; margin-top: 20px; --s: 0.62; }
    .ag-orbit--2 { display: none; }
}

@media print {
    .ag-scene { display: none; }
}

/* ==========================================================================
   SOL TARAF — diğer slaytlarla aynı ikonlu kart düzeni
   Asistan hangi cümleyi söylüyorsa ilgili kart aynı anda vurgulanır
   (ag-say ile aynı 12 sn döngü; --sd: başlangıç gecikmesi)
   ========================================================================== */
.slide.avatar .intro { font-size: 18px; margin: 0 0 14px; }
.slide.avatar .kp .kf { font-size: 15px; padding: 10px 12px 10px 9px; }
.slide.avatar .kp .kf-ico { width: 36px; height: 36px; }
.slide.avatar .kp .kf-ico svg { width: 18px; height: 18px; }

.slide.avatar .kf[data-sync] {
    animation: k-rise 0.6s var(--px-ease) both, ag-sync 12s var(--px-ease) infinite;
    animation-delay: calc(0.12s + var(--i) * 55ms), var(--sd);
}

@keyframes ag-sync {
    0%, 25%, 100% { border-color: var(--px-border); box-shadow: none; }
    4%, 21% { border-color: color-mix(in srgb, #b04ee0 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, #b04ee0 35%, transparent), 0 14px 30px -16px #b04ee0; }
}

.slide.avatar .kf[data-sync] .kf-ico { animation: ag-sync-ico 12s var(--px-ease) infinite; animation-delay: var(--sd); }

@keyframes ag-sync-ico {
    0%, 25%, 100% { color: var(--px-cyan); background: linear-gradient(145deg, rgba(79, 216, 255, 0.16), rgba(86, 119, 255, 0.1)); }
    4%, 21% { color: #fff; background: linear-gradient(145deg, #7b0096, #b04ee0); }
}

html[data-theme="light"] .slide.avatar .kf[data-sync] .kf-ico { animation-name: ag-sync-ico-l; }
@keyframes ag-sync-ico-l {
    0%, 25%, 100% { color: #1d45dc; background: #edf2ff; }
    4%, 21% { color: #fff; background: linear-gradient(145deg, #7b0096, #b04ee0); }
}

@media (min-width: 761px) and (max-height: 790px) {
    .slide.avatar .intro { font-size: 15px; margin-bottom: 10px; }
    .slide.avatar .kp .kf { font-size: 13.5px; padding: 6px 10px 6px 6px; }
    .slide.avatar .kp .kf-ico { width: 30px; height: 30px; }
}

@media (max-width: 1100px) and (min-width: 761px) {
    .slide.avatar .kp-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .slide.avatar .kf[data-sync], .slide.avatar .kf[data-sync] .kf-ico { animation: none; }
}
