/* AI对话页样式 */

.chat-page {
    background: var(--bg-secondary);
}

/* 顶部导航 */
.chat-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.back-btn:active {
    background: var(--bg-secondary);
}

.ai-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-status {
    display: flex;
    flex-direction: column;
}

.ai-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-text {
    font-size: 12px;
    color: #4CAF50;
}

.header-actions {
    margin-left: auto;
}

.menu-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
}

/* 对话内容区 */
.chat-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* 消息样式 */
.message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 12px;
}

.ai-message .message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 16px 16px 16px 4px;
    box-shadow: 0 2px 8px var(--shadow-color);
    max-width: calc(100% - 60px);
}

.ai-message .message-content p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.ai-message .message-content p:last-child {
    margin-bottom: 0;
}

.quick-hints {
    margin: 12px 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-hints li {
    margin-bottom: 6px;
}

.quick-hints li::marker {
    color: var(--gold-color);
}

.example-text {
    color: var(--primary-color);
    font-size: 13px;
    background: rgba(196, 18, 48, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* 快捷选项 */
.quick-options {
    margin-top: 24px;
}

.option-group {
    margin-bottom: 16px;
}

.option-label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.option-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chip:hover,
.chip:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 用户消息 */
.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    max-width: calc(100% - 60px);
    font-size: 14px;
    line-height: 1.5;
}

.user-message .message-avatar {
    margin-right: 0;
    margin-left: 12px;
    background: var(--gold-color);
}

/* 输入区域 */
.chat-input-area {
    background: white;
    padding: 12px 16px 20px;
    border-top: 1px solid var(--border-color);
}

.input-container {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.message-input:focus {
    border-color: var(--primary-color);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:active {
    transform: scale(0.95);
}

.input-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* 加载动画 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
