*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
background:#07111f;
font-family:-apple-system,BlinkMacSystemFont,"PingFang SC";
height:100vh;
}

.app{
height:100vh;
display:flex;
flex-direction:column;
}

.header{
height:64px;
background:rgba(8,20,40,.9);
backdrop-filter:blur(10px);
border-bottom:1px solid rgba(255,255,255,.08);
display:flex;
align-items:center;
padding:0 24px;
}

.logo{
color:#fff;
font-size:20px;
font-weight:700;
}

.chat-box{
flex:1;
overflow-y:auto;
padding:30px;
}

.message{
margin-bottom:20px;
}

.message.user{
text-align:right;
}

.bubble{
display:inline-block;
max-width:80%;
padding:14px 18px;
border-radius:18px;
line-height:1.8;

white-space: pre-wrap;
}

.ai .bubble{
background:#102848;
color:#fff;
}

.user .bubble{
background:#1d66ff;
color:#fff;
}

.tip{
font-size:12px;
color:#8fa8c8;
margin-top:8px;
line-height:1.5;
}

.input-bar{
padding:12px;
background:#081427;
border-top:1px solid rgba(255,255,255,.08);
display:flex;
gap:12px;
padding-bottom:calc(12px + env(safe-area-inset-bottom));
}

textarea{
flex:1;
height:60px;
resize:none;
border:none;
border-radius:14px;
padding:12px;
background:#102848;
color:#fff;
font-size:15px;
}

button{
width:110px;
border:none;
border-radius:14px;
cursor:pointer;
background:#2b6dff;
color:#fff;
font-size:15px;
font-weight:600;
}

button:hover{
opacity:.9;
}

@media(max-width:768px){

.chat-box{
padding:15px;
}

.bubble{
max-width:95%;
}

button{
width:90px;
}

}

/* 思考动画 */

.thinking-box{
min-width:240px;
}

.thinking-text{
font-size:14px;
color:#d6e4ff;
margin-bottom:10px;
}

.thinking-bar{
height:4px;
width:180px;
background:rgba(255,255,255,.08);
border-radius:999px;
overflow:hidden;
}

.thinking-bar-inner{
height:100%;
width:40%;
border-radius:999px;
animation:thinkingMove 1.2s linear infinite;
background:linear-gradient(
90deg,
transparent,
#4da3ff,
transparent
);
}

@keyframes thinkingMove{

0%{
transform:translateX(-120%);
}

100%{
transform:translateX(350%);
}

}

html{
    height:100%;
    overflow:hidden;
    -webkit-text-size-adjust:100%;
}

body{
    height:100dvh;
    overflow:hidden;
    position:fixed;
    width:100%;
}

.app{
    height:100dvh;
    overflow:hidden;
}

.chat-box{
    flex:1;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
}