/* common.css - 赛博工具箱共用样式（全局统一+响应式适配） */
/* 防止所有页面因滚动条出现/消失导致的布局偏移 */
body {
    overflow-y: scroll;
	background-color: #f1f5f9;
}

/* 基础全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: #333;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

/* 返回首页按钮 */
.btn-outline-secondary {
    --bs-btn-color: #666;
    --bs-btn-border-color: #ddd;
    --bs-btn-hover-bg: #f2f3f5;
    --bs-btn-hover-border-color: #ccc;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 卡片容器样式（功能页主容器） */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
    background-color: #fff;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.card.p-5 {
    padding: 1.5rem !important;
}

/* 标题通用样式 */
h2, h3, h4, h5, h6 {
    color: #2d3748;
    font-weight: 600;
}

/* 标题左侧蓝色竖条样式类（全局统一） */
.title-with-bar {
    position: relative;
    padding-left: 12px;
    line-height: 1.2;
}

.title-with-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 1px;
    width: 5px;
    background-color: #1677ff;
    border-radius: 1px;
}

/* 表单元素公共样式 */
.form-label, .param-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
    outline: none;
}

.input-group {
    border-radius: 8px;
    overflow: hidden;
}

.input-group .form-control {
    border-right: none;
}

.input-group-text {
    border: 1px solid #e2e8f0;
    background-color: #f8f9fa;
    color: #666;
    font-size: 1rem;
}

/* 按钮公共样式 */
.btn {
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    --bs-btn-bg: #1677ff;
    --bs-btn-border-color: #1677ff;
    --bs-btn-hover-bg: #0f62d9;
    --bs-btn-hover-border-color: #0f62d9;
    --bs-btn-active-bg: #0a4baa;
    --bs-btn-active-border-color: #0a4baa;
    padding: 0.7rem 1.5rem;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.2);
}

.btn-lg.w-100 {
    padding: 0.7rem 1rem;
    font-size: 1.05rem;
}

/* 首页功能模块样式 */
.module-card-param {
    margin-bottom: 25px;
    border: 3px solid #1677ff;
    border-radius: 10px;
    padding: 25px;
    background-color: #fff;
    transition: all 0.2s ease;
    text-align: center;
}

.module-card-param:hover {
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.1);
    transform: translateY(-2px);
}

h5.card-title {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 1rem !important;
}

/* 参数项样式 */
.param-row {
    margin-bottom: 14px;
    border: 1px solid #b3bcc5;
    border-radius: 8px;
    padding: 12px;
    background-color: #fefefe;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.param-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #a0aec0;
}

/* 滑块+输入框组合样式 */
.scale-input-group {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
}

.scale-input {
    width: 120px !important;
    flex-shrink: 0 !important;
    text-align: center;
}

.form-range.flex-grow-1 {
    flex-grow: 1 !important;
    margin: 0 !important;
}

/* 美化滑动条 */
input[type="range"].form-range {
    --bs-form-range-thumb-bg: #1677ff;
    --bs-form-range-thumb-border-color: #fff;
    --bs-form-range-thumb-active-bg: #0f62d9;
    --bs-form-range-track-bg: #e2e8f0;
    --bs-form-range-track-height: 8px;
    height: 1.5rem;
}

input[type="range"].form-range::-webkit-slider-runnable-track {
    background-color: #e2e8f0;
    border-radius: 4px;
    height: 8px;
}

input[type="range"].form-range::-webkit-slider-thumb {
    background-color: #1677ff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    height: 22px;
    width: 22px;
    margin-top: -7px;
    transition: all 0.15s ease;
}

input[type="range"].form-range::-webkit-slider-thumb:hover {
    background-color: #0f62d9;
    transform: scale(1.1);
}

input[type="range"].form-range::-moz-range-track {
    background-color: #e2e8f0;
    border-radius: 4px;
    height: 8px;
}

input[type="range"].form-range::-moz-range-thumb {
    background-color: #1677ff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    height: 22px;
    width: 22px;
    transition: all 0.15s ease;
}

input[type="range"].form-range::-moz-range-thumb:hover {
    background-color: #0f62d9;
    transform: scale(1.1);
}

input[type="range"].form-range:focus {
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.2);
    outline: none;
}

/* 提示文本样式 */
.form-text {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 4px;
    line-height: 1.3;
}

/* 警告/说明框样式 */
.alert {
    border: 1px solid #e8f4f8;
    background-color: #f0f8fb;
    border-radius: 8px;
    padding: 1rem;
}

.alert-info {
    --bs-alert-color: #333;
    --bs-alert-bg: #f0f8fb;
    --bs-alert-border-color: #e8f4f8;
}

/* 文件大小限制提示样式（全局公共） */
.file-limit-toast {
    position: fixed;
    /* 核心修改：从顶部调整为屏幕中央 */
    top: 50%; /* 垂直居中 */
    left: 50%; /* 水平居中 */
    transform: translate(-50%, -50%); /* 精准居中（抵消自身宽高的一半） */
    background-color: #fff7e6; /* 柔和浅橙色背景 */
    color: #e67700; /* 深橙色文字，不刺眼 */
    padding: 12px 24px; /* 适当加大内边距，更醒目 */
    border-radius: 8px;
    z-index: 1000; /* 确保在最上层 */
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* 加深阴影，突出提示 */
    border: 1px solid #ffe08a; /* 浅橙色边框 */
    min-width: 280px; /* 最小宽度，避免文字换行太碎 */
    max-width: 90%; /* 最大宽度，适配小屏幕 */
    text-align: center; /* 文字居中 */
}


.file-limit-toast i {
    color: #e67700; /* 图标颜色与文字一致 */
    font-size: 16px;
}

/* 统一预览框样式（整合所有工具页预览功能） */
.unified-preview-container {
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    margin: 15px 0;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-preview-container.has-image {
    cursor: default;
}

.unified-preview-container:hover {
    border-color: #1677ff;
    background-color: #f0f7ff;
}

.unified-preview-container:active {
    background-color: #e6f4ff;
}

.unified-preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: none;
    transition: opacity 0.2s ease;
}

.unified-preview-tip {
    display: flex;
    flex-direction: column; /* 强制垂直排列（三行） */
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    font-size: 1rem; /* 电脑端字体大小 */
    gap: 10px; /* 行与行之间的间距 */
    width: 100%;
}

/* 子元素独立样式 */
.unified-preview-tip span {
    color: #1677ff;
    font-weight: 500;
    white-space: nowrap; /* 防止文字换行 */
}

.unified-preview-tip i {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 0; /* 移除多余间距 */
}

/* 预览框控制按钮（取消+切换显示） */
/* 通用按钮基础样式 */
.unified-cancel-btn,
.unified-toggle-btn {
    position: absolute;
    background: #ffffffee;             /* 半透明白背景 */
    color: #333;                       /* 深灰图标 */
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgb(0 0 0 / 12%);  /* 柔和阴影 */
    z-index: 10;
}

/* hover */
.unified-cancel-btn:hover,
.unified-toggle-btn:hover {
    background: #fff;
    transform: scale(1.12);
}

/* 可见 */
.unified-cancel-btn.visible,
.unified-toggle-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.unified-cancel-btn {
    top: 14px;
    right: 14px;
}

.unified-toggle-btn {
    bottom: 14px;
    right: 14px;
}


.unified-hidden-icon {
    color: #999;
    font-size: 60px;
    pointer-events: none;
    display: none;
}

/* 裁切预览样式 */
.unified-preview-container {
    position: relative;
    overflow: hidden;
}
.crop-mask {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 5;
    display: none; /* 默认隐藏 */
}
.crop-mask-top, .crop-mask-bottom {
    left: 0;
    right: 0;
}
.crop-mask-left, .crop-mask-right {
    top: 0;
    bottom: 0;
}
.crop-frame {
    position: absolute;
    border: 2px solid #1677ff;
    z-index: 6;
    display: none; /* 默认隐藏 */
    box-shadow: 0 0 0 9999px rgba(22, 119, 255, 0.2); /* 裁切区域高亮 */

}
/* 移动端适配 */
@media (max-width: 768px) {
    .crop-frame {
        border-width: 3px;
    }
    .crop-mask {
        background-color: rgba(0, 0, 0, 0.6);
    }
}

/* 加载状态样式 */
.unified-preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.unified-preview-loading.active {
    opacity: 1;
}

.unified-loading-icon {
    font-size: 24px;
    color: #666;
    animation: spin 1s linear infinite;
}

/* 全局共用等待提示样式（压缩/加水印等功能页共用） */
.compressing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 20px;
    backdrop-filter: blur(2px);
}

.compressing-spinner {
    font-size: 48px;
    color: #1677ff;
    animation: spin 1.5s linear infinite;
}

.compressing-text {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 500;
}

.compressing-subtext {
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    max-width: 80%;
}

/* 按钮加载状态（共用） */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 信息卡片公共样式（压缩/加水印/PDF共用） */
.info-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.info-card {
    flex: 1;
    min-width: 180px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.info-card h5 {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h5 i {
    color: #1677ff;
    font-size: 1rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
}

.info-value.compressed {
    color: #36b37e;
}

.info-note {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 5px;
}

.info-section {
    display: none;
}

/* 信息卡片计算中提示 */
.info-loading {
    display: none;
    align-items: center;
    gap: 10px;
    color: #1677ff;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.info-loading-icon {
    font-size: 20px;
    animation: spin 1s linear infinite;
}

.small-loading {
    font-size: 14px;
    margin-left: 6px;
    visibility: hidden;
    /* 明确动画属性，确保不被覆盖 */
    animation: spin 1s linear infinite forwards;
    animation-play-state: running; /* 强制动画运行 */
     color: #36b37e; /* 改为与“计算中”一致的绿色 */
    display: inline-block; /* 确保旋转中心正确 */
}

/* 添加额外的样式确保转圈指示器正确显示 */
.info-value {
	display: flex;
	align-items: center;
	gap: 8px;
}



/* 折叠按钮公共样式 */
.no-bold {
  font-weight: 400;
}

.collapse-btn {
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: space-between; /* 左右分布 */
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: white;
  transition: all 0.15s ease-in-out;
}

.collapse-btn:hover {
  background-color: #f8f9fa;
}

.collapse-btn h6 {
  margin: 0;
  display: flex;
  align-items: center; /* 垂直居中 */
  gap: 0.5rem;
}

.collapse-btn .bi-chevron-down {
  transition: transform 0.3s ease;
  margin-left: auto; /* 确保箭头在最右侧 */
}

.collapse-btn[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

/* 确保按钮内容完全垂直居中 */
.collapse-btn .btn-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}


/* 选中文件信息样式 */
.selected-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.file-icon {
    font-size: 24px;
    color: #e53e3e;
}

.file-name {
    flex: 1;
    font-size: 0.95rem;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 警告提示样式 */
.warning-alert {
    background-color: #fef7fb;
    border: 1px solid #fce7f3;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 15px;
    color: #c53030;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculation-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #e6f7ff;
    color: #1890ff;
    margin-left: 5px;
}

/* 移动端深度适配（768px以下） */
@media (max-width: 768px) {
    /* 基础布局调整 */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 22px !important;
        padding-right: 22px !important;
    }

    .title-with-bar {
        font-size: 1.5rem !important;
        padding-left: 15px !important;
        line-height: 1.4 !important;
    }

    .title-with-bar::before {
        width: 6px !important;
        top: 8px !important;
        bottom: 4px !important;
    }

    /* 卡片适配 */
    .card.p-5 {
        padding: 1rem !important;
    }

    /* 按钮触控优化 */
    .btn {
        min-height: 44px !important;
        min-width: 100px !important;
        font-size: 1rem !important;
        padding: 0.75rem 1.25rem !important;
    }

    .btn-lg.w-100 {
        min-height: 50px !important;
        font-size: 1.1rem !important;
    }

    .btn-outline-secondary {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    /* 首页模块适配 */
    .row.gap-4 {
        flex-direction: column !important;
        gap: 18px !important;
    }

    .col-md-3, .col-md-6 {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .module-card-param {
        padding: 25px !important;
        margin-bottom: 0 !important;
        border-radius: 12px !important;
    }

    h5.card-title {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.9rem !important;
        letter-spacing: 0.3px;
    }

    /* 参数项适配 */
    .param-row {
        padding: 15px !important;
        margin-bottom: 12px !important;
    }

    /* 表单元素适配 */
    .form-control, .scale-input {
        min-height: 44px !important;
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }

    .scale-input-group {
        gap: 10px !important;
    }

    .scale-input {
        width: 80px !important;
    }

    /* 滑块适配 */
    input[type="range"].form-range {
        --bs-form-range-track-height: 10px;
    }

    input[type="range"].form-range::-webkit-slider-thumb {
        height: 26px;
        width: 26px;
        margin-top: -8px;
    }

    input[type="range"].form-range::-moz-range-thumb {
        height: 26px;
        width: 26px;
    }

    /* 预览框适配 */
    .unified-preview-container {
        min-height: 180px !important;
        margin: 12px 0 !important;
        padding: 10px !important;
    }


    /* 控制按钮放大 */
    .unified-cancel-btn, .unified-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
	
	.unified-preview-container {
        min-height: 200px; /* 调整最小高度，避免内容挤压 */
    }

    .unified-preview-tip {
        font-size: 14px;
        gap: 8px; /* 移动端间距稍小但保持均匀 */
        padding: 10px 0; /* 增加上下内边距，确保居中 */
    }

    .unified-preview-tip i {
        margin: 0; /* 强制移除任何可能的偏移margin */
    }

    .unified-hidden-icon {
        font-size: 50px;
    }

    /* 信息卡片纵向排列 */
    .info-cards {
        flex-direction: column !important;
        gap: 10px;
        margin-bottom: 12px;
    }

    .info-card {
        min-width: 100%;
        padding: 12px;
    }

    /* 选中文件信息适配 */
    .selected-file-info {
        padding: 12px;
        gap: 10px;
        margin-bottom: 12px;
    }

    .file-name {
        font-size: 0.9rem;
    }

    /* 颜色选择模态框适配 */
    .color-modal {
        width: 95%;
        padding: 20px;
    }

    .color-picker-container {
        gap: 15px;
        margin-bottom: 20px;
    }

    .custom-color-picker {
        height: 150px;
    }

    .color-preview {
        width: 80px;
        height: 80px;
    }

    .modal-btn {
        padding: 10px 20px;
        font-size: 1rem;
        min-height: 44px;
    }

    /* 颜色按钮适配 */
    .color-btn {
        width: 80px;
        height: 48px;
    }

    #color_value {
        font-size: 0.85rem;
    }

    /* 文件限制提示移动端适配 */
    .file-limit-toast {
        padding: 12px 16px;
        font-size: 0.9rem;
        width: 90%;
        text-align: center;
    }
	
	/* 等待提示移动端适配 */
	.compressing-spinner {
		font-size: 40px;
	}

	.compressing-text {
		font-size: 1.1rem;
	}

	.compressing-subtext {
		font-size: 0.85rem;
		max-width: 90%;
	}
}

/* 使用码弹窗样式（全局共用） */
.code-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(2px);
}

.code-modal {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.code-modal-title {
    font-size: 1.2rem;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.code-input-group {
    margin-bottom: 20px;
}

.code-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 2px;
}

.code-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
    outline: none;
}

.code-modal-actions {
    display: flex;
    gap: 12px;
}

.code-modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-confirm-btn {
    background: #1677ff;
    color: white;
}

.code-confirm-btn:hover {
    background: #0f62d9;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.2);
}

.code-cancel-btn {
    background: #f0f0f0;
    color: #333;
}

.code-cancel-btn:hover {
    background: #e0e0e0;
}

.code-error-text {
    color: #e53e3e;
    font-size: 0.85rem;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 15px;
    height: 18px;
}

/* 增强使用码错误提示样式 */
.code-error-text {
    color: #e53e3e;
    font-size: 0.85rem;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 15px;
    height: 20px;
    line-height: 20px;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .code-modal {
        padding: 20px;
        max-width: 95%;
    }

    .code-modal-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .code-input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .code-modal-btn {
        padding: 10px;
        font-size: 0.95rem;
    }
}

/* 使用码获取方法样式（全局共用） */
.code-get-method {
  margin: 15px 0 20px;
}

.code-get-method-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: transparent;
  color: #1677ff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-get-method-btn:hover {
  background: #f0f7ff;
  border-color: #1677ff;
  color: #1677ff;
}

.code-get-method-content {
  display: none; /* 默认隐藏 */
  margin-top: 12px;
  padding: 15px;
  border: 1px solid #e8f4f8;
  border-radius: 8px;
  background: #f0f8fb;
  text-align: center;
}

.code-get-method-text {
  color: #2d3748;
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.8; /* 增加行高，换行后更舒展 */
}

.code-get-method-img {
  max-width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .code-get-method {
    margin: 15px 0 18px;
  }

  .code-get-method-btn {
    font-size: 0.9rem;
    padding: 9px;
  }

  .code-get-method-content {
    padding: 12px;
  }

  .code-get-method-text {
    font-size: 0.85rem;
  }

  .code-get-method-img {
    max-height: 180px;
  }
}


/* 复制按钮触觉反馈 */
.copy-code-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease !important;
}

.copy-code-btn:active {
    transform: scale(0.95);
}

/* 图片压缩页面特有样式 */
.page-image-compress #quality_input, 
.page-image-compress #scale_ratio_input {
    width: 120px !important;
}

@media (max-width: 768px) {
    .page-image-compress #quality_input, 
    .page-image-compress #scale_ratio_input {
        width: 80px !important;
    }
}

/* 图片加水印页面特有样式 */
.page-watermark .color-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-watermark .color-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.page-watermark .color-modal {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.page-watermark .color-modal-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    text-align: center;
}

.page-watermark .color-picker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.page-watermark .custom-color-picker {
    width: 100%;
    height: 180px;
    cursor: pointer;
}

.page-watermark .color-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-watermark .modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.page-watermark .modal-btn {
    padding: 8px 24px;
    border-radius: 4px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-watermark .modal-confirm {
    background: #1677ff;
    color: white;
}

.page-watermark .modal-confirm:hover {
    background: #0f62d9;
}

.page-watermark .modal-cancel {
    background: #f0f0f0;
    color: #333;
}

.page-watermark .modal-cancel:hover {
    background: #e0e0e0;
}

.page-watermark .color-btn {
    width: 100px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.page-watermark .param-value-hidden {
    display: none;
}

/* 移动端适配 - 颜色选择模态框 */
@media (max-width: 768px) {
    .page-watermark .color-modal {
        width: 95%;
        padding: 20px;
    }
    
    .page-watermark .color-picker-container {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .page-watermark .custom-color-picker {
        height: 150px;
    }
    
    .page-watermark .color-preview {
        width: 80px;
        height: 80px;
    }
    
    .page-watermark .modal-btn {
        padding: 10px 20px;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .page-watermark .color-btn {
        width: 80px;
        height: 48px;
    }
}

/* ===== PDF压缩页面特有样式 ===== */
.page-pdf-compress #selected-file-container {
    display: none;
}

.page-pdf-compress .code-error-text {
    color: #e53e3e;
    font-size: 0.85rem;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 15px;
    height: 20px;
    line-height: 20px;
    font-weight: 500;
}

/* ===== 图片裁切页面特有样式 ===== */
.page-image-crop .ratio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.page-image-crop .ratio-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.page-image-crop .ratio-btn.active {
    border-color: #1677ff;
    background-color: #e6f4ff;
    color: #1677ff;
}

.page-image-crop .custom-res-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.page-image-crop .custom-res-input {
    flex: 1;
}

/* 裁切预览容器 */
.page-image-crop .unified-preview-container {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    cursor: default;
}

/* 裁切遮罩层 */
.page-image-crop .crop-mask {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.page-image-crop .crop-mask-top, 
.page-image-crop .crop-mask-bottom {
    left: 0;
    right: 0;
    height: 0;
}

.page-image-crop .crop-mask-left, 
.page-image-crop .crop-mask-right {
    top: 0;
    bottom: 0;
    width: 0;
}

/* 裁切框 */
.page-image-crop .crop-frame {
    position: absolute;
    border: 2px solid #1677ff;
    z-index: 6;
    background-color: rgba(22, 119, 255, 0.05);
    box-shadow: 0 0 0 9999px rgba(22, 119, 255, 0.1);
    cursor: move;
    touch-action: none;
    user-select: none;
    box-sizing: border-box;
    display: none;
}

/* 缩放手柄 */
.page-image-crop .resize-handle {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 14px;
    height: 14px;
    background-color: #1677ff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 7;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* 拖拽状态 */
.page-image-crop .crop-frame.dragging {
    border-color: #0958d9;
    background-color: rgba(9, 88, 217, 0.08);
}

.page-image-crop .crop-frame.resizing {
    border-color: #0958d9;
}

.page-image-crop .resize-handle:active {
    background-color: #0958d9;
}

/* ===== 删除PDF页页面特有样式 ===== */
.page-pdf-delete-pages .page-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-pdf-delete-pages #pages_input {
    flex-grow: 1;
}

.page-pdf-delete-pages .pdf-thumb {
    position: relative;
    margin: 4px;
    transition: transform 0.15s;
}

.page-pdf-delete-pages .pdf-thumb img {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.page-pdf-delete-pages .pdf-thumb:hover {
    transform: scale(1.05);
}

.page-pdf-delete-pages .pdf-thumb.selected img {
    border: 4px solid #dc3545;
    opacity: 0.8;
}

.page-pdf-delete-pages .pdf-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

.page-pdf-delete-pages .pdf-preview-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1677ff;
    animation: spin 1s linear infinite;
}

.page-pdf-delete-pages #selected-file-container {
    display: none;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    /* 图片裁切移动端适配 */
    .page-image-crop .custom-res-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-image-crop .ratio-btn {
        min-width: 60px;
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .page-image-crop .crop-frame {
        border-width: 3px;
    }
    
    .page-image-crop .resize-handle {
        width: 18px;
        height: 18px;
        right: -8px;
        bottom: -8px;
    }
    
    .page-image-crop .crop-mask {
        background-color: rgba(0, 0, 0, 0.4);
    }
    
    /* 删除PDF页移动端适配 */
    .page-pdf-delete-pages .page-input-group {
        flex-direction: column;
        align-items: stretch;
    }
}


/* 删除PDF页面等待页面优化 */
/* 加载动画优化 */
.pdf-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: #6c757d;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* 缩略图尺寸优化 */
.pdf-thumb {
    width: 120px !important;
    margin-bottom: 10px;
}

.pdf-thumb img {
    width: 120px !important;
    height: 170px !important;
    object-fit: contain;
}

/* 信息卡片加载状态 */
#info-loading {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #0d6efd;
}

/* ===== 免费使用码按钮样式 ===== */
.sticky-free-code-btn {
	position: fixed;
	z-index: 9999;
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #1677ff 0%, #36a2ff 100%);
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(22, 119, 255, 0.3);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
	border: 2px solid rgba(255, 255, 255, 0.3);
}

/* 图标样式 */
.sticky-free-code-btn i {
	font-size: 1.5rem;
	transition: all 0.3s ease;
}

/* 桌面端位置 - 右侧中间 */
@media (min-width: 769px) {
	.sticky-free-code-btn {
		top: 50%;
		right: 20px;
		transform: translateY(-50%);
	}
	
	.sticky-free-code-btn:hover {
		transform: translateY(-50%) scale(1.1);
		box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
		background: linear-gradient(135deg, #0f62d9 0%, #2b8cff 100%);
	}
	
	.sticky-free-code-btn:hover i {
		transform: scale(1.2) rotate(15deg);
	}
	
	/* 桌面端工具提示 */
	.sticky-free-code-btn::after {
		content: attr(title);
		position: absolute;
		right: 70px;
		top: 50%;
		transform: translateY(-50%);
		background: rgba(0, 0, 0, 0.8);
		color: white;
		padding: 8px 12px;
		border-radius: 6px;
		font-size: 0.85rem;
		white-space: nowrap;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
		font-weight: normal;
	}

	.sticky-free-code-btn:hover::after {
		opacity: 1;
	}
}

/* 移动端位置 - 右侧中间 */
@media (max-width: 768px) {
	.sticky-free-code-btn {
		width: 55px;
		height: 55px;
		top: 50%;
		right: 15px;
		transform: translateY(-50%);
	}
	
	.sticky-free-code-btn i {
		font-size: 1.4rem;
	}
	
	.sticky-free-code-btn:active {
		transform: translateY(-50%) scale(0.95);
		box-shadow: 0 3px 10px rgba(22, 119, 255, 0.3);
	}
	
	/* 移动端不显示工具提示 */
	.sticky-free-code-btn::after {
		display: none;
	}
}

/* 按钮点击效果 */
.sticky-free-code-btn:active {
	transform: translateY(-50%) scale(0.95);
}

/* 滚动时的微妙变化 */
.sticky-free-code-btn.scrolled {
	box-shadow: 0 3px 12px rgba(22, 119, 255, 0.25);
}


/* ===== 合并PDF页面特有样式 ===== */
.file-counter {
	text-align: center;
	color: #718096;
	font-size: 0.9rem;
	margin-bottom: 15px;
}

.file-list-container {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
}

/* 缩略图和列表视图样式 */
.thumbnail-view, .list-view {
	min-height: 300px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 15px;
	background-color: #fff;
	flex: 1 1 0;
}

.thumbnail-view {
	margin-bottom: 10px;
}

#thumbnailView {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;  
	flex-direction: row;
	align-items: flex-start;
	justify-content: center; 
}

/* 缩略图卡片 */
.pdf-thumbnail {
	width: calc(33.333% - 20px);
	min-width: 120px;
	padding: 8px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	cursor: grab;
	transition: 0.3s;
	text-align: center;
	box-sizing: border-box;
	position: relative; /* 为顺序数字标签定位 */
}

 /* 添加顺序数字标签样式 */
.order-number {
	position: absolute;
	top: 5px;
	left: 5px;
	width: 20px;
	height: 20px;
	background-color: #1677ff;
	color: white;
	border-radius: 50%;
	font-size: 0.7rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

/* 列表视图中的数字标签 */
.list-order-number {
	display: inline-block;
	width: 20px;
	height: 20px;
	background-color: #1677ff;
	color: white;
	border-radius: 50%;
	font-size: 0.7rem;
	text-align: center;
	line-height: 20px;
	margin-right: 8px;
	font-weight: bold;
}

.list-view {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

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

.pdf-thumbnail.dragging {
	opacity: 0.5;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pdf-thumbnail img {
	width: 100%;
	height: 150px;
	object-fit: contain;
	border-radius: 4px;
	background-color: #f5f5f5;
	margin-bottom: 8px;
}

.pdf-thumbnail .pdf-name {
	font-size: 0.8rem;
	font-weight: 500;
	color: #2d3748;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 5px;
}

.pdf-thumbnail .pdf-details {
	font-size: 0.7rem;
	color: #718096;
}

.pdf-list-item {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	cursor: grab;
	transition: all 0.3s ease;
}

.pdf-list-item:hover {
	box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.pdf-list-item.dragging {
	opacity: 0.5;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pdf-list-item .drag-handle {
	color: #a0aec0;
	margin-right: 10px;
	font-size: 1.1rem;
}

.pdf-list-item .pdf-info {
	flex: 1;
	min-width: 0;
}

.pdf-list-item .pdf-name {
	font-weight: 500;
	color: #2d3748;
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pdf-list-item .pdf-details {
	font-size: 0.8rem;
	color: #718096;
}

.remove-btn {
	color: #e53e3e;
	background: none;
	border: none;
	font-size: 1.1rem;
	cursor: pointer;
	padding: 5px;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.remove-btn:hover {
	background-color: #fed7d7;
	transform: scale(1.1);
}

.empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #a0aec0;
}

.empty-state i {
	font-size: 48px;
	margin-bottom: 15px;
	opacity: 0.5;
}

.view-title {
	font-size: 0.95rem;
	font-weight: 500;
	color: #64748b; /* 稍浅颜色降低视觉权重 */
	margin-bottom: 12px;
	text-align: center;
	padding: 5px 0;
	background-color: #f8fafc;
	border-radius: 6px;
}

/* 移动端拖动视觉效果 */
.dragging-touch {
	opacity: 0.8;
	transform: scale(1.03);
	transition: transform 0.1s;
}

.drag-placeholder {
	background: rgba(0,0,0,0.05);
	border: 2px dashed #bbb;
	border-radius: 8px;
}

/* 移动端样式 */
@media (max-width: 768px) {
	.file-list-container {
		flex-direction: column;
		gap: 15px;
		height: auto; /* 移除固定高度 */
		min-height: auto;
	}

	.thumbnail-view, .list-view {
		min-height: auto; /* 移除最小高度 */
		height: auto; /* 高度自适应 */
		padding: 12px;
		flex: none; /* 移除弹性伸缩 */
		width: 100%; /* 确保宽度100% */
		overflow: visible; /* 确保内容不隐藏 */
	}

	/* 缩略图容器自适应 */
	#thumbnailView {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
	}

	/* 强制缩略图为两列 */
	.pdf-thumbnail {
		width: calc(50% - 10px) !important;
		max-width: calc(50% - 10px) !important;   /* ⭐ 防止被撑成 100% */
		flex: 0 0 calc(50% - 10px) !important;    /* ⭐ 防止 flex 自动伸展 */
	}

	/* 避免图片撑大卡片 */
	.pdf-thumbnail img,
	.pdf-thumbnail canvas {
		width: 100% !important;
		height: auto !important;
		max-width: 100% !important;
	}

	/* 列表视图自适应 */
	#listView {
		display: flex;
		flex-direction: column;
		gap: 8px;
		min-height: auto;
		height: auto;
	}

	.pdf-list-item {
		flex-shrink: 0; /* 防止列表项被压缩 */
	}

	/* 调整标题大小 */
	.view-title {
		font-size: 0.85rem;
		padding: 8px 0;
		margin-bottom: 8px;
	}

	/* 文件计数器调整 */
	.file-counter {
		font-size: 0.8rem;
		margin-bottom: 10px;
	}

	/* 调整顺序提示 */
	#orderHint {
		font-size: 1rem;
		margin-bottom: 10px;
		padding: 0 5px;
	}
	
	/* 调整卡片内边距，为更多内容留出空间 */
	.card.p-5 {
		padding: 20px !important; /* 减少内边距 */
	}
}
/* ===== 合并PDF页面特有样式结束 ===== */