/* Prompt Modal样式 - 点击显示完整Prompt详情 */

/* ==================== Modal弹窗 ==================== */
.prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.prompt-modal.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 遮罩层 */
.prompt-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

/* 内容容器 */
.prompt-modal__container {
    position: relative;
    display: flex;
    max-width: 1200px;
    width: 90%;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
    z-index: 1;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 左侧：图片/视频预览 */
.prompt-modal__media {
    flex: 0 0 60%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.prompt-modal__media img,
.prompt-modal__media video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.prompt-modal__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 217, 163, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 32px;
    color: white;
}

.prompt-modal__play-btn:hover {
    background: rgba(0, 217, 163, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 右侧：信息面板 */
.prompt-modal__sidebar {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    background: white;
    overflow-y: auto;
}

/* 关闭按钮 */
.prompt-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    z-index: 2;
    transition: all 0.2s ease;
}

.prompt-modal__close:hover {
    background: white;
    transform: rotate(90deg);
}

/* 信息区域 */
.prompt-modal__info {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

.prompt-modal__header {
    margin-bottom: 24px;
}

.prompt-modal__title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.prompt-modal__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.prompt-modal__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 6px;
}

.prompt-modal__meta-item svg {
    width: 16px;
    height: 16px;
}

/* Prompt区域 */
.prompt-modal__section {
    margin-bottom: 24px;
}

.prompt-modal__section-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-modal__prompt-text {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid #00D9A3;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 模型信息 */
.prompt-modal__model-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.prompt-modal__info-card {
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

.prompt-modal__info-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.prompt-modal__info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 操作按钮 */
.prompt-modal__actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 24px 32px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.prompt-modal__action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #666;
}

.prompt-modal__action-btn:hover {
    background: #00D9A3;
    color: white;
    border-color: #00D9A3;
    transform: translateY(-2px);
}

.prompt-modal__action-btn svg {
    width: 20px;
    height: 20px;
}

/* Hover预览 */
.idea-card__prompt-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    font-size: 13px;
    line-height: 1.5;
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.idea-card:hover .idea-card__prompt-preview {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .prompt-modal__container {
        flex-direction: column;
        width: 95%;
        max-height: 90vh;
    }

    .prompt-modal__media,
    .prompt-modal__sidebar {
        flex: 1 1 auto;
    }

    .prompt-modal__media {
        min-height: 300px;
    }

    .prompt-modal__actions {
        grid-template-columns: 1fr;
    }
}