:root {
  --ink: #17243e;
  --muted: #72809a;
  --line: #e5eaf2;
  --blue: #225ad7;
  --blue-dark: #1745b0;
  --blue-soft: #eef4ff;
  --green: #1aa981;
  --amber: #ed9a2d;
  --red: #df5c62;
  --card: #ffffff;
  --shadow: 0 20px 60px rgba(28, 60, 115, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 7%, rgba(202, 221, 255, 0.52), transparent 23rem),
    radial-gradient(circle at 90% 20%, rgba(223, 232, 255, 0.6), transparent 25rem),
    #f7f9fd;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.brand b {
  color: var(--blue);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  color: white;
  background: linear-gradient(145deg, #2c69eb, #1747bd);
  border-radius: 12px;
  place-items: center;
  box-shadow: 0 8px 18px rgba(34, 90, 215, 0.25);
}

.brand-mark svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.status-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 13px;
  color: #65728a;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.account-link {
  padding: 9px 14px; color: var(--blue); background: white;
  border: 1px solid #dce4f2; border-radius: 9px; font-size: 12px; font-weight: 650;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(26, 169, 129, 0.1);
}

main {
  width: min(850px, 100%);
  margin: 0 auto;
}

.hero {
  padding: 55px 0 36px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.eyebrow span {
  padding: 4px 7px;
  color: white;
  background: var(--blue);
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(35px, 5vw, 54px);
  font-weight: 750;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--blue);
  font-style: normal;
}

.hero p {
  max-width: 590px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.detector-card {
  position: relative;
  padding: 26px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(222, 229, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.drop-zone {
  width: 100%;
  min-height: 335px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: pointer;
  background: #fbfcff;
  border: 1.5px dashed #cbd5e6;
  border-radius: 17px;
  transition: 180ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  background: var(--blue-soft);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.upload-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 20px;
  place-items: center;
}

.upload-icon svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.drop-zone strong {
  margin-bottom: 9px;
  font-size: 18px;
}

.drop-zone > span:not(.upload-icon, .select-button) {
  color: var(--muted);
  font-size: 13px;
}

.select-button {
  margin-top: 26px;
  padding: 11px 26px;
  color: white;
  background: var(--blue);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(34, 90, 215, 0.22);
  font-size: 14px;
  font-weight: 650;
}

.privacy-note {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 0;
  color: #8a96aa;
  font-size: 11px;
}

.privacy-note svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.hidden {
  display: none !important;
}

.preview-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
}

.preview-frame {
  position: relative;
  grid-row: span 2;
  min-height: 350px;
  overflow: hidden;
  background: #eef1f6;
  border-radius: 16px;
}

.preview-frame img,
.scan-preview img,
.result-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.remove-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  background: rgba(20, 29, 47, 0.72);
  border: 0;
  border-radius: 50%;
  place-items: center;
}

.remove-button svg {
  width: 17px;
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.file-meta {
  align-self: end;
  padding: 18px;
  background: #f7f9fd;
  border-radius: 14px;
}

.file-meta div {
  min-width: 0;
}

.file-meta strong,
.file-meta span {
  display: block;
}

.file-meta strong {
  overflow: hidden;
  margin-bottom: 7px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta #fileInfo {
  color: var(--muted);
  font-size: 11px;
}

.file-meta .ready-badge {
  display: inline-block;
  margin-top: 15px;
  padding: 5px 9px;
  color: var(--green);
  background: rgba(26, 169, 129, 0.09);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}

.analyze-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: start;
  width: 100%;
  padding: 14px 17px;
  color: white;
  cursor: pointer;
  background: var(--blue);
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 650;
  transition: 160ms ease;
}

.analyze-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.analyze-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.analyzing-view {
  padding: 12px 12px 20px;
}

.scan-preview {
  position: relative;
  height: 310px;
  overflow: hidden;
  background: #edf1f7;
  border-radius: 15px;
}

.scan-line {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: #4a83ff;
  box-shadow: 0 0 18px 4px rgba(74, 131, 255, 0.75);
  animation: scan 2.2s ease-in-out infinite;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(43, 96, 221, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(43, 96, 221, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

@keyframes scan {
  0%, 100% { top: 2%; }
  50% { top: 98%; }
}

.analysis-copy {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 22px;
}

.analysis-copy strong,
.analysis-copy span {
  display: block;
}

.analysis-copy strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.analysis-copy div span {
  color: var(--muted);
  font-size: 11px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #dbe5fb;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-track {
  height: 5px;
  margin-top: 18px;
  overflow: hidden;
  background: #e8edf5;
  border-radius: 9px;
}

.progress-track span {
  display: block;
  width: 4%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #68a3ff);
  border-radius: inherit;
  transition: width 350ms ease;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1.15fr;
  gap: 28px;
}

.result-image-wrap {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background: #edf1f6;
  border-radius: 16px;
}

.result-image-wrap button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 13px;
  color: white;
  cursor: pointer;
  background: rgba(18, 31, 55, 0.78);
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.result-content {
  padding: 7px 4px;
}

.result-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.score-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 22px 0;
}

.score-ring {
  --score-color: var(--amber);
  --score-value: 0%;
  flex: 0 0 auto;
  width: 94px;
  height: 94px;
  display: grid;
  background: conic-gradient(var(--score-color) var(--score-value), #edf0f5 0);
  border-radius: 50%;
  place-items: center;
}

.score-ring::before {
  width: 76px;
  height: 76px;
  background: white;
  border-radius: 50%;
  content: "";
}

.score-ring div {
  position: absolute;
}

.score-ring strong {
  font-size: 27px;
}

.score-ring span {
  color: var(--muted);
  font-size: 12px;
}

.score-row h2 {
  margin: 0 0 7px;
  font-size: 23px;
}

.score-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  background: #f7f9fc;
  border-radius: 9px;
  font-size: 12px;
}

.feature-item span {
  color: var(--muted);
}

.feature-item b {
  color: var(--ink);
  font-size: 11px;
}

.demo-notice {
  margin-top: 14px;
  padding: 10px 12px;
  color: #8c6b32;
  background: #fff9ed;
  border: 1px solid #f4e4be;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.6;
}

.how-it-works {
  padding: 96px 0 70px;
}

.section-heading {
  text-align: center;
}

.section-heading span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.section-heading h2 {
  margin: 12px 0 0;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 38px;
}

.steps article {
  position: relative;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.step-number {
  position: absolute;
  top: 18px;
  right: 19px;
  color: #d8e0ec;
  font-size: 21px;
  font-weight: 800;
}

.step-icon {
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 12px;
  place-items: center;
}

.step-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.steps h3 {
  margin: 18px 0 8px;
  font-size: 15px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.truth-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 19px 22px;
  background: #f0f4fb;
  border-radius: 13px;
}

.truth-note svg {
  flex: 0 0 auto;
  width: 20px;
  color: #7d8ca7;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.truth-note p {
  margin: 0;
  color: #78859b;
  font-size: 11px;
  line-height: 1.7;
}

.truth-note strong {
  display: block;
  margin-bottom: 2px;
  color: #4e5d76;
  font-size: 12px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 38px 0 28px;
  color: #9aa5b7;
  font-size: 10px;
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 24px, 600px);
  }

  .topbar {
    height: 68px;
  }

  .hero {
    padding: 38px 0 28px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 14px;
  }

  .detector-card {
    padding: 14px;
    border-radius: 18px;
  }

  .drop-zone {
    min-height: 310px;
    padding: 25px;
  }

  .preview-view,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .preview-frame {
    grid-row: auto;
    min-height: 300px;
  }

  .file-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .file-meta .ready-badge {
    margin: 0 0 0 12px;
  }

  .result-image-wrap {
    min-height: 300px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    padding: 70px 0 50px;
  }
}

@media (max-width: 420px) {
  .status-pill {
    display: none;
  }

  .score-row {
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}
