/* ===== 基础配色：德国金融科技风 ===== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(circle at top left, #0d1b2a, #1a1f2e);
    color: white;
    margin: 0;
    padding: 0;
}

/* ===== 紧凑型头部 ===== */
header {
    background: linear-gradient(90deg, #0d1b2a, #1a1f2e);
    padding: 10px 20px;
    border-bottom: 2px solid #d4af37;
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-text h1 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    color: #d4af37;
}

.header-text p {
    font-size: 13px;
    margin: 2px 0 0 0;
    color: #cbd5e1;
}

/* ===== 团队介绍 ===== */
.team-intro {
    max-width: 650px;
    margin: 15px auto 20px auto;
    background: rgba(20,24,39,0.85);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(212,175,55,0.15);
}

.team-intro h2 {
    color: #d4af37;
    font-size: 18px;
    margin-bottom: 8px;
}

.team-intro p {
    font-size: 14px;
    color: #e5e7eb;
    margin-bottom: 10px;
}

.team-intro ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.team-intro li {
    font-size: 14px;
    color: #cbd5e1;
    margin: 4px 0;
}

/* ===== 主内容区域 ===== */
main {
    max-width: 650px;
    margin: auto;
    padding: 15px;
}

/* 默认桌面端高度 */
.chat-box {
    background: rgba(20,24,39,0.85);
    border-radius: 16px;
    padding: 15px;
    height: 500px; /* 桌面端原高度 */
    overflow-y: auto;
    margin-bottom: 15px;
    box-shadow: inset 0 0 20px rgba(212,175,55,0.15);
}

/* 手机端优化：高度更低，让输入框可见 */
@media (max-width: 768px) {
    .chat-box {
        height: 460px; /* 比原来少很多 */
    }
}

@media (max-width: 480px) {
    .chat-box {
        height: 360px; /* 小屏手机再缩小 */
    }
}

.chat-msg {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.4;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.user-msg {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    margin-left: auto;
}

.ai-msg {
    background: rgba(255,255,255,0.07);
    border-left: 3px solid #d4af37;
}

.msg-time {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 2px;
    margin-left: 4px;
}

/* ===== 输入框 ===== */
.input-area {
    display: flex;
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
    border-radius: 8px;
    overflow: hidden;
}

.input-area input {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.05);
    color: white;
}

.input-area button {
    padding: 0 25px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.input-area button:hover {
    background: linear-gradient(135deg, #b8860b, #d4af37);
}

/* ===== 风险提示 ===== */
.risk-warning {
    font-size: 12px;
    color: #f87171;
    margin-top: 10px;
    background: rgba(255,0,0,0.1);
    padding: 10px;
    border-radius: 6px;
}

/* ===== 进度条（与气泡等宽） ===== */
.progress-container {
    display: block;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    height: 16px;
    margin: 5px 0;
    border: 1px solid #d4af37;
    box-shadow: 0 0 8px rgba(212,175,55,0.5);
    max-width: 80%;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #d4af37, #b8860b);
    background-size: 300% 300%;
    animation: neonFlow 2.5s linear infinite;
    transition: width 0.8s ease-out;
    border-radius: 12px;
}

@keyframes neonFlow {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

/* ===== 按钮样式 ===== */
.assistant-btn {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(212,175,55,0.6);
}

.assistant-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(212,175,55,0.9);
}

/* ===== 弹窗 ===== */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999;
}

.popup-box {
    background: #0f172a;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    width: 300px;
    color: white;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 25px rgba(212,175,55,0.6);
}

.popup-box button {
    margin: 8px;
    padding: 8px 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.popup-confirm {background: #22c55e;color: white;}
.popup-cancel {background: #ef4444;color: white;}
