/* 
   🌌 CONSCIOUS AI - REFINED APEX EDITION
*/

:root {
    --ai-bg-main: radial-gradient(circle at 50% 0%, #10141d 0%, #05070a 100%);
    --ai-accent: #3b82f6;
    --ai-text-silk: #e2e8f0;
}

.ai-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}


.ai-modal-wrap.visible {
    pointer-events: auto;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    background: rgba(0, 0, 0, 0.4);
}


.ai-modal-card {
    background: var(--ai-bg-main);
    width: 100% !important;
    height: auto;
    max-height: 100dvh;
    border-radius: 32px 32px 0 0;
    position: relative;
    overflow: hidden;
    transform: translateY(105%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.4s ease, height 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ai-modal-card.full-screen {
    border-radius: 0;
}

.ai-modal-wrap.visible .ai-modal-card {
    transform: translateY(0);
}


/* 🛸 AURA */
.ai-plasma-aura {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
    animation: aura-rot 20s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes aura-rot {
    to {
        transform: rotate(360deg);
    }
}

/* ⚡ HEADER */
.ai-ultra-slim-header {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.neural-text {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}

.scan-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ai-accent), transparent);
    animation: scan-loop 3s infinite;
}

@keyframes scan-loop {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* 📝 CONTENT & SCROLL */
.ai-modal-scroll-area {
    flex: 1;
    /* Alttaki footer'ı en aşağı iter */
    overflow-y: hidden;
    /* JavaScript ile auto yapılacak */
    padding: 24px 24px 40px;
    position: relative;
    z-index: 2;
    -webkit-overflow-scrolling: touch;
}

.ai-modal-scroll-area.can-scroll {
    overflow-y: auto !important;
}

.ai-title-compact {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
}

.ai-text-body {
    color: var(--ai-text-silk);
    font-size: 19px;
    line-height: 1.8;
    padding-bottom: 50px;
    /* Space for the live indicator */
}

/* 🚀 LIVE SYNC INDICATOR */
.ai-live-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(59, 130, 246, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ai-live-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.ai-live-indicator .pulse-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: dot-pulse 1s infinite;
}

@keyframes dot-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ☄️ CURSOR & WORDS */
.ai-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--ai-accent);
    box-shadow: 0 0 10px var(--ai-accent);
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 4px;
    animation: cursor-pulse 1s ease-in-out infinite;
}

@keyframes cursor-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scaleY(1);
    }

    50% {
        opacity: 0.3;
        transform: scaleY(0.8);
    }
}

.ai-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(4px);
    animation: w-rev 0.3s forwards;
}

@keyframes w-rev {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ⚓ JILET FOOTER (EN ALTA SABİT) */
.ai-jilet-footer {
    display: flex;
    height: 60px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
    z-index: 101;
}

.ai-jilet-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
    border: none;
    outline: none;
}

.ai-jilet-close {
    color: #888;
    background: #000;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-jilet-detail {
    color: #fff;
    background: #111827;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-jilet-source {
    color: #fff;
    background: #2563eb;
}