/* AI对话模块样式 */

.shadow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1;
    pointer-events: none;
}

.aichat-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
}

.aichat-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.aichat-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

.chat-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    gap: 20px;
}

.robot-image {
    width: auto;
    height: auto;
    flex-shrink: 0;
    margin-left: 40px;
}

.chat-header h3 {
    margin: 0;
    width: 320px;
    height: 45px;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 32px;
    line-height: 45px;
    text-align: center;
    font-style: normal;
    text-transform: none;
    background: linear-gradient(0deg, #0EEB77 2%, #38C7FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 0;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-style: italic;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message.ai {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    min-width: 60px;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.message-content.image-message {
    max-width: 90%;
    padding: 15px;
}

.message-time {
    position: absolute;
    top: -22px;
    left: 0px;
    font-size: 12px;
    color: #999;
    background: transparent;
    padding: 2px 5px;
    border-radius: 3px;
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.message-sender {
    font-weight: 600;
    color: #333;
}

.time-text {
    color: #666;
}

.message.user .message-time {
    left: auto;
    right: 0px;
}

.message.first-message {
    margin-top: 10px;
}

.message.user .message-content {
    background: #0FEA7A;
    border-radius: 10px 0px 10px 10px;
    color: #000000;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 18px;
    line-height: 25px;
    letter-spacing: 1px;
    text-align: left;
    font-style: normal;
    text-transform: none;
    padding: 12px 16px;
    white-space: pre-wrap;
    height: 30px;
}

.message.ai .message-content {
    min-height: 60px;
    background:white;
    border-radius: 0px 10px 10px 10px;
    color: #495057;
    border-left: none;
    white-space: pre-wrap;
}

.message-text-wrapper {
    position: relative;
    padding-bottom: 20px;
}

.message-text {
    margin-bottom: 5px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.message-image {
    margin-bottom: 10px;
    max-width: 100%;
    width: 100%;
}

.chat-image {
    width: 100%;
    max-width: 500px;
    min-width: 300px;
    height: auto;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-image:hover {
    transform: scale(1.02);
}

.ai-generated-label {
    position: absolute;
    right: 0;
    bottom: 0;
    font-family: PingFang SC, PingFang SC;
    font-weight: 700;
    font-size: 14px;
    color: #999999;
    line-height: 20px;
    text-align: right;
    font-style: normal;
    text-transform: none;
    white-space: nowrap;
    opacity: 0.8;
    padding-top: 5px;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: #999999;
    border-radius: 50%;
    animation: thinking-bounce 1.4s infinite ease-in-out;
}

.thinking-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0s;
}

.thinking-text {
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 18px;
    color: #999999;
    line-height: 25px;
    margin-left: 4px;
}

@keyframes thinking-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input {
    display: flex;
    gap: 10px;
}

.message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.message-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.message-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.send-button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    min-width: 60px;
}

.send-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.send-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.disclaimer-text {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: auto;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 14px;
    color: dimgrey;
    line-height: 20px;
    text-align: center;
    font-style: normal;
    text-transform: none;
    word-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-btn {
    position: absolute;
    bottom: 10px;
    right: 20px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #1A73E8, #0052D9);
    border: none;
    border-radius: 16px;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 82, 217, 0.3);
}

.report-btn:hover {
    background: linear-gradient(135deg, #0052D9, #003d9e);
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.4);
    transform: translateY(-1px);
}

.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.image-preview-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.image-preview-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.image-preview-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* 举报弹窗样式 */
.report-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.report-modal {
    width: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 35, 95, 0.25);
    padding: 0 0 24px;
    display: flex;
    flex-direction: column;
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #F0F0F0;
    font-size: 18px;
    font-weight: 500;
    color: #333333;
    position: relative;
}

.report-close {
    position: absolute;
    right: 18px;
    top: 10px;
    font-size: 20px;
    color: #999999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.report-close:hover {
    background: #F5F5F5;
    color: #666666;
}

.report-body {
    padding: 24px;
}

.report-row {
    margin-bottom: 20px;
}

.report-row label {
    display: block;
    font-size: 14px;
    color: #333333;
    margin-bottom: 8px;
}

.report-select {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #D8E1F0;
    padding: 0 14px;
    font-size: 14px;
    color: #333333;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.report-select:focus {
    border-color: #1A73E8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.report-select option {
    padding: 8px;
}

.report-textarea {
    width: 100%;
    min-height: 120px;
    border-radius: 8px;
    border: 1px solid #D8E1F0;
    padding: 12px 14px;
    font-size: 14px;
    color: #333333;
    outline: none;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

.report-textarea:focus {
    border-color: #1A73E8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.report-textarea::placeholder {
    color: #999999;
}

.report-submit-btn {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #1A73E8, #0052D9);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.3);
    transition: all 0.2s ease;
}

.report-submit-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 82, 217, 0.4);
    transform: translateY(-1px);
}

.report-submit-btn:active {
    transform: translateY(0);
}