/* ==================== 基础 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
  color: #2d3748;
  min-height: 100vh;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ==================== 顶部导航 ==================== */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo .logo-link {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-right a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  cursor: pointer;
}
.nav-right a:hover { color: #fff; }

/* ==================== 主容器 ==================== */
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

/* ==================== 扫描区头部 ==================== */
.scanner-header { text-align: center; margin-bottom: 24px; }
.scanner-header h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.scanner-header p { color: #718096; font-size: 14px; margin-top: 6px; }
.scanner-privacy {
  color: #a0aec0; font-size: 12px; margin-top: 4px;
}

/* ==================== 扫描完成操作区 ==================== */
.result-section {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    margin-top: 24px;
    text-align: center;
}
.result-header {
    margin-bottom: 18px;
}
.result-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #48bb78;
    margin: 0;
}
.result-info {
    color: #718096;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: nowrap;
}
.btn-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-preview:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4); }
.btn-download-main {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-download-main:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(237, 137, 54, 0.4); }

/* ==================== 下载结果展示区 ==================== */
.download-result-section {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    margin-top: 24px;
}
.download-result-header {
    margin-bottom: 16px;
    text-align: center;
}
.download-result-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #48bb78;
    margin: 0 0 4px;
}
.download-result-hint {
    color: #e53e3e;
    font-size: 12px;
    display: block;
}
.download-result-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.download-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.download-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #4a5568;
    background: #f7f8fc;
    word-break: break-all;
}
.btn-copy-link {
    padding: 10px 18px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-copy-link:hover { background: #5a67d8; }
.btn-copy-link.copied { background: #48bb78; }
.download-btn-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-download-file {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.btn-download-file:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }

/* ==================== 预览弹窗 ==================== */
.preview-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.preview-modal.active { display: flex; }
.preview-modal-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
}
.preview-modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 92vw;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}
.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.preview-modal-header h3 {
    font-size: 16px;
    color: #2d3748;
    margin: 0;
}
.preview-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.preview-modal-close:hover { color: #2d3748; }
.preview-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.preview-modal-image {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    align-self: flex-start;
    max-width: 100%;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-modal-image img {
    max-width: 100%;
    display: block;
}
/* loading spinner */
.preview-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: preview-spin 0.8s linear infinite;
}
@keyframes preview-spin {
    to { transform: rotate(360deg); }
}
.preview-error-text {
    color: #a0aec0;
    font-size: 14px;
}
.preview-modal-watermark {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.preview-modal-watermark span {
    color: rgba(80,80,80,0.35);
    font-size: 28px;
    font-weight: 700;
    transform: rotate(-30deg);
    text-shadow: 0 0 2px rgba(255,255,255,0.6);
}

/* ==================== 处理中弹窗 ==================== */
.processing-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.processing-modal.active { display: flex; }
.processing-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.processing-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 32px 24px;
    text-align: center;
    z-index: 1;
    min-width: 200px;
}
.processing-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.processing-text {
    color: #4a5568;
    font-size: 14px;
    margin: 0;
}

/* ==================== 上传区 ==================== */
.drop-zone {
  background: #fff;
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: #667eea;
  background: #f8faff;
}
.drop-zone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.drop-zone-icon svg { width: 20px; height: 20px; }
.drop-zone-text { color: #4a5568; font-size: 14px; }
.drop-zone-sub { color: #a0aec0; font-size: 12px; margin-top: 4px; }

/* ==================== 微信复制链接弹窗 ==================== */
.copy-link-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 10001;
  display: flex; align-items: center; justify-content: center;
}
.copy-link-box {
  background: #fff; border-radius: 12px; padding: 24px;
  width: 90vw; max-width: 400px; text-align: center;
}
.copy-link-box h3 { margin: 0 0 8px; font-size: 17px; color: #2d3748; }
.copy-link-box p { margin: 0 0 16px; font-size: 14px; color: #718096; }
.copy-link-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.copy-link-input {
  flex: 1; padding: 8px 10px; border: 1px solid #e2e8f0;
  border-radius: 6px; font-size: 13px; color: #4a5568; background: #f7f8fc;
}
.btn-copy-link {
  padding: 8px 16px; background: #667eea; color: #fff;
  border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.btn-close-copy-link {
  padding: 8px 24px; background: #edf2f7; color: #4a5568;
  border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
}

/* ==================== 文件计数 ==================== */
.files-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 8px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  color: #4a5568;
}
.counter-number { color: #667eea; font-weight: 700; }
.btn-clear-all {
  background: none;
  border: 1px solid #e53e3e;
  color: #e53e3e;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.btn-clear-all:hover { background: #e53e3e; color: #fff; }

/* ==================== 文件列表 ==================== */
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-card {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  font-size: 13px;
}
.file-card.processing { border-color: #667eea; background: #f8faff; }
.file-card.done { border-color: #48bb78; }
.file-card.error { border-color: #e53e3e; background: #fff5f5; }
.file-card-number {
  width: 20px;
  height: 20px;
  background: #edf2f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #718096;
  flex-shrink: 0;
}
.file-card-preview {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #edf2f7;
  flex-shrink: 0;
}
.file-card-preview img { width: 100%; height: 100%; object-fit: cover; }
/* PC 端 hover 时放大预览 */
@media (hover: hover) {
  .file-card-preview img {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .file-card-preview:hover {
    overflow: visible;
    z-index: 100;
  }
  .file-card-preview:hover img {
    transform: scale(15);
    transform-origin: left top;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    object-fit: contain;
    background: #fff;
    position: relative;
    z-index: 100;
  }
}
.file-card-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-card-size { font-size: 11px; color: #a0aec0; flex-shrink: 0; }
.card-action-btn {
  background: #edf2f7;
  border: none;
  color: #4a5568;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 0;
  line-height: 1.4;
}
.card-action-btn:hover:not(:disabled) { background: #667eea; color: #fff; }
.card-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.file-card-delete {
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
}
.file-card-delete:hover:not(:disabled) { color: #e53e3e; }
.file-card-delete svg { width: 16px; height: 16px; }
.file-card-delete:disabled { opacity: 0.4; cursor: not-allowed; }
.file-card-status { font-size: 12px; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card-status.success { background: #c6f6d5; color: #22543d; }
.file-card-status.fail { background: #fed7d7; color: #742a2a; }
.file-card-status.processing { background: #bee3f8; color: #2a4365; }
.sortable-ghost { opacity: 0.4; }
.sortable-chosen { box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); }

/* ==================== 进度 ==================== */
.progress-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 8px;
}
.progress-percent { color: #667eea; font-weight: 700; }
.progress-bar {
  height: 8px;
  background: #edf2f7;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s;
}

/* ==================== 操作按钮 ==================== */
.action-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-scan {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
.btn-scan:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4); }


/* ==================== 功能介绍（SEO） ==================== */
.intro-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
}

/* 一句话定位 */
.intro-hero {
  text-align: center;
  margin-bottom: 32px;
}
.intro-hero h2 {
  font-size: 22px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 10px;
}
.intro-hero p {
  font-size: 15px;
  color: #718096;
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 核心卖点网格 */
.intro-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.highlight-item {
  background: #fff;
  border-radius: 12px;
  padding: 22px 16px;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all 0.2s;
}
.highlight-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.12);
  border-color: #667eea;
}
.highlight-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f3ff 0%, #e8ecf8 100%);
  border-radius: 12px;
}
.highlight-icon svg { width: 28px; height: 28px; }
.highlight-item strong {
  display: block;
  font-size: 15px;
  color: #2d3748;
  margin-bottom: 6px;
}
.highlight-item p {
  font-size: 13px;
  color: #718096;
  line-height: 1.6;
}

/* 描述段落 */
.intro-desc {
  margin-bottom: 32px;
}
.intro-desc h2,
.intro-steps h2,
.intro-scenes h2,
.intro-faq h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #edf2f7;
}
.intro-desc p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 10px;
}

/* 使用步骤 */
.intro-steps { margin-bottom: 32px; }
.steps-list {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 16px;
}
.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 16px 16px 16px 52px;
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 8px;
  top: 10px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 适用场景 */
.intro-scenes { margin-bottom: 32px; }
.scenes-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.scenes-list li {
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  border: 1px solid #e2e8f0;
}

/* 常见问题 */
.intro-faq { margin-bottom: 8px; }
.faq-list { padding: 0; }
.faq-list dt {
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 4px;
  margin-top: 14px;
  padding-left: 4px;
}
.faq-list dd {
  font-size: 13px;
  color: #718096;
  margin: 0 0 12px 0;
  padding-left: 4px;
  line-height: 1.7;
}
.faq-list dd + dt { margin-top: 18px; }

/* ==================== 工具网格（简化） ==================== */
.tools-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
}
.tools-section h2 {
  text-align: center;
  font-size: 20px;
  color: #2d3748;
  margin-bottom: 20px;
}
.tools-grid-simple {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.tool-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 12px;
  padding: 18px 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  text-align: center;
}
.tool-simple:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}
.tool-simple .tool-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-simple .tool-icon svg { width: 32px; height: 32px; }
.tool-simple .tool-name {
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
}
.tool-simple .tool-btn {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 14px;
  font-size: 12px;
  margin-top: 2px;
}

/* ==================== SEO / 页脚 ==================== */
.seo-section { max-width: 1100px; margin: 30px auto; padding: 0 20px; }
.seo-text { color: #718096; font-size: 13px; text-align: center; }
.footer {
  background: #2d3748;
  color: #cbd5e0;
  padding: 24px 0;
  margin-top: 40px;
}
.footer .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.friend-links { display: flex; gap: 14px; flex-wrap: wrap; }
.friend-links a { color: #cbd5e0; font-size: 13px; }
.friend-links a:hover { color: #fff; }
.contact-link { color: #cbd5e0; cursor: pointer; font-size: 13px; }

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.toast-error { background: #e53e3e; }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .intro-highlights { grid-template-columns: repeat(2, 1fr); }
  .steps-list { grid-template-columns: 1fr; }
  .scenes-list { grid-template-columns: 1fr; }
  .scanner-header h1 { font-size: 24px; }
  .nav-logo .logo-link { font-size: 16px; }
}
@media (max-width: 600px) {
  .nav-logo .logo-link { font-size: 14px; }
  .nav-container { padding: 0 12px; }
  .nav-right { gap: 10px; }
  .nav-right a { font-size: 12px; }
  .intro-hero h2 { font-size: 18px; }
  .intro-hero p { font-size: 14px; }
  .intro-highlights { grid-template-columns: 1fr 1fr; gap: 10px; }
  .highlight-item { padding: 14px 10px; }
  .highlight-icon { width: 36px; height: 36px; }
  .highlight-icon svg { width: 22px; height: 22px; }
  .highlight-item strong { font-size: 13px; }
  .highlight-item p { font-size: 12px; }
  .scenes-list { grid-template-columns: 1fr; }
  .scanner-header h1 { font-size: 22px; }
  .tools-grid-simple { grid-template-columns: repeat(2, 1fr); }
  .action-bar {
    position: sticky;
    bottom: 0;
    background: #f7f8fc;
    padding: 10px 0;
    z-index: 10;
  }
  .action-bar .btn { width: 100%; justify-content: center; }
  /* 裁剪弹窗移动端适配 */
  .crop_header { flex-wrap: wrap; padding: 10px 12px; }
  .crop_header_actions {
    width: 100%; margin-top: 8px; justify-content: flex-end;
  }
  .crop_apply_all_label { white-space: normal; font-size: 12px; padding: 5px 8px; }
  .crop_btn { font-size: 12px; padding: 6px 12px; }
  .crop_title { font-size: 14px; }
}

/* 超小屏裁剪弹窗适配 */
@media (max-width: 400px) {
  .crop_header_actions {
    justify-content: space-between; gap: 6px;
  }
  .crop_apply_all_label {
    width: 100%; justify-content: center; margin-bottom: 4px; order: -1;
  }
  .crop_btn_confirm { order: 0; flex: 1; }
  .crop_btn_reset { order: 0; flex: 1; }
  .crop_btn_icon { order: 0; }
}

/* ==================== 裁剪弹窗 ==================== */
.crop_overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); z-index: 10000;
  align-items: center; justify-content: center; overflow: hidden;
}
.crop_overlay.active { display: flex; }
.crop_box {
  position: relative; width: 92vw; max-width: 900px; max-height: 92vh;
  background: #1a1a2e; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden;
}
.crop_close {
  background: none; border: none; color: rgba(255,255,255,0.6); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 4px; margin-left: 6px;
}
.crop_close:hover { color: #e53e3e; }
.crop_header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: #16213e; flex-shrink: 0;
}
.crop_title { color: #e2e8f0; font-size: 16px; font-weight: 600; }
.crop_header_actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crop_btn {
  padding: 7px 18px; border: none; border-radius: 6px; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.crop_btn:hover { opacity: 0.85; }
.crop_btn_reset { background: rgba(255,255,255,0.15); color: #e2e8f0; }
.crop_btn_confirm { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.crop_btn_icon {
  background: rgba(255,255,255,0.12); color: #e2e8f0;
  padding: 7px 10px; display: flex; align-items: center; justify-content: center;
}
.crop_btn_icon svg { width: 18px; height: 18px; }
.crop_btn_icon:hover { background: rgba(255,255,255,0.25); }
.crop_apply_all_label {
  display: flex; align-items: center; gap: 5px; padding: 7px 12px;
  color: #cbd5e0; font-size: 13px; cursor: pointer; white-space: nowrap;
  background: rgba(255,255,255,0.08); border-radius: 6px;
}
.crop_apply_all_label input[type="checkbox"] { cursor: pointer; }
.crop_body { flex: 1; display: flex; align-items: flex-start; justify-content: center; overflow: hidden; }
.crop_body img { display: block; }

/* 列表卡片中的裁剪按钮 & 已裁剪标签 */
.btn-crop { flex-shrink: 0; }
.file-card-cropped-tag {
  background: #48bb78; color: #fff; font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}

/* 图片加载中提示 */
.file-loading-tip {
  text-align: center; padding: 50px 20px; color: #f6ad55;
  font-size: 16px; font-weight: 600;
}
.file-loading-tip::before {
  content: ''; display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #667eea; border-radius: 50%;
  margin-right: 10px; vertical-align: middle;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 裁剪批量处理遮罩 */
.crop_processing_mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 10001;
  display: flex; align-items: center; justify-content: center;
}
.crop_processing_box {
  text-align: center; color: #f6ad55; font-size: 16px; font-weight: 600;
}
.crop_processing_spinner {
  width: 36px; height: 36px; margin: 0 auto 16px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #667eea; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
