/* 博文转图片分享插件样式 */

/* 转换按钮容器 - 固定在右下角 */
.post2img-btn-container {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 999;
}

/* 转换按钮 */
.post2img-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.post2img-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.post2img-btn:active {
    transform: translateY(-1px);
}

.post2img-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 弹窗遮罩 */
.post2img-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.post2img-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 弹窗内容 */
.post2img-modal-content {
    background-color: #fefefe;
    margin: auto;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* 弹窗头部 */
.post2img-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post2img-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

/* 关闭按钮 */
.post2img-modal-close {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.post2img-modal-close:hover {
    color: #000;
}

/* 弹窗主体 */
.post2img-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* 图片预览区域 */
.post2img-preview-item {
    margin-bottom: 30px;
    text-align: center;
}

.post2img-preview-item:last-child {
    margin-bottom: 0;
}

.post2img-preview-item img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.post2img-preview-item img:hover {
    transform: scale(1.02);
}

.post2img-preview-item .image-number {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 14px;
}

/* 弹窗底部 */
.post2img-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* 下载按钮 */
.post2img-download-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.post2img-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.post2img-download-btn:active {
    transform: translateY(0);
}

/* 加载动画 */
.post2img-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post2img-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .post2img-btn svg {
        width: 16px;
        height: 16px;
    }

    .post2img-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .post2img-modal-header,
    .post2img-modal-body,
    .post2img-modal-footer {
        padding: 15px 20px;
    }

    .post2img-modal-header h3 {
        font-size: 18px;
    }

    .post2img-download-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 提示信息 */
.post2img-tip {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.post2img-error {
    text-align: center;
    padding: 20px;
    color: #f44336;
    font-size: 14px;
}

.post2img-success {
    text-align: center;
    padding: 20px;
    color: #4caf50;
    font-size: 14px;
}
