/* 创作智能体页面样式 */

.agent-main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #f7f7f8;
}

.agent-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
}

/* 消息容器 */
.agent-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
}

.agent-messages-container::-webkit-scrollbar {
    width: 8px;
}

.agent-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.agent-messages-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.agent-messages-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 消息项 */
.agent-message {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.agent-message:hover {
    background-color: #fafafa;
}

.agent-message-user {
    background-color: #f9fafb;
}

.agent-message-assistant {
    background-color: #ffffff;
}

/* 头像 */
.agent-message-avatar {
    flex-shrink: 0;
}

.agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.agent-avatar-user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.agent-avatar-assistant {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 消息内容 */
.agent-message-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.agent-message-text {
    color: #374151;
    font-size: 15px;
    line-height: 1.75;
    word-wrap: break-word;
}

.agent-message-text p {
    margin: 0 0 12px 0;
}

.agent-message-text p:last-child {
    margin-bottom: 0;
}

.agent-message-text ul,
.agent-message-text ol {
    margin: 8px 0;
    padding-left: 24px;
}

.agent-message-text li {
    margin: 4px 0;
}

.agent-message-text code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e11d48;
}

.agent-message-text pre {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 12px 0;
}

.agent-message-text pre code {
    background: none;
    padding: 0;
    color: #374151;
}

/* 加载状态 */
.agent-message-loading {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.agent-message-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: agent-loading-dot 1.4s infinite ease-in-out;
}

.agent-message-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.agent-message-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes agent-loading-dot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 输入容器 */
.agent-input-container {
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 16px 24px;
    flex-shrink: 0;
}

.agent-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.agent-input-wrapper:focus-within {
    border-color: #fd6d2e;
    box-shadow: 0 0 0 3px rgba(253, 109, 46, 0.1);
}

.agent-input-textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 15px;
    line-height: 1.5;
    color: #374151;
    background: transparent;
    min-height: 24px;
    max-height: 200px;
    overflow-y: auto;
    font-family: inherit;
}

.agent-input-textarea::placeholder {
    color: #9ca3af;
}

.agent-input-textarea::-webkit-scrollbar {
    width: 6px;
}

.agent-input-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.agent-input-textarea::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.agent-send-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: #fd6d2e;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    padding: 0;
}

.agent-send-btn:hover:not(:disabled) {
    background: #fd7d3e;
    transform: scale(1.05);
}

.agent-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.agent-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.agent-input-hint {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .agent-message {
        padding: 16px;
    }

    .agent-input-container {
        padding: 12px 16px;
    }

    .agent-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

