/* ============================= */
/* WRAPPER */
/* ============================= */

.ai-wrapper{
    display:flex;
    justify-content:center;
    margin:60px 0;
    perspective:1600px;
}

/* ============================= */
/* 3D CARD */
/* ============================= */

.ai-card{
    width:950px;
    min-height:380px;
    display:flex;
    align-items:center;
    padding:40px;
    border-radius:22px;
    background:linear-gradient(145deg,#ffffff,#f1f5ff);
    box-shadow:
        0 40px 80px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.6);
    gap:30px;
    position:relative;
    z-index:1;
    transform-style:preserve-3d;
    transition:transform 0.4s ease, box-shadow 0.4s ease;
    animation:floatCard 6s ease-in-out infinite;
}

.ai-card:hover{
    transform:rotateY(6deg) rotateX(4deg);
    box-shadow:
        0 60px 120px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

@keyframes floatCard{
    0%{ transform:translateY(0px); }
    50%{ transform:translateY(-6px); }
    100%{ transform:translateY(0px); }
}

/* ============================= */
/* PRESENTER AREA */
/* ============================= */

.ai-presenter-area{
    flex:0 0 280px;
    display:flex;
    justify-content:center;
    align-items:center;
    position:relative;
    z-index:20;
}

/* ============================= */
/* AVATAR */
/* ============================= */

.ai-avatar{
    width:260px;
    height:320px;
    display:flex;
    justify-content:center;
    align-items:center;
    position:relative;
    z-index:50;
    transform-origin:center bottom;
    transition:transform 0.4s ease;
}

/* FLIP SUPPORT */
.ai-avatar.ai-flip{
    transform:scaleX(-1);
}

/* ============================= */
/* SVG FIT + MOTION */
/* ============================= */

.ai-svg{
    width:100%;
    height:100%;
    object-fit:contain;
    transform-origin:center bottom;
    animation:
        aiIdleMotion 5s ease-in-out infinite,
        aiGlow 6s ease-in-out infinite;
}

/* ============================= */
/* IDLE WALK + FORWARD/BACK */
/* ============================= */

@keyframes aiIdleMotion{
    0%{
        transform:translateY(0px) translateZ(0px);
    }
    20%{
        transform:translateY(-6px) translateZ(20px);
    }
    40%{
        transform:translateY(0px) translateZ(35px);
    }
    60%{
        transform:translateY(-4px) translateZ(20px);
    }
    80%{
        transform:translateY(0px) translateZ(10px);
    }
    100%{
        transform:translateY(0px) translateZ(0px);
    }
}

@keyframes aiGlow{
    0%{ filter:drop-shadow(0 0 0 rgba(99,102,241,0.0)); }
    50%{ filter:drop-shadow(0 8px 20px rgba(99,102,241,0.25)); }
    100%{ filter:drop-shadow(0 0 0 rgba(99,102,241,0.0)); }
}

/* ============================= */
/* SPEAKING BOUNCE */
/* ============================= */

.ai-speaking .ai-svg{
    animation:aiSpeakingBounce 0.6s ease-in-out infinite;
}

@keyframes aiSpeakingBounce{
    0%{ transform:translateY(0px) scale(1.02); }
    50%{ transform:translateY(-6px) scale(1.05); }
    100%{ transform:translateY(0px) scale(1.02); }
}

/* ============================= */
/* CONTENT */
/* ============================= */

.ai-content{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:space-between;   /* push controls to bottom */
    height:100%;
    padding-top:10px;
}

/* Top content section */
.ai-content-top{
    display:flex;
    flex-direction:column;
}

.ai-label{
    font-size:13px;
    font-weight:600;
    letter-spacing:1px;
    text-transform:uppercase;
    color:#6366f1;
    margin-bottom:6px;
}

.ai-text{
    font-size:19px;
    font-family:'Poetsen One',sans-serif; 
    line-height:1.6;
    color:#1e293b;
    margin-bottom:10px;
}

/* ============================= */
/* CONTROLS */
/* ============================= */

.ai-controls{
    display:flex;
    align-items:center;
    gap:12px;
    padding-top:10px;
    border-top:1px solid #e5e7eb; /* subtle divider */
}

.ai-controls button,
.ai-controls select{
    padding:7px 14px;
    border-radius:8px;
    border:none;
    font-size:14px;
}

.ai-controls button{
    background:#6366f1;
    color:white;
    cursor:pointer;
}

.ai-controls select{
    padding:7px 14px;
    border-radius:8px;
    border:none;
    font-size:14px;
    background:#e2e8f0;
}

/* ============================= */
/* PROGRESS BAR */
/* ============================= */

.ai-progress-container{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:6px;
    background:#e2e8f0;
    border-radius:0 0 22px 22px;
    overflow:hidden;
    z-index:2;
}

.ai-progress-bar{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#6366f1,#22d3ee);
    transition:width linear;
}

/* ============================= */
/* PRESENTER TRANSITION */
/* ============================= */

.ai-presenter-area{
    transition:opacity 0.4s ease, transform 0.4s ease;
}

/* Exit animation */
.ai-presenter-exit{
    opacity:0;
    transform:translateX(-30px);
}

/* Enter animation */
.ai-presenter-enter{
    opacity:1;
    transform:translateX(0px);
}
/* ============================= */
/* 3D INTENSITY CONTROL */
/* ============================= */

/* LOW */
.ai-card.low-3d:hover{
    transform:rotateY(3deg) rotateX(2deg);
}

/* MEDIUM (DEFAULT) */
.ai-card.medium-3d:hover{
    transform:rotateY(6deg) rotateX(4deg);
}

/* HIGH */
.ai-card.high-3d:hover{
    transform:rotateY(10deg) rotateX(6deg);
}