:root {
  --bg: #0f172a;
  --bg-soft: #111c3b;
  --card: #111827;
  --card-soft: #1e293b;
  --accent: #f59e0b;
  --accent-strong: #f97316;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
}

* {
  box-sizing: border-box;
}

.docscanpro-root {
  margin: 0;
  min-height: 100vh;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 65%);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  line-height: 1.4;
}

.docscanpro-root,
.docscanpro-root * {
  box-sizing: border-box;
}

.docscanpro-root button,
.docscanpro-root input,
.docscanpro-root select,
.docscanpro-root textarea {
  font: inherit;
  color: inherit;
}

.docscanpro-root a {
  color: inherit;
  text-decoration: none;
}

.docscanpro-root .bg-orb {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  z-index: -1;
}

.docscanpro-root .orb-a {
  top: -120px;
  right: -140px;
  background: #fb923c;
}

.docscanpro-root .orb-b {
  bottom: -160px;
  left: -120px;
  background: #38bdf8;
}

.docscanpro-root .bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at top, rgba(0, 0, 0, 0.7), transparent 70%);
  z-index: -2;
}

.docscanpro-root .shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 90px;
}

.docscanpro-root .hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.docscanpro-root .hero-left {
  max-width: 560px;
}

.docscanpro-root .pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.docscanpro-root h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 0 0 12px;
}

.docscanpro-root h1,
.docscanpro-root h2,
.docscanpro-root h3 {
  color: var(--text) !important;
}

.docscanpro-root main {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.docscanpro-root .hero p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.docscanpro-root .hero-right {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 220px;
}

.docscanpro-root .stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  min-width: 160px;
}

.docscanpro-root .stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.docscanpro-root .stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}

.docscanpro-root .upload-card {
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
  display: grid;
  gap: 12px;
}

.docscanpro-root .upload-zone {
  position: relative;
  border: 1px dashed rgba(248, 250, 252, 0.3);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.6);
  transition: border 0.2s ease, background 0.2s ease;
}

.docscanpro-root .upload-zone.drag {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
}

.docscanpro-root .upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.docscanpro-root .upload-content {
  display: flex;
  gap: 14px;
  align-items: center;
}

.docscanpro-root .upload-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.15);
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #38bdf8;
}

.docscanpro-root .upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.docscanpro-root .btn {
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.docscanpro-root .btn:hover {
  transform: translateY(-1px);
}

.docscanpro-root .btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #111827;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.2);
}

.docscanpro-root .btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.docscanpro-root .btn.download {
  background: #1f2937;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.docscanpro-root .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.docscanpro-root .pages {
  display: grid;
  gap: 16px;
}

.docscanpro-root .page-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}

.docscanpro-root .page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.docscanpro-root .page-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}

.docscanpro-root .page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.docscanpro-root .page-body {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 12px;
}

.docscanpro-root .canvas-wrap,
.docscanpro-root .result-wrap {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  position: relative;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.docscanpro-root.embed .shell {
  padding-top: 20px;
}

.lang-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

.docscanpro-root .canvas-wrap canvas,
.docscanpro-root .result-wrap canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.docscanpro-root .hint {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 12px;
  color: var(--muted);
}

.docscanpro-root .result-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.docscanpro-root .corner-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #0f172a;
  transform: translate(-50%, -50%);
  cursor: grab;
}

.docscanpro-root .corner-dot.active {
  background: #38bdf8;
}

@media (max-width: 900px) {
  .docscanpro-root .page-body {
    grid-template-columns: 1fr;
  }

  .docscanpro-root .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .docscanpro-root .upload-actions {
    justify-content: flex-start;
  }
}

.docscanpro-root .bg-orb,
.docscanpro-root .bg-grid {
  position: absolute;
}
