:root {
      --primary: #ea580c;
      --primary-hover: #c2410c;
      --surface: #ffffff;
      --bg: #f8fafc;
      --text: #0f172a;
      --text-muted: #64748b;
      --border: #e2e8f0;
      --radius-lg: 16px;
      --radius-md: 10px;
      --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.5;
    }
    header {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
      padding: 0.75rem 1.75rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
      color: inherit;
    }
    .brand-icon {
      width: 36px;
      height: 36px;
      background: #ea580c;
      color: white;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 1.1rem;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
    }
    .brand-title { font-weight: 800; font-size: 1.15rem; color: #0f172a; }
    .brand-badge {
      font-size: 0.75rem;
      background: #fff7ed;
      color: #ea580c;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 6px;
      border: 1px solid #fed7aa;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: all 0.15s;
    }
    .nav-links { display: flex; align-items: center; gap: 0.85rem; }
    .nav-btn {
      text-decoration: none;
      color: var(--text-muted);
      font-size: 0.88rem;
      font-weight: 600;
      padding: 0.45rem 0.85rem;
      border-radius: 6px;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .nav-btn:hover { color: #ea580c; background: #fff7ed; }
    .nav-btn.active { color: #ea580c; font-weight: 700; }
    .nav-btn.primary {
      background: #ea580c;
      color: white;
      font-weight: 700;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
    }

    .hero-sec {
      max-width: 1080px;
      margin: 2rem auto 1.25rem auto;
      padding: 0 1.25rem;
      text-align: center;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.82rem;
      font-weight: 700;
      color: #c2410c;
      background: #fff7ed;
      padding: 4px 12px;
      border-radius: 20px;
      margin-bottom: 0.85rem;
      border: 1px solid #fed7aa;
    }
    .hero-title {
      font-size: 2.2rem;
      font-weight: 800;
      letter-spacing: -0.025em;
      margin-bottom: 0.5rem;
    }
    .hero-sub {
      font-size: 1rem;
      color: var(--text-muted);
      max-width: 650px;
      margin: 0 auto;
    }

    .container {
      max-width: 1150px;
      margin: 0 auto 3rem auto;
      padding: 0 1.25rem;
    }
    .main-card {
      background: var(--surface);
      border-radius: var(--radius-lg);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
      padding: 1.75rem;
    }

    .dropzone {
      border: 2px dashed #fed7aa;
      background: #fffaf5;
      border-radius: var(--radius-md);
      padding: 3rem 1.5rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s;
    }
    .dropzone:hover { border-color: #ea580c; background: #fff7ed; }

    /* Integrated Dropzone Player */
    .dropzone-integrated {
      border: 2px dashed transparent;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .dropzone-integrated.drag-over {
      border-color: #ea580c !important;
      box-shadow: 0 0 0 6px rgba(234, 88, 12, 0.2), 0 16px 36px rgba(0, 0, 0, 0.25) !important;
    }

    /* Editor layout */
    .editor-layout {
      display: none;
      flex-direction: column;
      gap: 1.25rem;
    }

    .toolbar-wrap {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
      background: #f8fafc;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.75rem 1.25rem;
    }
    .tool-group {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .canvas-viewport {
      position: relative;
      background: #1e293b;
      border-radius: 8px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 450px;
      max-height: 650px;
    }
    #imageCanvas, #maskCanvas {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      max-width: 100%;
      max-height: 100%;
      display: block;
    }
    #maskCanvas {
      cursor: crosshair;
      opacity: 0.65;
    }

    .btn-action {
      padding: 0.65rem 1.4rem;
      min-height: 42px;
      font-size: 0.92rem;
      font-weight: 700;
      border-radius: 10px;
      cursor: pointer;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.15s ease;
      box-sizing: border-box;
      user-select: none;
    }
    .btn-action:active {
      transform: scale(0.97);
    }
    .btn-primary { 
      background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); 
      color: white; 
      box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
    }
    .btn-primary:hover { 
      background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%); 
      box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4);
    }
    .btn-outline { 
      background: white; 
      border: 1.5px solid var(--border); 
      color: #334155; 
    }
    .btn-outline:hover { 
      background: #f8fafc; 
      border-color: #cbd5e1;
    }
    #btnDownload {
      background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
      box-shadow: 0 4px 16px rgba(79, 70, 229, 0.32);
    }
    #btnDownload:hover {
      background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
      box-shadow: 0 6px 20px rgba(79, 70, 229, 0.42);
    }

    .btn-model-pill {
      border: none;
      background: transparent;
      padding: 3px 10px;
      border-radius: 14px;
      font-size: 0.76rem;
      font-weight: 700;
      color: #64748b;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .btn-model-pill:hover {
      color: #ea580c;
    }
    .btn-model-pill.active {
      background: #ea580c;
      color: #ffffff;
      box-shadow: 0 1px 4px rgba(234, 88, 12, 0.35);
    }

    #brushCursor {
      position: absolute;
      pointer-events: none;
      border: 2px solid rgba(239, 68, 68, 0.85);
      background: rgba(239, 68, 68, 0.25);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      display: none;
      z-index: 50;
      box-shadow: 0 0 4px rgba(0,0,0,0.3);
    }

    .back-banner {
      background: linear-gradient(135deg, #fff7ed, #eff6ff);
      border: 1px solid #fed7aa;
      border-radius: var(--radius-md);
      padding: 1.5rem;
      text-align: center;
      margin: 2.5rem 0;
    }
  
    /* Header Actions & Country Selector */
    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .select-pill {
      padding: 0.42rem 0.75rem;
      border: 1px solid var(--border, #cbd5e1);
      border-radius: 9999px;
      background: var(--surface, #ffffff);
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text, #0f172a);
      outline: none;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    .country-selector {
      min-width: 82px;
    }

    /* Dynamic Demo Showcase & Integrated Hero Stage */
    .eraser-hero-stage,
    .eraser-demo-showcase {
      margin-top: 0;
      background: #ffffff;
      border: 1px solid #f1f5f9;
      border-radius: var(--radius-lg, 16px);
      padding: 1.25rem;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
      position: relative;
    }

    .demo-showcase-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-bottom: 1rem;
    }

    .demo-badge-wrap {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      flex-wrap: wrap;
    }

    .demo-tag {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: linear-gradient(135deg, #fff7ed, #ffedd5);
      color: #c2410c;
      font-size: 0.8rem;
      font-weight: 800;
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid #fed7aa;
    }

    .demo-desc {
      font-size: 0.84rem;
      color: #64748b;
      font-weight: 500;
    }

    .btn-demo-try {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: linear-gradient(135deg, #ea580c, #f97316);
      color: #ffffff;
      font-size: 0.85rem;
      font-weight: 700;
      padding: 0.5rem 1.15rem;
      border-radius: 20px;
      border: none;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
      transition: all 0.2s ease;
    }

    .btn-demo-try:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
      background: linear-gradient(135deg, #c2410c, #ea580c);
    }

    /* Demo Player Viewport */
    .demo-player-box {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9;
      max-height: 520px;
      border-radius: 14px;
      overflow: hidden;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
      user-select: none;
      cursor: ew-resize;
      touch-action: pan-y;
    }

    /* Minimalist In-Canvas Floating Upload (Clean Cutout Style at Bottom) */
    .canvas-floating-upload {
      position: absolute;
      bottom: 22px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 25;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      pointer-events: auto;
      user-select: none;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    /* Fade out slightly when user is dragging slider */
    .demo-player-box.is-dragging-slider .canvas-floating-upload {
      opacity: 0.25;
    }

    .btn-cutout-minimal {
      position: relative;
      overflow: hidden;
      width: auto;
      min-width: 170px;
      padding: 9px 22px;
      border-radius: 8px;
      border: 1px solid rgba(0, 0, 0, 0.12);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      background: #ffffff;
      color: #0f172a;
      font-size: 0.88rem;
      font-weight: 700;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
      transition: all 0.15s ease;
    }

    .btn-cutout-minimal:hover {
      background: #f8fafc;
      border-color: #ea580c;
      box-shadow: 0 6px 20px rgba(234, 88, 12, 0.22);
      transform: translateY(-1px);
    }

    .btn-cutout-minimal:active {
      transform: translateY(0);
    }

    .btn-upload-svg {
      width: 16px;
      height: 16px;
      stroke: #ea580c;
      flex-shrink: 0;
    }

    .canvas-floating-upload .upload-specs-hint {
      font-size: 0.72rem;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.88);
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
      letter-spacing: 0.04em;
    }

    /* Drag Hover Overlay */
    .demo-drag-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 247, 237, 0.94);
      backdrop-filter: blur(10px);
      z-index: 30;
      display: none;
      align-items: center;
      justify-content: center;
      border: 3px dashed #ea580c;
      border-radius: 14px;
      pointer-events: none;
    }

    .demo-drag-overlay.active {
      display: flex;
    }

    .drag-overlay-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
      color: #ea580c;
      font-size: 1.1rem;
      font-weight: 800;
      animation: pulseHover 1s infinite alternate;
    }

    @keyframes pulseHover {
      0% { transform: scale(0.96); }
      100% { transform: scale(1.04); }
    }

    /* Footer Sample Quick Link */
    .demo-footer-sample-link {
      background: #fff7ed;
      border: 1px solid #fed7aa;
      color: #c2410c;
      font-size: 0.78rem;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: 14px;
      cursor: pointer;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
    }

    .demo-footer-sample-link:hover {
      background: #ea580c;
      color: #ffffff;
      border-color: #ea580c;
    }

    .demo-layer-clean {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    .demo-layer-orig {
      position: absolute;
      top: 0;
      left: 0;
      width: 50%;
      height: 100%;
      overflow: hidden;
      border-right: 2px solid rgba(255, 255, 255, 0.95);
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.25);
      z-index: 5;
    }

    .demo-img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      pointer-events: none;
    }

    .demo-img-full {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      object-fit: cover;
      pointer-events: none;
    }

    .demo-brush-overlay {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.45s ease;
      z-index: 6;
    }

    .demo-brush-overlay.active {
      opacity: 1;
    }

    .demo-layer-label {
      position: absolute;
      top: 12px;
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 0.75rem;
      font-weight: 700;
      backdrop-filter: blur(8px);
      z-index: 8;
      pointer-events: none;
      letter-spacing: 0.2px;
    }

    .demo-layer-label.orig {
      left: 12px;
      background: rgba(239, 68, 68, 0.88);
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }

    .demo-layer-label.clean {
      right: 12px;
      background: rgba(16, 185, 129, 0.88);
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    }

    /* Callout Annotations on unwanted items */
    .demo-annotation {
      position: absolute;
      display: flex;
      align-items: center;
      gap: 5px;
      background: rgba(220, 38, 38, 0.9);
      color: #ffffff;
      padding: 3px 8px;
      border-radius: 12px;
      font-size: 0.72rem;
      font-weight: 700;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
      transform: translate(-50%, -50%);
      pointer-events: none;
      z-index: 7;
      opacity: 0;
      transition: opacity 0.3s ease, transform 0.3s ease;
      white-space: nowrap;
    }

    .demo-annotation.visible {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    .annot-dot {
      width: 7px;
      height: 7px;
      background: #fef08a;
      border-radius: 50%;
      animation: pulseDot 1.4s infinite;
    }

    @keyframes pulseDot {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.6); opacity: 0.6; }
    }

    .demo-annot-tourist {
      left: 82.8%;
      top: 37.7%;
    }

    .demo-annot-cone {
      left: 67.5%;
      top: 59.8%;
    }

    /* AI Scan Wave Bar */
    .demo-scanline {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 28px;
      background: linear-gradient(90deg, transparent, rgba(234, 88, 12, 0.85), #ffffff, rgba(234, 88, 12, 0.85), transparent);
      pointer-events: none;
      opacity: 0;
      z-index: 12;
      filter: drop-shadow(0 0 12px #ea580c);
      transform: translateX(-50%);
      transition: opacity 0.2s ease;
    }

    .demo-scanline.scanning {
      opacity: 1;
    }

    /* Slider Divider Handle */
    .demo-slider-divider {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      width: 2px;
      background: #ffffff;
      box-shadow: 0 0 8px rgba(0,0,0,0.5);
      z-index: 15;
      pointer-events: none;
      transform: translateX(-50%);
    }

    .slider-handle {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 36px;
      height: 36px;
      background: #ffffff;
      color: #ea580c;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
      border: 2px solid #ea580c;
    }

    /* Status Pill Hidden */
    .demo-status-pill {
      display: none !important;
    }

    .status-icon {
      display: inline-block;
      font-size: 0.95rem;
    }

    /* Footer Controls */
    .demo-footer-controls {
      margin-top: 0.85rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .demo-indicator-tabs {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .demo-tab-btn {
      background: #f8fafc;
      border: 1px solid var(--border);
      color: #475569;
      font-size: 0.8rem;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: 16px;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .demo-tab-btn:hover {
      background: #fff7ed;
      color: #ea580c;
      border-color: #fed7aa;
    }

    .demo-tab-btn.active {
      background: #ea580c;
      color: #ffffff;
      border-color: #ea580c;
      box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
    }

    .demo-tip-hint {
      font-size: 0.78rem;
      color: #94a3b8;
      margin-left: 0.5rem;
    }

/* ==========================================================================
   AI Inpainting Creation Animation Overlay (AI消除创作动画)
   ========================================================================== */
.eraser-creation-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: all;
  border-radius: inherit;
  overflow: hidden;
  animation: creationOverlayFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes creationOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.eraser-creation-overlay.fade-out {
  animation: creationOverlayFadeOut 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes creationOverlayFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.02); }
}

/* 1. Neural Laser Scanning Beam (光速扫描光束) */
.inpaint-scan-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #ea580c;
  box-shadow: 0 0 16px 4px #ea580c, 0 0 32px 8px rgba(249, 115, 22, 0.8);
  pointer-events: none;
  z-index: 61;
  animation: inpaintLaserSweep 1.8s ease-in-out infinite alternate;
}

.inpaint-scan-beam-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to top, rgba(234, 88, 12, 0.25), transparent);
  pointer-events: none;
}

@keyframes inpaintLaserSweep {
  0% {
    top: 5%;
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 95%;
    opacity: 0.9;
  }
}

/* 2. AI Creation Status HUD Capsule (居中科技感悬浮舱) */
.eraser-creation-hud {
  position: relative;
  z-index: 62;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px 22px;
  border-radius: 40px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(234, 88, 12, 0.3);
  color: #ffffff;
  user-select: none;
  max-width: 90%;
  animation: hudPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hudPopIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.creation-spinner-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creation-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ea580c;
  border-right-color: #f97316;
  animation: creationSpin 0.85s linear infinite;
}

@keyframes creationSpin {
  to { transform: rotate(360deg); }
}

.creation-spinner-core {
  animation: corePulse 1.2s ease-in-out infinite alternate;
}

@keyframes corePulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 1; }
}

.creation-text-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.creation-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

.creation-sub {
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Mask Canvas Dissolve Shimmer during creation */
body.is-erasing #maskCanvas {
  animation: maskCanvasPulse 1.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.7));
}

@keyframes maskCanvasPulse {
  0% { opacity: 0.65; }
  100% { opacity: 0.95; }
}