/* --- 定义动态发光动画 --- */
@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor;
    }
    50% {
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor;
    }
}

/* --- 自定义导航栏样式 --- */
.navbar-custom {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- 自定义品牌链接样式 (添加动态发光效果) --- */
.navbar-brand-custom {
    font-weight: bold;
    color: white !important; /* 确保文字颜色为白色 */
    animation: pulseGlow 2s infinite alternate; /* 应用动画 */
}

/* --- AI声明发光文本样式 (添加动态发光效果) --- */
.ai-glow-text {
    color: #6a11cb; /* 选择一个基础颜色 */
    animation: pulseGlow 2s infinite alternate; /* 应用动画 */
}

/* --- 页脚样式 --- */
footer {
    background-color: #343a40; /* 深色背景 */
    color: white; /* 白色文字 */
    padding: 1rem 0; /* 内边距 */
}

/* --- 页脚链接样式 --- */
footer a {
    color: #adb5bd; /* 灰色链接 */
    text-decoration: none; /* 去除下划线 */
}

footer a:hover {
    color: #ffffff; /* 悬停时白色 */
    text-decoration: underline; /* 悬停时添加下划线 */
}

/* --- 标签页内容卡片样式 --- */
.card {
    border: none; /* 去除卡片边框 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加卡片阴影 */
}

/* --- 文件输入框样式 --- */
.form-control[type="file"] {
    padding: 0.5rem 1rem; /* 调整内边距 */
}

/* --- 合并文件列表项样式 --- */
.merge-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
}

.merge-file-item:last-child {
    border-bottom: none;
}

/* --- 图片预览容器样式 --- */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100px; /* 固定预览图宽度 */
    height: 100px; /* 固定预览图高度 */
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例并填充容器 */
    border: 1px solid #ddd; /* 添加边框 */
    border-radius: 4px; /* 添加圆角 */
}

.remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #dc3545; /* 红色背景 */
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

/* --- 页码选项容器样式 --- */
.page-numbering-options {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

/* --- 状态消息样式 --- */
.status-message {
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- 缩略图项样式 --- */
.thumbnail-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin: 0.25rem;
    background-color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    width: calc(20% - 1rem); /* 每行大约5个 */
    min-width: 120px; /* 最小宽度 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thumbnail-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.thumbnail-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.thumbnail-item.drag-over {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.thumbnail-img-container {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

.thumbnail-img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.thumbnail-info {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

.thumbnail-actions {
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.rotation-display {
    font-size: 0.875rem;
    color: #6c757d;
}

/* --- 响应式调整 --- */
@media (max-width: 768px) {
    .thumbnail-item {
        width: calc(33.333% - 1rem); /* 在小屏幕上每行大约3个 */
    }
}

@media (max-width: 576px) {
    .thumbnail-item {
        width: calc(50% - 1rem); /* 在更小的屏幕上每行大约2个 */
    }
}