/* 评论增强样式 */
.comment-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e9ecef;
}

.comment-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.comment-toolbar-btn:hover {
    background: #e9ecef;
    color: #333;
}

.comment-toolbar-btn.ai-btn {
    color: #667eea;
    margin-left: auto;
}

.comment-toolbar-btn.ai-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* 表情选择器 */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: none;
    z-index: 100;
    width: 280px;
}

.emoji-picker.show {
    display: block;
}

.emoji-picker-title {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
    font-weight: 500;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-item {
    font-size: 1.3rem;
    text-align: center;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.emoji-item:hover {
    background: #f0f0f0;
    transform: scale(1.2);
}

/* 图片预览 */
.comment-image-preview {
    position: relative;
    display: inline-block;
    margin: 8px 0;
}

.comment-image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.comment-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* 评论中的图片 */
.comment-content img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
}

/* AI生成弹窗 */
.ai-comment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ai-comment-modal.show {
    display: flex;
}

.ai-comment-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.ai-comment-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-comment-title i {
    color: #667eea;
}

.ai-comment-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    resize: vertical;
    min-height: 80px;
}

.ai-comment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ai-tag {
    padding: 4px 12px;
    background: #f0f2ff;
    color: #667eea;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-tag:hover {
    background: #667eea;
    color: white;
}

.ai-comment-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ai-btn-cancel {
    padding: 8px 20px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.ai-btn-generate {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.ai-btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI标记 */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.7rem;
    border-radius: 10px;
    margin-left: 8px;
}

/* 加载动画 */
.ai-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 评论textarea容器 */
.comment-form-wrapper {
    position: relative;
}

.comment-form-wrapper textarea {
    border-radius: 0 0 8px 8px;
    border-top: none;
}



/* 评论图片缩略图样式 */
.comment-content img {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    transition: transform 0.2s ease;
    margin-top: 8px;
    border: 1px solid #e9ecef;
}

.comment-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 回复里的图片小一点 */
.comment-replies .comment-content img {
    max-width: 120px;
    max-height: 120px;
}



/* 语音预览样式 */
.comment-voice-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.comment-voice-preview audio {
    flex: 1;
    max-width: 200px;
    height: 32px;
}

.comment-voice-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-voice-remove:hover {
    background: #e9ecef;
    color: #dc3545;
}

/* 录音状态指示器 */
.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 15px;
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    border-radius: 8px;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.recording-time {
    font-family: monospace;
    font-size: 14px;
    color: #dc3545;
    font-weight: bold;
    min-width: 50px;
}

.recording-text {
    font-size: 13px;
    color: #666;
    flex: 1;
}

.recording-stop-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.recording-stop-btn:hover {
    background: #c82333;
}

/* 语音按钮录音中状态 */
.comment-toolbar-btn.voice-btn.recording {
    color: #dc3545;
    background: #fff5f5;
}

/* 评论里的语音播放器 */
.comment-voice-player {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    max-width: 280px;
}

.comment-voice-player audio {
    flex: 1;
    height: 32px;
}

.comment-voice-player .voice-duration {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* 回复里的语音播放器小一点 */
.comment-replies .comment-voice-player {
    max-width: 200px;
}

