/* ═══════════════════════════════════════════════
   WatermarkWipe — Stripe Design System
   去水印工具集合網站
   ═══════════════════════════════════════════════ */

/* ── CSS Variables (Design Tokens) ──────────── */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #F8FAFC;
  --color-bg-tint: #EEF2FF;
  --color-heading: #061b31;
  --color-body: #475569;
  --color-label: #1e293b;
  --color-heading: #0f172a;
  --color-primary: #533afd;
  --color-primary-hover: #4434d4;
  --color-primary-light: #b9b9f9;
  --color-primary-bg: rgba(83, 58, 253, 0.05);
  --color-accent: #6366f1;
  --color-border: #e5edf5;
  --color-border-purple: #b9b9f9;
  --color-dark-bg: #1c1e54;
  --color-dark-text: rgba(255, 255, 255, 0.85);
  --color-success: #15be53;
  --color-success-text: #108c3d;
  --color-success-bg: rgba(21, 190, 83, 0.2);
  --color-ruby: #ea2261;
  --color-magenta: #f96bee;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-nav-bg: rgba(255, 255, 255, 0.85);

  /* Shadows — Stripe signature */
  --shadow-card: rgba(50, 50, 93, 0.25) 0px 30px 45px -30px,
                rgba(0, 0, 0, 0.1) 0px 18px 36px -18px;
  --shadow-elevated: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,
                     rgba(0, 0, 0, 0.1) 0px 8px 16px -8px;
  --shadow-deep: rgba(3, 3, 39, 0.25) 0px 14px 21px -14px,
                 rgba(0, 0, 0, 0.1) 0px 8px 17px -8px;
  --shadow-ambient: rgba(23, 23, 23, 0.06) 0px 3px 6px;
  --shadow-soft: rgba(23, 23, 23, 0.08) 0px 15px 35px 0px;
  --shadow-focus: 0 0 0 3px rgba(83, 58, 253, 0.25);

  /* Border Radius — SaaS Modern (larger, softer) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;

  /* Spacing (8px grid) */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* Typography — Source Sans 3 via Google Fonts, with strong CJK fallback */
  --font-primary: 'Source Sans 3', 'Noto Sans SC', 'Noto Sans TC', 'PingFang SC', 'PingFang TC', 'Microsoft YaHei', 'Heiti SC', system-ui, -apple-system, sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Transitions */
  --transition: 150ms ease;
  --transition-slow: 300ms ease;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: #374151;
  background: var(--color-bg-soft);
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--color-primary-hover);
}

img, video {
  max-width: 100%;
  height: auto;
}

/* ── Typography ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: #0f172a;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.display-hero {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
}

.display-large {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #0f172a;
}

.section-heading {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: #1e293b;
}

.body-large {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.65;
  color: #475569;
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}
.nav-brand {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-heading);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-brand-icon {
  font-size: 1.5rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
  gap: 4px;
}
.nav-links a {
  font-size: 0.85rem;  /* shrink from 0.9 to 0.85 */
  font-weight: 500;
  color: #1e293b;
  padding: var(--sp-xs) var(--sp-xs);  /* tighter padding */
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--color-primary);
  background: var(--color-primary-bg);
}
.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-sm) var(--sp-md);
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-heading);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--sp-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
}

/* Nav anti-wrap: hide secondary links on mid-size screens */
@media (max-width: 1024px) {
  .nav-links li:nth-child(n+4) { display: none; }  /* hide blog/faq */
  .nav-cta-group { gap: var(--sp-sm); }
  .nav-inner { padding: var(--sp-sm) var(--sp-md); }
}
@media (max-width: 1100px) and (min-width: 769px) {
  .nav-links { gap: var(--sp-sm); }
  .nav-links a { font-size: 0.82rem; padding: 4px 4px; }
  .nav-brand { font-size: 1.1rem; }
  .nav-cta-group .btn-sm { padding: 6px 10px; font-size: 0.82rem; }
  .nav-upload-cta { padding: 6px 12px; font-size: 0.82rem; }
}

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 12px 22px;
  font-family: var(--font-primary);
  font-size: 0.938rem;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 44px;
}
.btn:hover {
  transform: translateY(-1px);
}

/* Primary Purple */
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-elevated);
}

/* Ghost / Outlined */
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border-purple);
}
.btn-ghost:hover {
  background: var(--color-primary-bg);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--color-heading);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* White (for dark backgrounds) */
.btn-white {
  background: #ffffff;
  color: var(--color-primary);
}
.btn-white:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.813rem;
  min-height: 36px;
}
.btn-lg {
  padding: 16px 32px;
  font-size: 1.063rem;
  min-height: 52px;
}
.btn-xl {
  padding: 18px 40px;
  font-size: 1.125rem;
  min-height: 56px;
  border-radius: var(--radius-lg);
}
.btn-block {
  width: 100%;
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  transition: all var(--transition-slow);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card:hover {
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.card-featured {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-ambient);
}

/* ── Badges ────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  line-height: 1.8;
}
.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid rgba(21, 190, 83, 0.4);
}
.badge-pro {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border: 1px solid var(--color-border-purple);
}
.badge-ultimate {
  background: linear-gradient(135deg, var(--color-primary), var(--color-magenta));
  color: #fff;
}

/* ── Inputs ────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  outline: none;
}
.input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.input::placeholder {
  color: var(--color-body);
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.input-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-label);
}

/* ── Layout ────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}
.section {
  padding: var(--sp-4xl) 0;
}
.section-dark {
  background: var(--color-dark-bg);
  color: rgba(255, 255, 255, 0.9);
}
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark .section-heading,
.section-dark .display-hero {
  color: #ffffff;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  html { font-size: 15px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .display-hero { font-size: 2rem; line-height: 1.25; }
  .display-large { font-size: 1.75rem; }
  .section-heading { font-size: 1.5rem; }
  .section { padding: var(--sp-3xl) 0; }
  .container { padding: 0 var(--sp-md); }
  .hero { padding: var(--sp-2xl) 0 var(--sp-xl); }
  .hero-stats { flex-wrap: wrap; gap: var(--sp-lg); }
  .hero-stat-value { font-size: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 280px; }
  .tool-workspace { grid-template-columns: 1fr; }
  .tool-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tool-tab { white-space: nowrap; flex-shrink: 0; }
  .pricing-card.featured { transform: none; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .payment-methods { flex-direction: column; }

  /* Touch targets */
  .btn, .nav-links a, .tool-tab, .faq-question {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .upload-zone { padding: var(--sp-xl) var(--sp-md); }
  .card { padding: var(--sp-md); }
  .pricing-card { padding: var(--sp-md); }

  /* Table scroll */
  .table-wrapper { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 400px) {
  .display-hero { font-size: 1.6rem; }
  .display-large { font-size: 1.4rem; }
  .section-heading { font-size: 1.3rem; }
  .nav-brand { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: var(--sp-md); }
}

/* Flex helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--sp-xs); }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }
.gap-xl { gap: var(--sp-xl); }

/* ── Hero Section ──────────────────────────── */
.hero {
  padding: var(--sp-4xl) 0 var(--sp-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(83, 58, 253, 0.06) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 80% 80%,
    rgba(249, 107, 238, 0.04) 0%,
    transparent 50%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}
.hero-title {
  margin-bottom: var(--sp-lg);
  white-space: nowrap;
}
.hero-subtitle {
  margin-bottom: var(--sp-xl);
  font-size: 1.2rem;
  color: #475569;
  font-weight: 400;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: var(--sp-3xl);
  justify-content: center;
  margin-top: var(--sp-3xl);
  padding-top: var(--sp-2xl);
  border-top: 1px solid var(--color-border);
}
.hero-stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.hero-stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  margin-top: var(--sp-xs);
}

/* ── Tool Cards ────────────────────────────── */
.tool-card {
  cursor: pointer;
  text-align: center;
  padding: var(--sp-xl);
  color: #374151;
  font-weight: 400;
}
.tool-card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-md);
  display: block;
}
.tool-card .card-title {
  margin-bottom: var(--sp-sm);
}

/* ── Pricing Cards ─────────────────────────── */
.pricing-card {
  text-align: center;
  padding: var(--sp-xl);
  position: relative;
}
.pricing-card.featured {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: var(--shadow-elevated);
  transform: scale(1.03);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
}
.pricing-name {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-heading);
  margin-bottom: var(--sp-md);
}
.pricing-price {
  margin-bottom: var(--sp-lg);
}
.pricing-amount {
  font-size: 3rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.pricing-currency {
  font-size: 1.25rem;
  font-weight: 500;
  color: #64748b;
}
.pricing-period {
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  margin-top: var(--sp-xs);
}
.pricing-features {
  list-style: none;
  margin-bottom: var(--sp-xl);
  text-align: left;
}
.pricing-features li {
  padding: var(--sp-sm) 0;
  font-size: 0.95rem;
  color: #475569;
  font-weight: 400;
  border-bottom: 1px solid var(--color-border);
}
.pricing-features li:last-child {
  border-bottom: none;
}
.pricing-features li::before {
  content: '✓ ';
  color: var(--color-success);
  font-weight: 500;
}

/* ── Upload Zone ───────────────────────────── */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3xl);
  text-align: center;
  transition: all var(--transition-slow);
  cursor: pointer;
  background: #fafbfc;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}
.upload-zone-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-md);
  color: var(--color-primary);
}
.upload-zone-title {
  font-size: 1.2rem;
  color: #1e293b;
  margin-bottom: var(--sp-sm);
  font-weight: 600;
}
.upload-zone-hint {
  font-size: 0.9rem;
  font-weight: 400;
  color: #64748b;
}

/* ── Tool Interface ────────────────────────── */
.tool-workspace {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
@media (max-width: 900px) {
  .tool-workspace {
    grid-template-columns: 1fr;
  }
}
.tool-main {
  min-height: 400px;
}
.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.tool-preview {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #f8f9fa;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-preview img,
.tool-preview video,
.tool-preview canvas {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

/* Canvas watermark selection overlay */
.watermark-overlay {
  position: absolute;
  border: 2px dashed var(--color-ruby);
  background: rgba(234, 34, 97, 0.12);
  pointer-events: none;
  border-radius: 2px;
}

/* ── Toast / Notifications ─────────────────── */
.toast {
  position: fixed;
  bottom: var(--sp-lg);
  right: var(--sp-lg);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--color-dark-bg);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  box-shadow: var(--shadow-deep);
  z-index: 1000;
  animation: slideIn 0.3s ease;
  max-width: 360px;
}
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-error); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info { border-left: 3px solid var(--color-primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Footer ────────────────────────────────── */
.footer {
  background: var(--color-dark-bg);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--sp-3xl) 0 var(--sp-lg);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--sp-md);
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  display: block;
  padding: 2px 0;
}
.footer a:hover {
  color: #ffffff;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--sp-lg);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

/* ── Payment Page ──────────────────────────── */
.payment-methods {
  display: flex;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.payment-method {
  flex: 1;
  padding: var(--sp-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.payment-method:hover,
.payment-method.active {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}
.payment-method-icon {
  font-size: 1.5rem;
  margin-bottom: var(--sp-sm);
}
.qr-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-xl);
}
.qr-code img {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* ── Ad Container ──────────────────────────── */
.ad-container {
  background: #f8f9fb;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  text-align: center;
  margin: var(--sp-lg) 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}
.ad-container::before {
  content: 'Advertisement';
  color: var(--color-body);
  font-size: 0.625rem;
  position: absolute;
  top: 2px;
  left: 8px;
}

/* ── Form ──────────────────────────────────── */
.form-card {
  max-width: 440px;
  margin: 0 auto;
  padding: var(--sp-xl);
}
.form-title {
  margin-bottom: var(--sp-lg);
  text-align: center;
}
.form-group {
  margin-bottom: var(--sp-md);
}
.form-footer {
  text-align: center;
  margin-top: var(--sp-lg);
  font-size: 0.875rem;
}

/* ── Table ─────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead {
  background: #fafbfc;
}
th {
  text-align: left;
  padding: var(--sp-sm) var(--sp-md);
  font-weight: 500;
  color: var(--color-label);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: var(--sp-sm) var(--sp-md);
  border-top: 1px solid var(--color-border);
  color: var(--color-body);
}

/* ── Loading Spinner ───────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ─────────────────────────────── */
.hidden { display: none !important; }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }
.p-sm { padding: var(--sp-sm); }
.p-md { padding: var(--sp-md); }
.p-lg { padding: var(--sp-lg); }
.p-xl { padding: var(--sp-xl); }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ── Result / Download section ─────────────── */
.result-section {
  margin-top: var(--sp-lg);
}
.result-preview {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.result-preview img,
.result-preview video {
  display: block;
  width: 100%;
}
.result-actions {
  display: flex;
  gap: var(--sp-md);
  margin-top: var(--sp-md);
  flex-wrap: wrap;
}
.result-actions .btn { font-size: 1rem; }

/* ── Blog ──────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-slow);
}
.blog-card:hover {
  box-shadow: var(--shadow-card);
}
.blog-card-body {
  padding: var(--sp-md);
}
.blog-card-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: var(--sp-xs);
}

/* ── Progress Bar ──────────────────────────── */
.progress {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
  animation: progressStripes 1.5s linear infinite;
  background-size: 20px 20px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
}
@keyframes progressStripes {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}

/* ── Tool Tabs ─────────────────────────────── */
.tool-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--sp-lg);
  gap: var(--sp-xs);
}
.tool-tab {
  padding: var(--sp-sm) var(--sp-md);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-body);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.tool-tab:hover {
  color: var(--color-heading);
}
.tool-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ── FAQ ───────────────────────────────────── */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-md);
  overflow: hidden;
}
.faq-question {
  padding: var(--sp-md) var(--sp-lg);
  font-weight: 400;
  color: var(--color-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-primary);
  font-size: 1rem;
}
.faq-question:hover {
  background: #fafbfc;
}
.faq-answer {
  padding: 0 var(--sp-lg) var(--sp-md);
  font-size: 0.938rem;
  line-height: 1.6;
  display: none;
}
.faq-item.open .faq-answer {
  display: block;
}
.faq-icon {
  transition: transform var(--transition);
  font-size: 0.75rem;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* ── Language Switcher ──────────────────────── */
.lang-switcher {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-family: var(--font-primary);
  font-size: 0.813rem;
  font-weight: 400;
  color: var(--color-heading);
  background: #f8f9fb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.lang-btn:hover {
  border-color: var(--color-primary);
}
.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  z-index: 200;
  min-width: 160px;
  overflow: hidden;
}
.lang-dropdown.show {
  display: block;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--color-heading);
  text-decoration: none;
  transition: background var(--transition);
}
.lang-option:hover {
  background: var(--color-primary-bg);
}
.lang-option.active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 500;
}

/* ── Mobile Fixed CTA Bar ───────────────────── */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  padding: 10px var(--sp-md);
  z-index: 150;
  gap: var(--sp-sm);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.mobile-cta-bar .btn {
  flex: 1;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .mobile-cta-bar {
    display: flex;
  }
  body {
    padding-bottom: 80px;
  }
}

/* ── Cookie Consent Banner ─────────────────── */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--color-dark-bg);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--sp-md) var(--sp-lg);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease;
}
.cookie-consent-content {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}
.cookie-consent-text {
  flex: 1;
  min-width: 240px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.cookie-consent-text strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 0.9rem;
}
.cookie-consent-text a {
  color: var(--color-primary-light);
  text-decoration: underline;
}
.cookie-consent-actions {
  display: flex;
  gap: var(--sp-sm);
  flex-shrink: 0;
}
.cookie-consent-actions .btn-ghost {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.2);
}
.cookie-consent-actions .btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ── Upgrade Modal ─────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  padding: var(--sp-2xl);
  position: relative;
  box-shadow: var(--shadow-deep);
  animation: scaleIn 0.25s ease;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-body);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}
.modal-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-md);
}
.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: var(--sp-sm);
}
.modal-subtitle {
  font-size: 0.95rem;
  color: var(--color-body);
  margin-bottom: var(--sp-lg);
}
.modal-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--sp-lg);
}
.modal-features li {
  padding: var(--sp-sm) 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--color-heading);
}
.modal-features li::before {
  content: '✨';
  font-size: 1rem;
}
.modal-cta {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}
.modal-secondary {
  display: block;
  margin-top: var(--sp-md);
  font-size: 0.85rem;
  color: var(--color-body);
  cursor: pointer;
  text-decoration: none;
}
.modal-secondary:hover {
  color: var(--color-primary);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Before/After Slider ────────────────── */
.comparison-slider {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: var(--sp-lg) auto;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: ew-resize;
}
.comparison-slider img {
  display: block;
  width: 100%;
  height: auto;
}
.comparison-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}
.comparison-slider input[type=range] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}
.comparison-handle {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--color-primary);
}
.comparison-handle::after {
  content: '⇔';
  font-weight: 700;
}
.comparison-label {
  position: absolute;
  top: var(--sp-sm);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 3;
  pointer-events: none;
}
.comparison-label-before {
  left: var(--sp-sm);
  background: rgba(0,0,0,0.6);
  color: #fff;
}
.comparison-label-after {
  right: var(--sp-sm);
  background: var(--color-primary);
  color: #fff;
}

/* ── Multi-Region Badges ─────────────────── */
.region-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin: var(--sp-sm) 0;
}
.region-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
}
.region-badge:hover {
  opacity: 0.85;
}
.region-badge-remove {
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0.7;
  padding: 0 2px;
}
.region-badge-remove:hover {
  opacity: 1;
}

/* ── Watermark Notice (Free版水印提示) ──── */
.watermark-notice {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: #fef3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #856404;
  margin-top: var(--sp-sm);
}
.watermark-notice a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Auto Detect Button Animation ────────── */
.btn-detect {
  width: 100%;
  position: relative;
}
.btn-detect .spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  margin-right: var(--sp-xs);
}

/* ── Premium Banner (内嵌升级提示) ──────── */
.premium-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-magenta));
  color: #fff;
  border-radius: var(--radius-md);
  margin-top: var(--sp-lg);
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.premium-banner-text {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}
.premium-banner .btn {
  background: #fff;
  color: var(--color-primary);
  font-weight: 600;
  flex-shrink: 0;
}
.premium-banner .btn:hover {
  background: rgba(255,255,255,0.9);
}

/* ── Animated Checkmark ──────────────────── */
.check-animated {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  font-size: 0.7rem;
}
.check-animated::after {
  content: '✓';
}

/* ── Feature Comparison Table ───────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: var(--sp-lg) 0;
}
.compare-table th {
  padding: var(--sp-md);
  text-align: center;
  font-weight: 600;
  background: #f8f9fb;
  border-bottom: 2px solid var(--color-border);
}
.compare-table th:first-child {
  text-align: left;
}
.compare-table td {
  padding: var(--sp-md);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.compare-table tr:hover td {
  background: var(--color-primary-bg);
}
.compare-table .check {
  color: var(--color-success);
  font-weight: 700;
}
.compare-table .cross {
  color: var(--color-error);
  font-weight: 700;
}
.compare-table .recommended {
  background: var(--color-primary-bg);
}

/* ── Exit Intent Overlay ────────────────── */
.exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.exit-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 90%;
  padding: var(--sp-2xl);
  text-align: center;
  box-shadow: var(--shadow-deep);
  animation: scaleIn 0.3s ease;
}
.exit-card h2 {
  font-size: 1.3rem;
  margin-bottom: var(--sp-sm);
}
.exit-card p {
  font-size: 0.9rem;
  color: var(--color-body);
  margin-bottom: var(--sp-lg);
}

/* ── Stage Progress (处理阶段进度) ──────── */
.stage-progress {
  text-align: center;
  margin-bottom: var(--sp-md);
}
.stage-label {
  font-size: 0.9rem;
  color: var(--color-heading);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}
.stage-sub {
  font-size: 0.8rem;
  color: var(--color-body);
}

/* ── Remaining count badge ──────────────── */
.remaining-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border: 1px solid var(--color-border-purple);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   SaaS Modern Upgrade (2026)
   ═══════════════════════════════════════════════ */

/* ── Hero V2: Eyebrow badge + two-column with before/after ── */
.hero-v2 {
  padding: var(--sp-4xl) 0 var(--sp-3xl);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(83, 58, 253, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(249, 107, 238, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #EEF2FF 0%, #F8FAFC 100%);
}
.hero-v2-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 960px) {
  .hero-v2-grid { grid-template-columns: 1fr; gap: var(--sp-2xl); }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-purple);
  border-radius: var(--radius-pill);
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--sp-md);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(83, 58, 253, 0.08);
}
.hero-v2-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: var(--sp-md);
}
@media (max-width: 640px) { .hero-v2-title { font-size: 2.25rem; } }
.hero-v2-subtitle {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: var(--sp-xl);
  max-width: 560px;
}
.hero-v2-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  margin-top: var(--sp-lg);
}
.hero-feature-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}
.hero-feature-check::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--color-success);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}
.hero-v2-cta {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
}
.hero-v2-stats {
  display: flex;
  gap: var(--sp-2xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  flex-wrap: wrap;
}
.hero-v2-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.hero-v2-stat-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* ── Before/After showcase (real images) ── */
.ba-showcase {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px -15px rgba(83, 58, 253, 0.35),
              0 10px 30px -10px rgba(0, 0, 0, 0.15);
  aspect-ratio: 4 / 3;
  background: #fff;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}
.ba-showcase img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  display: block;
}
.ba-showcase-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 3px solid #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  transition: width 0.1s ease;
}
.ba-showcase-after img {
  width: auto;
  min-width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}
.ba-showcase-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 3;
  cursor: ew-resize;
  pointer-events: none;
  font-size: 1.2rem;
  color: var(--color-primary);
}
.ba-label {
  position: absolute;
  top: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.ba-label-before {
  left: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}
.ba-label-after {
  right: 14px;
  background: rgba(83, 58, 253, 0.9);
  color: #fff;
}

/* ── How It Works ── */
.how-it-works {
  background: #fff;
  padding: var(--sp-4xl) 0;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xl);
  margin-top: var(--sp-2xl);
}
@media (max-width: 768px) { .how-steps { grid-template-columns: 1fr; } }
.how-step {
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  position: relative;
}
.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--color-bg-tint);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--sp-md);
  border: 2px solid rgba(83, 58, 253, 0.15);
}
.how-step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: var(--sp-sm);
}
.how-step-desc {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}

/* ── AI Tools Grid V2 ── */
.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-top: var(--sp-2xl);
}
@media (max-width: 900px) { .ai-tools-grid { grid-template-columns: 1fr; } }
.ai-tool-card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-xl);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-slow);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 220px;
}
.ai-tool-card:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(83, 58, 253, 0.25);
}
.ai-tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-magenta));
  opacity: 0;
  transition: opacity var(--transition);
}
.ai-tool-card:hover::before { opacity: 1; }
.ai-tool-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-md);
  display: block;
}
.ai-tool-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: var(--sp-sm);
}
.ai-tool-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--sp-md);
}
.ai-tool-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-tool-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 10px;
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ── Comparison Table V2 ── */
.compare-table-v2 {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  margin: var(--sp-2xl) 0 0;
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.compare-table-v2 th {
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  font-weight: 600;
  background: var(--color-bg-tint);
  color: #0f172a;
  border-bottom: 1px solid var(--color-border);
}
.compare-table-v2 th:first-child { text-align: left; }
.compare-table-v2 th.recommended {
  background: linear-gradient(135deg, var(--color-primary), var(--color-magenta));
  color: #fff;
}
.compare-table-v2 td {
  padding: var(--sp-md);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  color: #475569;
}
.compare-table-v2 td:first-child {
  text-align: left;
  font-weight: 500;
  color: #1e293b;
}
.compare-table-v2 tr:last-child td { border-bottom: none; }
.compare-table-v2 .check { color: var(--color-success); font-weight: 700; font-size: 1.1rem; }
.compare-table-v2 .cross { color: var(--color-error); font-weight: 700; font-size: 1.1rem; }
.compare-table-v2 tr:hover td { background: rgba(83, 58, 253, 0.03); }

/* ── Pricing V2 (SaaS Modern) ── */
.pricing-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-top: var(--sp-2xl);
  align-items: stretch;
}
@media (max-width: 900px) { .pricing-v2 { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; } }
.pricing-card-v2 {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-2xl) var(--sp-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-slow);
  min-height: 480px;
}
.pricing-card-v2.featured {
  border: 2px solid var(--color-primary);
  background: linear-gradient(180deg, #FAF5FF 0%, #FFFFFF 50%);
  box-shadow: 0 20px 50px -15px rgba(83, 58, 253, 0.3);
  transform: scale(1.03);
  z-index: 1;
}
@media (max-width: 900px) {
  .pricing-card-v2.featured { transform: none; }
}
.pricing-badge-v2 {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 18px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-magenta));
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(83, 58, 253, 0.4);
}
.pricing-card-v2 .plan-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: var(--sp-xs);
}
.pricing-card-v2.featured .plan-name { color: var(--color-primary); }
.pricing-card-v2 .plan-tagline {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: var(--sp-lg);
}
.pricing-card-v2 .plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: var(--sp-xs);
}
.pricing-card-v2 .plan-price .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
}
.pricing-card-v2 .plan-price .amount {
  font-size: 3.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pricing-card-v2 .plan-price .period {
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 500;
}
.pricing-card-v2 .plan-price-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: var(--sp-xl);
}
.pricing-features-v2 {
  list-style: none;
  margin-bottom: var(--sp-xl);
  flex: 1;
}
.pricing-features-v2 li {
  padding: var(--sp-sm) 0;
  font-size: 0.9rem;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
}
.pricing-features-v2 li:last-child { border-bottom: none; }
.pricing-features-v2 li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Trust signals row ── */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2xl);
  padding: var(--sp-xl) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--sp-2xl);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
}
.trust-item-icon {
  font-size: 1.25rem;
}

/* ── SaaS Modern Drop Zone ── */
.drop-zone-saas {
  border: 2px dashed var(--color-border-purple);
  border-radius: var(--radius-xl);
  padding: var(--sp-3xl) var(--sp-lg);
  text-align: center;
  transition: all var(--transition-slow);
  cursor: pointer;
  background: linear-gradient(180deg, #FAFBFF 0%, #F1F5FF 100%);
  position: relative;
  overflow: hidden;
}
.drop-zone-saas::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(83, 58, 253, 0.08) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
}
.drop-zone-saas:hover,
.drop-zone-saas.dragover {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, #F5F3FF 0%, #EEF2FF 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(83, 58, 253, 0.2);
}
.drop-zone-saas:hover::before,
.drop-zone-saas.dragover::before { opacity: 1; }
.drop-zone-saas .drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 50%;
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: var(--sp-md);
  box-shadow: 0 4px 12px rgba(83, 58, 253, 0.15);
  position: relative;
  z-index: 1;
  animation: floatY 3s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.drop-zone-saas .drop-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: var(--sp-xs);
  position: relative;
  z-index: 1;
}
.drop-zone-saas .drop-or {
  font-size: 0.9rem;
  color: #64748b;
  margin: var(--sp-sm) 0;
  position: relative;
  z-index: 1;
}
.drop-zone-saas .drop-choose-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}
.drop-zone-saas .drop-choose-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}
.drop-zone-saas .drop-formats {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  margin-top: var(--sp-md);
  position: relative;
  z-index: 1;
}
.drop-zone-saas .drop-format {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.03em;
}
.drop-zone-saas .drop-max {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: var(--sp-xs);
  position: relative;
  z-index: 1;
}

/* ── Workspace V2: Photoshop-like controls ── */
.workspace-v2 {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
@media (max-width: 900px) {
  .workspace-v2 { grid-template-columns: 1fr; }
}
.workspace-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
}
.controls-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.controls-panel h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--color-border);
}
.method-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.method-option {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
  color: #334155;
}
.method-option:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-bg);
}
.method-option input[type="radio"] {
  accent-color: var(--color-primary);
}
.method-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 500;
}
.brush-control {
  margin-bottom: var(--sp-lg);
}
.brush-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.brush-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(83, 58, 253, 0.4);
  border: 3px solid #fff;
}
.brush-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid #fff;
}

/* ── AI Tech section (image-watermark tool page) ── */
.ai-tech-section {
  background: linear-gradient(135deg, #1c1e54 0%, #312e81 100%);
  color: #fff;
  padding: var(--sp-3xl) 0;
  border-radius: var(--radius-2xl);
  margin-top: var(--sp-3xl);
  position: relative;
  overflow: hidden;
}
.ai-tech-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(249, 107, 238, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(83, 58, 253, 0.2) 0%, transparent 40%);
  pointer-events: none;
}
.ai-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) { .ai-tech-grid { grid-template-columns: 1fr; } }
.ai-tech-features {
  list-style: none;
}
.ai-tech-features li {
  padding: var(--sp-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}
.ai-tech-features li::before {
  content: '✨';
  flex-shrink: 0;
}

/* ── Dashboard ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }
.credits-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, #312e81 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
  position: relative;
  overflow: hidden;
}
.credits-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(249, 107, 238, 0.3) 0%, transparent 70%);
  pointer-events: none;
}
.credits-number {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: var(--sp-sm) 0;
}
.credits-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: var(--sp-md);
}
.credits-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f96bee, #15be53);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.history-item:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-ambient);
}
.history-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.history-info { flex: 1; padding: 0 var(--sp-md); }
.history-filename { font-weight: 500; color: #1e293b; font-size: 0.9rem; }
.history-meta { font-size: 0.75rem; color: #94a3b8; }

/* ── SEO Landing page ── */
.landing-hero {
  padding: var(--sp-4xl) 0 var(--sp-3xl);
  background:
    radial-gradient(circle at 20% 30%, rgba(83, 58, 253, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #EEF2FF 0%, #F8FAFC 100%);
  text-align: center;
}
.landing-content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-3xl) 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}
.landing-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #0f172a;
  margin: var(--sp-xl) 0 var(--sp-md);
  letter-spacing: -0.01em;
}
.landing-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin: var(--sp-lg) 0 var(--sp-sm);
}
.landing-content p { margin-bottom: var(--sp-md); }
.landing-content ul, .landing-content ol {
  margin: 0 0 var(--sp-md) var(--sp-lg);
}
.landing-content li { margin-bottom: var(--sp-xs); }
.landing-content strong { color: #0f172a; }
.landing-content code {
  background: var(--color-bg-tint);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-primary);
}
.landing-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-magenta) 100%);
  color: #fff;
  padding: var(--sp-2xl);
  border-radius: var(--radius-xl);
  text-align: center;
  margin: var(--sp-2xl) 0;
}
.landing-cta h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: var(--sp-sm);
}
.landing-cta .btn-white { margin-top: var(--sp-md); }

/* ── Blog article page ── */
.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-2xl) 0;
}
.article-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #0f172a;
  margin: var(--sp-xl) 0 var(--sp-md);
  letter-spacing: -0.01em;
}
.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin: var(--sp-lg) 0 var(--sp-sm);
}
.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  margin-bottom: var(--sp-md);
}
.article-content ul, .article-content ol {
  margin: 0 0 var(--sp-md) var(--sp-lg);
}
.article-content li { margin-bottom: var(--sp-xs); font-size: 1rem; line-height: 1.7; }
.article-content code {
  background: var(--color-bg-tint);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-primary);
}
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: var(--sp-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--sp-md);
}
.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-md);
  font-size: 0.9rem;
}
.article-content th, .article-content td {
  border: 1px solid var(--color-border);
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
}
.article-content th { background: var(--color-bg-tint); font-weight: 600; }
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--color-border);
}
.article-related {
  margin-top: var(--sp-3xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--color-border);
}
.article-related h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-md);
}
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}
@media (max-width: 640px) { .article-related-grid { grid-template-columns: 1fr; } }

/* ── Footer V2 ── */
.footer-v2 {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.7);
  padding: var(--sp-3xl) 0 var(--sp-lg);
  font-size: 0.9rem;
}
.footer-v2-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
}
@media (max-width: 900px) { .footer-v2-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-v2-grid { grid-template-columns: 1fr; } }
.footer-v2 h4 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--sp-md);
  letter-spacing: 0.02em;
}
.footer-v2 a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  display: block;
  padding: 3px 0;
  transition: color var(--transition);
}
.footer-v2 a:hover { color: #fff; }
.footer-brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}
.footer-v2-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--sp-lg);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Nav V2 (Upload CTA button) ── */
.nav-upload-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--transition);
  min-height: 38px;
}
.nav-upload-cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(83, 58, 253, 0.4);
  color: #fff !important;
}

/* ═══════════════════════════════════════════════
   全新升級 UI（Phase C — 2026-08-15）
   1. Dark Mode（[data-theme="dark"] 切換）
   2. Hero 粒子動畫（CSS only，無 JS）
   3. 骨架屏 skeleton loader
   4. Before/After slider 移動端強化
   5. In-tool 升級 Modal
   6. Dashboard 圖表樣式（chart container）
   ═══════════════════════════════════════════════ */

/* ── Dark Mode 覆蓋變量 ──────────────────── */
:root, [data-theme="light"] {
  --color-bg: #ffffff;
  --color-bg-soft: #F8FAFC;
  --color-bg-tint: #EEF2FF;
  --color-heading: #0f172a;
  --color-body: #475569;
  --color-label: #1e293b;
  --color-border: #e5edf5;
  --color-nav-bg: rgba(255, 255, 255, 0.85);
  --shadow-card: rgba(50, 50, 93, 0.25) 0px 30px 45px -30px,
                 rgba(0, 0, 0, 0.1) 0px 18px 36px -18px;
  --shadow-soft: rgba(23, 23, 23, 0.08) 0px 15px 35px 0px;
  --shadow-ambient: rgba(23, 23, 23, 0.06) 0px 3px 6px;
  --wm-color-on-primary: #ffffff;
  --wm-color-surface: #ffffff;
  --wm-color-on-surface: #0f172a;
  --wm-color-surface-soft: #F8FAFC;
}

[data-theme="dark"] {
  --color-bg: #0f172a;
  --color-bg-soft: #131a35;
  --color-bg-tint: #1c2545;
  --color-heading: #f1f5f9;
  --color-body: #cbd5e1;
  --color-label: #e2e8f0;
  --color-border: #293354;
  --color-nav-bg: rgba(15, 23, 42, 0.85);
  --shadow-card: rgba(0, 0, 0, 0.6) 0px 25px 40px -30px,
                 rgba(0, 0, 0, 0.4) 0px 12px 28px -18px;
  --shadow-soft: rgba(0, 0, 0, 0.45) 0px 15px 35px 0px;
  --shadow-ambient: rgba(0, 0, 0, 0.3) 0px 3px 6px;
  --wm-color-on-primary: #ffffff;
  --wm-color-surface: #1a2540;
  --wm-color-on-surface: #e2e8f0;
  --wm-color-surface-soft: #131a35;
}

/* 強制 body 切色（覆蓋原本 hardcoded #374151 與 #ffffff） */
body { color: var(--color-body); background: var(--color-bg-soft); }
h1, h2, h3, h4, h5, h6, .section-heading, .hero-v2-title, .display-hero, .hero-title {
  color: var(--color-heading);
}
.card { background: var(--color-bg); border-color: var(--color-border); }
.nav { background: var(--color-nav-bg); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.nav-links a, .footer-v2 a { color: var(--color-body); }
.nav-links a:hover { color: var(--color-primary); }
.section-dark, .section-dark .section-heading, .section-dark h3 { color: #fff !important; }
.section-dark p { color: rgba(255,255,255,0.85); }
.footer-v2 { background: #0f172a; }

/* 各種殘留 inline 色 token */
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--wm-color-on-primary); }
.method-option, .ai-tool-card, .trust-item, .blog-card { background: var(--color-bg); border-color: var(--color-border); }
.compare-table-v2 th, .compare-table-v2 td { border-color: var(--color-border); background: var(--color-bg); }
.compare-table-v2 thead th.recommended { background: var(--color-primary); color: #fff; }
.pricing-card-v2 { background: var(--color-bg); border-color: var(--color-border); }
.pricing-card-v2.featured { box-shadow: var(--shadow-card); border-color: var(--color-primary); }
.cookie-consent { background: var(--color-surface); border-color: var(--color-border); }
.cookie-consent strong { color: var(--color-heading); }
.lang-dropdown { background: var(--color-bg); border-color: var(--color-border); }

/* ── Theme toggle button（nav 右上） ─────────────────── */
.theme-toggle {
  background: transparent; border: 1px solid var(--color-border); cursor: pointer;
  width: 36px; height: 36px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--color-heading);
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--color-bg-tint); border-color: var(--color-primary); }
.nav-cta-group { gap: var(--sp-sm); align-items: center; }

/* ── Hero 粒子動畫（CSS only）──────────────────────────── */
.hero-v2 { position: relative; overflow: hidden; isolation: isolate; }
.hero-v2::before {
  content: '';
  position: absolute; top: -50%; left: -10%; right: -10%; bottom: -50%;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(83, 58, 253, 0.10) 0%, transparent 25%),
    radial-gradient(circle at 80% 60%, rgba(99, 102, 241, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 30% 90%, rgba(249, 107, 238, 0.06) 0%, transparent 30%);
  filter: blur(20px);
  z-index: -1; pointer-events: none;
  animation: hero-bg-pan 18s ease-in-out infinite alternate;
}
.hero-v2::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle 1.5px at 15% 28%, rgba(255,255,255,0.55), transparent 100%),
    radial-gradient(circle 1px at 35% 65%, rgba(255,255,255,0.4), transparent 100%),
    radial-gradient(circle 1.5px at 60% 22%, rgba(255,255,255,0.55), transparent 100%),
    radial-gradient(circle 1px at 78% 55%, rgba(255,255,255,0.35), transparent 100%),
    radial-gradient(circle 1.2px at 88% 80%, rgba(255,255,255,0.4), transparent 100%);
  background-size: 100% 100%;
  z-index: -1; pointer-events: none; opacity: 0.6;
  animation: hero-particles-twinkle 6s ease-in-out infinite alternate;
}
[data-theme="light"] .hero-v2::after { opacity: 0.3; }
@keyframes hero-bg-pan { 0%{transform:translate(0,0)rotate(0)} 100%{transform:translate(-2%,2%)rotate(2deg)} }
@keyframes hero-particles-twinkle { 0%{opacity:0.3} 100%{opacity:0.7} }

/* Hero title text gradient subtle effect */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-magenta) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradient-shift 8s ease-in-out infinite alternate;
  background-size: 200% 200%;
}
@keyframes gradient-shift { 0%{background-position:0% 50%} 100%{background-position:100% 50%} }

/* ── 骨架屏 skeleton loader ────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-bg-tint) 0%, var(--color-border) 50%, var(--color-bg-tint) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.long { width: 100%; }
.skeleton-text.medium { width: 60%; }
.skeleton-text.short { width: 30%; }
.skeleton-image { width: 100%; aspect-ratio: 4/3; }

/* ── In-tool 升級 Modal （429 hit 時彈出）──────────────── */
.upgrade-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity var(--transition-slow);
}
.upgrade-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.upgrade-modal {
  background: var(--color-bg); border-radius: var(--radius-2xl);
  padding: var(--sp-2xl) var(--sp-2xl) var(--sp-xl);
  max-width: 480px; width: calc(100% - 2*var(--sp-xl));
  box-shadow: var(--shadow-card); position: relative;
  transform: scale(0.95); transition: transform var(--transition-slow);
}
.upgrade-modal-backdrop.open .upgrade-modal { transform: scale(1); }
.upgrade-modal h2 { font-size: 1.5rem; margin-bottom: var(--sp-sm); color: var(--color-heading); }
.upgrade-modal .modal-close {
  position: absolute; top: var(--sp-sm); right: var(--sp-sm);
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer; font-size: 1.4rem;
  color: var(--color-body); display: flex; align-items: center; justify-content: center;
}
.upgrade-modal .modal-close:hover { background: var(--color-bg-tint); }
.upgrade-modal .upgrade-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); margin: var(--sp-xl) 0;
}
.upgrade-modal .upgrade-option {
  border: 2px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--sp-md); cursor: pointer; transition: all var(--transition);
  text-align: center; background: var(--color-bg);
}
.upgrade-modal .upgrade-option:hover,
.upgrade-modal .upgrade-option.selected { border-color: var(--color-primary); background: var(--color-bg-tint); }
.upgrade-modal .upgrade-option .opt-name { font-weight: 600; color: var(--color-heading); margin-bottom: 4px; }
.upgrade-modal .upgrade-option .opt-price { font-size: 1.5rem; color: var(--color-primary); }
.upgrade-modal .upgrade-option .opt-period { font-size: 0.85rem; color: var(--color-body); }

/* ── Before/After slider 移動端強化 ──────────────────── */
.ba-showcase, .comparison-slider-container {
  touch-action: pan-x; user-select: none; -webkit-user-select: none;
}
.ba-showcase-handle {
  cursor: ew-resize; backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.9); transition: transform 80ms ease;
}
.ba-showcase-handle:active { transform: scale(1.1); }
.comparison-slider-container #sliderHandle {
  background: rgba(255,255,255,0.95); box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 2px solid var(--color-primary);
}

/* ── Dashboard 圖表區 ───────────────────────────────── */
.dashboard-card {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--sp-lg);
  box-shadow: var(--shadow-ambient);
  margin-bottom: var(--sp-lg);
}
.dashboard-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-md); }
.dashboard-card-header h3 { font-size: 1.1rem; color: var(--color-heading); }
.usage-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-md); margin: var(--sp-md) 0; }
.usage-stat {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--sp-md); text-align: center;
}
.usage-stat .stat-num { font-size: 1.8rem; font-weight: 700; color: var(--color-primary); }
.usage-stat .stat-label { font-size: 0.85rem; color: var(--color-body); margin-top: 4px; }
#usageChart { width: 100%; height: 240px; }

/* ── Blog card 升級 (含 thumbnail + read time) ────────── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-lg); }
.blog-card {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg); transition: all var(--transition);
  box-shadow: var(--shadow-ambient);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--color-primary); }
.blog-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--color-bg-tint); }
.blog-card-body { padding: var(--sp-md); }
.blog-card-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--color-body); margin-bottom: var(--sp-xs); }
.blog-card h3 { font-size: 1.05rem; color: var(--color-heading); margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: 0.9rem; color: var(--color-body); line-height: 1.5; }

/* ── Toast 進場動畫 ─────────────────────────────── */
.toast { animation: toast-in 280ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes toast-in { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* ── Scroll reveal 觀察中元素初始隱藏 ──────────────── */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ── 工具頁面 測試升級 Modal 直接 CTA banner ─ */
.cta-upgrade-inline {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: var(--sp-lg); margin-top: var(--sp-lg);
  display: flex; align-items: center; gap: var(--sp-md);
}
.cta-upgrade-inline .cta-text { flex: 1; }
.cta-upgrade-inline .cta-text strong { font-size: 1.1rem; }
.cta-upgrade-inline .cta-text p { font-size: 0.9rem; opacity: 0.9; margin-top: 4px; }
.cta-upgrade-inline .btn { background: rgba(255,255,255,0.95); color: var(--color-primary); border: none; }

/* ── inline style 清潔 — 轉用 utility class ────── */
.text-center { text-align: center; }
.text-muted { color: var(--color-body); }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.max-w-md { max-width: 480px; margin: 0 auto; }
.max-w-lg { max-width: 640px; margin: 0 auto; }
.max-w-xl { max-width: 800px; margin: 0 auto; }
.full-width-input {
  width: 100%; padding: var(--sp-sm);
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-bg); color: var(--color-heading);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.full-width-input:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.field-group { margin-bottom: var(--sp-md); }
.field-group label { display: block; font-weight: 600; margin-bottom: var(--sp-sm); color: var(--color-label); }
.field-group .field-hint { font-size: 0.85rem; color: #94a3b8; margin-top: var(--sp-xs); }

/* Dark mode 下 form field 對比強化 */
[data-theme="dark"] .full-width-input { background: var(--wm-color-surface); }
[data-theme="dark"] input { color-scheme: dark; }

/* 暗黑模式下少數 hardcoded CSS 色修飾 */
[data-theme="dark"] .ai-tech-section {
  background-image: linear-gradient(135deg, rgba(28, 30, 84, 0.92) 0%, rgba(49, 46, 129, 0.92) 100%) !important;
}
[data-theme="dark"] .hero-v2::after { opacity: 0.45; }
[data-theme="dark"] #aiUpgradeBanner {
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.9) 0%, rgba(40, 60, 90, 0.85) 100%) !important;
  border: 1px solid var(--color-primary) !important;
  color: var(--color-body);
}
[data-theme="dark"] #aiUpgradeBanner h4 { color: #b9b6f9 !important; }
[data-theme="dark"] #aiUpgradeBanner p { color: var(--color-body) !important; }

/* 暗黑下結果區 before/after label */
[data-theme="dark"] .comparison-slider-container { background: var(--color-bg); }

/* 表格、按鈕輔色 */
.compare-table-v2 th { color: var(--color-heading); }
.compare-table-v2 th.recommended { color: #fff; background: var(--color-primary) !important; }
.compare-table-v2 td.check { color: var(--color-success); font-weight: 600; }
.compare-table-v2 td.cross { color: var(--color-error); font-weight: 600; }

/* Nav 在 dark 下字色 */
[data-theme="dark"] .nav-brand, 
[data-theme="dark"] .nav-links a,
[data-theme="dark"] .nav-brand-icon { color: #e2e8f0; }

/* Lang dropdown dark */
[data-theme="dark"] .lang-dropdown a { color: var(--color-body); }
[data-theme="dark"] .lang-dropdown a:hover { background: var(--color-bg-tint); }

/* ═══════════════════════════════════════════════════
   v3.0 augmentations — openUpgradeModal + Batch UI + OCR + spinner + buttons
   ═══════════════════════════════════════════════════ */

/* ── openUpgradeModal (main.js 全局彈窗) ─────────────────── */
.upgrade-modal-close {
  position: absolute; top: var(--sp-sm); right: var(--sp-sm);
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--color-body);
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms ease;
}
.upgrade-modal-close:hover { background: var(--color-bg-tint); color: var(--color-heading); }
.upgrade-modal-icon {
  font-size: 56px; text-align: center; margin-bottom: var(--sp-xs);
  line-height: 1;
}
.upgrade-modal-title {
  font-size: 1.5rem; font-weight: 700; color: var(--color-heading);
  margin: 0 0 var(--sp-xs); text-align: center;
}
.upgrade-modal-subtitle {
  color: var(--color-body); text-align: center;
  margin: 0 0 var(--sp-md); font-size: 0.95rem;
}
.upgrade-modal-features { margin-bottom: var(--sp-lg); }
.upgrade-modal-features ul {
  list-style: none; padding: 0; margin: 0;
}
.upgrade-modal-features li {
  padding: 10px 0 10px 32px; color: var(--color-body);
  border-bottom: 1px dashed var(--color-border); position: relative;
  font-size: 0.93rem;
}
.upgrade-modal-features li:last-child { border-bottom: none; }
.upgrade-modal-features li::before {
  content: '✓'; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  color: var(--color-success, #15be53); font-weight: 700; font-size: 0.95rem;
}
.upgrade-modal-actions {
  display: flex; gap: var(--sp-sm); justify-content: center;
  margin-top: var(--sp-lg); flex-wrap: wrap;
}
.upgrade-modal-actions .btn { flex: 1; min-width: 140px; }
.upgrade-modal-later {
  background: transparent; border: 1px solid var(--color-border);
  color: var(--color-body); padding: 10px 18px;
  border-radius: var(--radius-md); cursor: pointer;
  font-size: 0.93rem; transition: background 150ms ease, color 150ms ease;
  font-family: inherit;
}
.upgrade-modal-later:hover { background: var(--color-bg-tint); color: var(--color-heading); }
.upgrade-modal-feature {
  font-size: 0.82rem; color: var(--color-body); text-align: center;
  margin-top: var(--sp-md); padding: var(--sp-xs) 0;
  border-top: 1px solid var(--color-border);
}

/* Mobile: shrink modal padding */
@media (max-width: 480px) {
  .upgrade-modal {
    padding: var(--sp-lg) var(--sp-md) var(--sp-md) !important;
    max-width: calc(100vw - 32px) !important;
  }
  .upgrade-modal-title { font-size: 1.25rem; }
  .upgrade-modal-icon { font-size: 44px; }
  .upgrade-modal-actions .btn { flex: 1 0 100%; }
}

/* ── spinner-sm (loading in buttons) ─────────────────────── */
.spinner-sm {
  display: inline-block; width: 14px; height: 14px;
  vertical-align: middle; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spinner-sm-spin 0.7s linear infinite;
}
@keyframes spinner-sm-spin { to { transform: rotate(360deg); } }

/* ── OCR + Batch buttons in sidebar ───────────────────────── */
.detect-btn-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.detect-btn-row .btn {
  font-size: 0.85rem; padding: 8px 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.btn-ocr {
  background: var(--color-bg-tint); border-color: var(--color-border);
  color: var(--color-heading);
}
.btn-ocr:hover { background: var(--color-bg); border-color: var(--color-primary); }
.btn-batch {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border: none; color: #fff; font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.btn-batch:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }

/* Batch panel */
#batchPanel {
  background: var(--color-bg-tint);
  border: 1px dashed var(--color-border);
}

/* Dark mode tweaks for new modal/buttons */
[data-theme="dark"] .upgrade-modal-later { border-color: rgba(255,255,255,0.15); }
[data-theme="dark"] .upgrade-modal-features li { color: #cbd5e1; }
[data-theme="dark"] .btn-ocr { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
[data-theme="dark"] .btn-ocr:hover { background: rgba(255,255,255,0.12); }
[data-theme="dark"] #batchPanel { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.15); }

/* Modal compact on tablet-ish */
@media (max-width: 768px) {
  .upgrade-modal-features li { font-size: 0.85rem; padding: 8px 0 8px 28px; }
  .upgrade-modal-subtitle { font-size: 0.88rem; }
}
