/* NextChat风格样式 */

/* 主容器样式 */
.nextchat-style {
    margin: 50px 0;
    padding: 30px 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.nextchat-container {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 600px;
}

/* 头部样式 */
.nextchat-header {
    background: #f9f9f9;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.nextchat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--healing-primary) 0%, var(--healing-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 15px;
    color: white;
}

.nextchat-controls {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.nextchat-controls .control-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #555;
    border: none;
    transition: all 0.2s ease;
}

.nextchat-controls .control-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* 消息区域样式 */
.nextchat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nextchat-messages::-webkit-scrollbar {
    width: 6px;
}

.nextchat-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.nextchat-messages::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 3px;
}

.nextchat-message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nextchat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.ai-message .nextchat-message-avatar {
    background: linear-gradient(135deg, var(--healing-primary) 0%, var(--healing-secondary) 100%);
    color: white;
}

.user-message .nextchat-message-avatar {
    background: #f0f0f0;
    color: #555;
}

.nextchat-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 10px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ai-message .nextchat-message-content {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    color: #333;
}

.user-message .nextchat-message-content {
    background: linear-gradient(135deg, var(--healing-accent) 0%, var(--healing-warm) 100%);
    border: 1px solid var(--healing-border);
    color: white;
}

/* 输入区域样式 */
.nextchat-input-area {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.nextchat-input-container {
    display: flex;
    gap: 10px;
    position: relative;
}

.nextchat-textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    resize: none;
    min-height: 24px;
    max-height: 150px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.nextchat-textarea:focus {
    border-color: var(--healing-primary);
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.1);
}

.nextchat-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.nextchat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--healing-primary) 0%, var(--healing-secondary) 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nextchat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.nextchat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 底部状态栏 */
.nextchat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #666;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-label {
    font-weight: 500;
}

.nextchat-select {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.85rem;
    outline: none;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.small-btn {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.small-btn:hover {
    background: #f0f0f0;
}

/* 暗色主题 */
.dark-theme .nextchat-style {
    background: #1f1f1f;
    border-color: #333;
}

.dark-theme .nextchat-container {
    border-color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dark-theme .nextchat-header {
    background: #2d2d2d;
    border-color: #333;
    color: #e0e0e0;
}

.dark-theme .nextchat-controls .control-btn {
    background: #3d3d3d;
    color: #ccc;
}

.dark-theme .nextchat-controls .control-btn:hover {
    background: #4d4d4d;
    color: #fff;
}

.dark-theme .nextchat-messages {
    background: #1f1f1f;
}

.dark-theme .nextchat-messages::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.dark-theme .nextchat-messages::-webkit-scrollbar-thumb {
    background: #4d4d4d;
}

.dark-theme .ai-message .nextchat-message-content {
    background: #2d2d2d;
    border-color: #333;
    color: #e0e0e0;
}

.dark-theme .user-message .nextchat-message-content {
    background: #3a3d4d;
    border-color: #444;
    color: #e0e0e0;
}

.dark-theme .nextchat-input-area {
    background: #2d2d2d;
    border-color: #333;
}

.dark-theme .nextchat-textarea {
    background: #3d3d3d;
    border-color: #444;
    color: #e0e0e0;
}

.dark-theme .nextchat-textarea:focus {
    border-color: var(--healing-primary);
}

.dark-theme .action-btn {
    background: #3d3d3d;
    border-color: #444;
    color: #ccc;
}

.dark-theme .action-btn:hover {
    background: #4d4d4d;
    color: #fff;
}

.dark-theme .nextchat-select,
.dark-theme .small-btn {
    background: #3d3d3d;
    border-color: #444;
    color: #e0e0e0;
}

.dark-theme .small-btn:hover {
    background: #4d4d4d;
}