*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    font-family:'Inter',sans-serif;
    background:#020617;
    color:#fff;
    overflow:hidden;
      overflow-x:hidden;
      width:100%;
}

/* ======================================
APP LAYOUT
====================================== */

.app-layout{
    width:100vw;
    height:100vh;
    display:flex;
    overflow:hidden;
}

/* ======================================
SIDEBAR
====================================== */

.sidebar{
    width:320px;
    height:100vh;
    background:#0b1120;
    border-right:1px solid rgba(255,255,255,.06);
    display:flex;
    flex-direction:column;
    transition:.3s;
}

/* ======================================
SIDEBAR TOP
====================================== */

.sidebar-top{
    padding:20px;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.new-chat-btn{
    width:100%;
    height:54px;
    border:none;
    border-radius:16px;
    background:linear-gradient(
        135deg,
        #7c3aed,
        #06b6d4
    );
    color:#fff;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    transition:.3s;
}

.new-chat-btn:hover{
    transform:translateY(-2px);
}

/* ======================================
CONVERSATION HISTORY
====================================== */

.conversation-history{
    flex:1;
    overflow-y:auto;
    padding:18px;
}

.conversation-history::-webkit-scrollbar{
    width:5px;
}

.conversation-history::-webkit-scrollbar-thumb{
    background:#1e293b;
    border-radius:20px;
}

/* ======================================
CONVERSATION ITEM
====================================== */

.conversation-item{
    width:100%;
    padding:16px;
    border-radius:18px;
    background:transparent;
    display:flex;
    align-items:center;
    gap:14px;
    cursor:pointer;
    transition:.3s;
    margin-bottom:12px;
}

.conversation-item:hover{
    background:#111827;
}

.conversation-item.active{
    background:#1e293b;
}

.conversation-icon{
    min-width:46px;
    width:46px;
    height:46px;
    border-radius:14px;
    background:linear-gradient(
        135deg,
        #7c3aed,
        #06b6d4
    );
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
}

.conversation-text{
    flex:1;
    overflow:hidden;
}

.conversation-text h4{
    font-size:14px;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    margin-bottom:6px;
}

.conversation-text p{
    font-size:12px;
    color:#94a3b8;
}

/* ======================================
SIDEBAR BOTTOM
====================================== */

.sidebar-bottom{
    padding:18px;
    border-top:1px solid rgba(255,255,255,.06);
}

.sidebar-user{
    display:flex;
    align-items:center;
    gap:14px;
}

.sidebar-user-avatar{
    width:48px;
    height:48px;
    border-radius:50%;
    background:#1e293b;
    display:flex;
    align-items:center;
    justify-content:center;
}

.sidebar-user h4{
    font-size:14px;
    margin-bottom:4px;
}

.sidebar-user p{
    font-size:12px;
    color:#94a3b8;
}

/* ======================================
CHAT APP
====================================== */

.chat-app{
    flex:1;
    height:100vh;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    position:relative;
}

/* ======================================
HEADER
====================================== */

.chat-header{
    height:80px;
    padding:0 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid rgba(255,255,255,.06);
    background:rgba(2,6,23,.9);
    backdrop-filter:blur(20px);
}

.header-left{
    display:flex;
    align-items:center;
    gap:16px;
}

.mobile-menu-btn{
    width:42px;
    height:42px;
    border:none;
    border-radius:12px;
    background:#111827;
    color:#fff;
    cursor:pointer;
    display:none;
}

.ai-logo{
    width:54px;
    height:54px;
    border-radius:50%;
    background:linear-gradient(
        135deg,
        #7c3aed,
        #06b6d4
    );
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    overflow:hidden;
    font-size:22px;
}

.logo-glow{
    position:absolute;
    width:120%;
    height:120%;
    background:rgba(255,255,255,.15);
    border-radius:50%;
    animation:pulseGlow 2s infinite;
}

@keyframes pulseGlow{

    0%{
        transform:scale(.8);
        opacity:.5;
    }

    50%{
        transform:scale(1.2);
        opacity:0;
    }

    100%{
        transform:scale(.8);
        opacity:.5;
    }
}

.header-text h2{
    font-size:18px;
    font-weight:700;
    margin-bottom:4px;
}

.header-text p{
    font-size:13px;
    color:#94a3b8;
}

.header-right{
    display:flex;
    align-items:center;
    gap:12px;
}

.header-btn{
    width:46px;
    height:46px;
    border:none;
    border-radius:14px;
    background:#111827;
    color:#fff;
    cursor:pointer;
    font-size:16px;
}

/* ======================================
CHAT CONTAINER
====================================== */

.chat-container{
    flex:1;
    overflow-y:auto;
    padding:30px;
    display:flex;
    flex-direction:column;
    gap:24px;
    position:relative;
    background:
    radial-gradient(
        circle at top,
        rgba(59,130,246,.15),
        transparent 40%
    );
}

/* ======================================
SCROLLBAR
====================================== */

.chat-container::-webkit-scrollbar{
    width:5px;
}

.chat-container::-webkit-scrollbar-thumb{
    background:#1e293b;
    border-radius:20px;
}

/* ======================================
HERO SCREEN
====================================== */

.hero-screen{
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    position:relative;
    text-align:center;
}

.hero-bg{
    position:absolute;
    width:500px;
    height:500px;
    border-radius:50%;
    background:radial-gradient(
        circle,
        rgba(59,130,246,.2),
        transparent 70%
    );
    filter:blur(50px);
}

.voice-orb-wrapper{
    position:relative;
    z-index:2;
}

.voice-orb{
    width:170px;
    height:170px;
    border-radius:50%;
    background:linear-gradient(
        135deg,
        #7c3aed,
        #06b6d4
    );
    display:flex;
    align-items:center;
    justify-content:center;
    animation:floatOrb 4s ease-in-out infinite;
    box-shadow:
    0 0 80px rgba(59,130,246,.45);
}

.orb-inner{
    width:70%;
    height:70%;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    backdrop-filter:blur(20px);
}

@keyframes floatOrb{

    0%{
        transform:translateY(0px);
    }

    50%{
        transform:translateY(-12px);
    }

    100%{
        transform:translateY(0px);
    }
}

.hero-screen h1{
    font-size:52px;
    margin-top:34px;
    margin-bottom:14px;
    z-index:2;
}

.hero-screen p{
    font-size:18px;
    color:#94a3b8;
    z-index:2;
}

.live-status{
    margin-top:24px;
    padding:12px 20px;
    border-radius:999px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    display:flex;
    align-items:center;
    gap:10px;
    z-index:2;
}

.live-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#22c55e;
    animation:livePulse 1.5s infinite;
}

@keyframes livePulse{

    0%{
        opacity:1;
    }

    50%{
        opacity:.3;
    }

    100%{
        opacity:1;
    }
}

/* ======================================
MESSAGES
====================================== */

.message-wrapper{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.audio-message{
    align-self:flex-end;
    width:70%;
    background:#2563eb;
    padding:20px;
    border-radius:24px 24px 8px 24px;
}

.ai-message{
    align-self:flex-start;
    width:70%;
    background:#111827;
    border:1px solid rgba(255,255,255,.06);
    padding:20px;
    border-radius:24px 24px 24px 8px;
}

/* ======================================
USER INFO
====================================== */

.user-info{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:16px;
}

.user-avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    display:flex;
    align-items:center;
    justify-content:center;
}

.user-label{
    font-size:15px;
    font-weight:600;
}

.time-label{
    font-size:12px;
    opacity:.8;
    margin-top:4px;
}

/* ======================================
TRANSCRIPT
====================================== */

.transcript-box{
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.08);
    padding:16px;
    border-radius:16px;
    line-height:1.7;
    margin-bottom:16px;
    white-space:pre-wrap;
}

/* ======================================
AI TEXT
====================================== */

.ai-header{
    font-size:14px;
    font-weight:700;
    color:#38bdf8;
    margin-bottom:14px;
}

.ai-text{
    line-height:1.8;
    color:#e2e8f0;
    margin-bottom:18px;
    white-space:pre-wrap;
}

/* ======================================
AUDIO
====================================== */

audio{
    width:100%;
}

/* ======================================
FOOTER
====================================== */

.voice-recorder{
    padding:20px;
    border-top:1px solid rgba(255,255,255,.06);
    background:rgba(2,6,23,.9);
    backdrop-filter:blur(20px);
}

.recording-status{
    text-align:center;
    margin-bottom:16px;
    color:#94a3b8;
}

/* ======================================
WAVEFORM
====================================== */

.waveform{
    height:50px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    margin-bottom:18px;
}

.waveform span{
    width:4px;
    border-radius:999px;
    background:linear-gradient(
        to top,
        #06b6d4,
        #7c3aed
    );
    animation:wave 1s infinite ease-in-out;
}

@keyframes wave{

    0%,100%{
        transform:scaleY(.4);
    }

    50%{
        transform:scaleY(1);
    }
}

.hidden{
    display:none;
}

/* ======================================
CONTROLS
====================================== */

.controls{
    display:flex;
    justify-content:center;
    align-items:center;
}

.mic-button{
    width:90px;
    height:90px;
    border:none;
    border-radius:50%;
    position:relative;
    cursor:pointer;
    background:linear-gradient(
        135deg,
        #7c3aed,
        #06b6d4
    );
    color:#fff;
    font-size:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    box-shadow:
    0 10px 40px rgba(124,58,237,.45);
}

.mic-pulse{
    position:absolute;
    width:100%;
    height:100%;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    animation:micPulse 2s infinite;
}

@keyframes micPulse{

    0%{
        transform:scale(.8);
        opacity:.8;
    }

    100%{
        transform:scale(1.6);
        opacity:0;
    }
}

.footer-note{
    text-align:center;
    margin-top:16px;
    font-size:12px;
    color:#64748b;
}

/* ======================================
LOADER
====================================== */

.typing-loader{
    display:flex;
    gap:6px;
    margin-bottom:10px;
}

.typing-loader span{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#38bdf8;
    animation:bounce 1s infinite;
}

.typing-loader span:nth-child(2){
    animation-delay:.2s;
}

.typing-loader span:nth-child(3){
    animation-delay:.4s;
}

@keyframes bounce{

    0%,80%,100%{
        transform:scale(.7);
        opacity:.5;
    }

    40%{
        transform:scale(1);
        opacity:1;
    }
}

/* ======================================
RESPONSIVE
====================================== */

@media(max-width:900px){

    .sidebar{
        position:fixed;
        left:-100%;
        top:0;
        z-index:999;
    }

    .sidebar.active{
        left:0;
    }

    .mobile-menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .audio-message,
    .ai-message{
        width:100%;
    }

    .hero-screen h1{
        font-size:34px;
    }

    .voice-orb{
        width:120px;
        height:120px;
    }
}

/* ======================================
CONVERSATION CENTER VIEW
====================================== */

.conversation-view{
    width:100%;
    min-height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    text-align:center;
    padding:60px 40px 140px;
    overflow-y:auto;
}

/* ======================================
USER CARD
====================================== */

.user-voice-card{
    width:100%;
    max-width:850px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    border-radius:30px;
    padding:30px;
    margin-bottom:50px;
    backdrop-filter:blur(20px);
}

.voice-card-label{
    font-size:14px;
    color:#94a3b8;
    margin-bottom:14px;
}

.voice-card-text{
    font-size:14px;
    line-height:1.6;
    font-weight:600;
    color:#fff;
}

/* ======================================
AI SCREEN
====================================== */

.ai-voice-screen{
    display:flex;
    flex-direction:column;
    align-items:center;
}

/* ======================================
AI SPEAKING TEXT
====================================== */

.ai-speaking-text{
    max-width:900px;
    margin-top:40px;
    font-size:14px;
    line-height:1.6;
    font-weight:700;
    color:#fff;
}

/* ======================================
AI ORB ANIMATION
====================================== */

.ai-speaking{
    animation:aiSpeaking 1s infinite;
}

@keyframes aiSpeaking{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.08);
    }

    100%{
        transform:scale(1);
    }
}

/* ======================================
THINKING ORB
====================================== */

.thinking-orb{
    animation:thinkingAnim 1s infinite;
}

@keyframes thinkingAnim{

    0%{
        transform:scale(1);
        opacity:1;
    }

    50%{
        transform:scale(1.08);
        opacity:.8;
    }

    100%{
        transform:scale(1);
        opacity:1;
    }
}

/* ======================================
HIDE AUDIO PLAYER
====================================== */

#aiVoicePlayer,
#historyAudio{
    display:none;
}

/* ======================================
RESPONSIVE
====================================== */

@media(max-width:900px){

    .voice-card-text{
        font-size:14px;
    }

    .ai-speaking-text{
        font-size:18px;
    }

    .conversation-view{
        padding:20px;
    }
}

/* ======================================
WORD SPEAKING EFFECT
====================================== */

.ai-speaking-text{
    width:100%;
    max-width:1000px;
    margin-top:40px;
    font-size:18px;
    line-height:2.3;
    font-weight:700;
    color:rgba(255,255,255,.35);
    transition:.3s;
}


/* WORD */
.speak-word{
    display:inline-block;
    margin-right:12px;
    color:rgba(255,255,255,.28);
    transition:
    color .15s linear,
    transform .15s linear,
    text-shadow .15s linear;
}

/* ACTIVE WORD */

.active-word{
    color:#ffffff !important;
    opacity:1 !important;
    transform:scale(1.15);
    transition:.15s linear;

    text-shadow:
    0 0 10px #38bdf8,
    0 0 20px #38bdf8,
    0 0 40px #2563eb,
    0 0 80px rgba(59,130,246,.9);
}

/* ======================================
RESPONSIVE
====================================== */

@media(max-width:900px){

    .ai-speaking-text{
        font-size:16px;
        line-height:1.8;
    }
}


.stop-button{

    width: 65px;

    height: 65px;

    border: none;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #ff4d4d,
        #ff1f1f
    );

    color: #fff;

    font-size: 22px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow:
        0 10px 30px rgba(255,0,0,.35);

    transition: .3s ease;

    position: relative;
}

.stop-button:hover{

    transform: scale(1.08);

    box-shadow:
        0 15px 35px rgba(255,0,0,.5);
}

.stop-button:active{

    transform: scale(.95);
}

.stop-button.hidden{

    display: none;
}

.controls{

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 18px;
}