/* ============================================================
   在线工具集 · 图片灰度处理
   ============================================================ */

.grayscale-page {
  background:
    radial-gradient(1050px 620px at 10% -6%, rgba(100, 116, 139, 0.12), transparent 62%),
    radial-gradient(900px 560px at 100% 8%, rgba(139, 92, 246, 0.1), transparent 60%),
    linear-gradient(160deg, #fbfbfc 0%, #f5f7fb 48%, #fbfcff 100%);
}

.grayscale-page .tool-aura-1 {
  background: radial-gradient(circle, rgba(100, 116, 139, 0.2), transparent 68%);
}

.grayscale-page .tools-hero h1 .gradient-text {
  background: linear-gradient(120deg, #94a3b8 0%, #64748b 52%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.grayscale-page .trust-row .icon { color: #64748b; }

.grayscale-page .image-upload-icon {
  color: #475569;
  background: linear-gradient(145deg, #f1f5f9, #eef2ff);
  border-color: rgba(71, 85, 105, 0.15);
  box-shadow: 0 12px 30px rgba(51, 65, 85, 0.1);
}

.grayscale-page .upload-pdf-tag.image-tag {
  background: linear-gradient(135deg, #64748b, #334155);
  box-shadow: 0 4px 10px rgba(51, 65, 85, 0.25);
}

.grayscale-page .image-file-emblem {
  color: #475569;
  background: linear-gradient(160deg, #f1f5f9, #e2e8f0);
  border-color: rgba(71, 85, 105, 0.15);
}

/* 尺寸信息 */
.gray-size-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(33, 40, 65, 0.07);
}

.gray-size-info strong {
  font-size: 13px;
  color: #26324a;
  font-variant-numeric: tabular-nums;
}

.gray-size-info span {
  color: #98a1b3;
  font-size: 10.5px;
}

.strength-presets { margin-top: 9px; }

/* 预览面板 */
.gray-panel { overflow: hidden; }

.gray-head {
  padding: 22px 22px 15px;
  margin-bottom: 0;
  align-items: center;
}

.gray-stage {
  position: relative;
  height: 548px;
  margin: 0 16px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(148, 163, 184, 0.1), transparent 65%),
    linear-gradient(160deg, #0b0916 0%, #0e111f 55%, #081016 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.gray-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: #c8c3dc;
}

.gray-empty strong {
  font-size: 14.5px;
  font-weight: 600;
  color: #e7e3f7;
}

.gray-empty p {
  max-width: 320px;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #8c86a5;
}

.gray-editor {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gray-frame {
  position: relative;
  flex: 0 0 auto;
  line-height: 0;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e5e9f2 25%, transparent 25%),
    linear-gradient(-45deg, #e5e9f2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e9f2 75%),
    linear-gradient(-45deg, transparent 75%, #e5e9f2 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.gray-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1px;
}

.compare-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(10, 8, 22, 0.68);
  backdrop-filter: blur(10px);
  color: #d8d3ea;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.compare-btn:hover {
  background: rgba(30, 26, 52, 0.88);
  color: #fff;
}

.compare-btn .icon { width: 14px; height: 14px; }

.compare-btn[aria-pressed="true"] {
  color: #fff;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(91, 33, 182, 0.55);
}

.gray-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px 0;
}

.gray-strength-label {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f5f2ff;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.gray-panel .preview-actions { padding-top: 15px; }

/* 响应式 */
@media (max-width: 1240px) {
  .gray-stage { height: 520px; }
}

@media (max-width: 1024px) {
  .gray-stage { height: 520px; }
}

@media (max-width: 960px) {
  .gray-stage { height: 500px; }
}

@media (max-width: 768px) {
  .gray-stage { height: 440px; margin: 0 12px; padding: 20px; }
  .gray-head { padding: 18px 18px 13px; }
  .gray-toolbar { padding: 11px 16px 0; }
  .gray-panel .preview-actions { padding: 14px 16px 17px; }
}

@media (max-width: 520px) {
  .gray-stage { height: 370px; padding: 16px; }
  .compare-btn { top: 10px; right: 10px; }
}
