:root {
  --bg: #f7f9ff;
  --card: rgba(255, 255, 255, 0.9);
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --blue: #2f6bff;
  --purple: #7c3aed;
  --green: #20c997;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, rgba(92, 132, 255, 0.16), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(124, 58, 237, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.topbar {
  width: min(1120px, calc(100% - 40px));
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
}

.brand-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-control {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  padding: 0 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.language-control select {
  border: none;
  background: transparent;
  color: #111827;
  font: inherit;
  cursor: pointer;
  outline: none;
}

.icon-btn,
.guide-btn {
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  height: 36px;
  padding: 0 13px;
  cursor: pointer;
  color: #111827;
}

.container {
  width: min(1000px, calc(100% - 36px));
  margin: 48px auto 40px;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -1px;
}

.hero h1 span {
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.upload-card,
.progress-card,
.result-card,
.map-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.upload-card {
  padding: 18px;
}

.drop-zone {
  min-height: 260px;
  border: 2px dashed #75a7ff;
  border-radius: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.2s ease;
  overflow: hidden;
}

.drop-zone.dragover {
  background: rgba(47, 107, 255, 0.08);
  transform: scale(1.01);
}

.drop-placeholder {
  text-align: center;
}

.upload-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(47,107,255,.18), rgba(124,58,237,.12));
  display: grid;
  place-items: center;
  font-size: 34px;
}

.drop-placeholder h3 {
  font-size: 24px;
  margin: 0 0 12px;
}

.drop-placeholder p {
  color: var(--muted);
  margin: 0;
}

.upload-bottom {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.file-card {
  height: 92px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 12px;
  gap: 16px;
}

.file-card.is-empty {
  border-style: dashed;
  background: rgba(248, 250, 252, 0.8);
  justify-content: center;
}

.file-placeholder {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.file-placeholder span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.file-placeholder strong {
  font-size: 15px;
  font-weight: 700;
}

.file-card.is-empty .file-placeholder {
  display: flex;
}

.file-card.is-empty img,
.file-card.is-empty .file-info,
.file-card.is-empty .remove-btn {
  display: none;
}

.file-card img {
  width: 116px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.file-info span {
  color: var(--muted);
}

.file-info em {
  color: #12b981;
  font-style: normal;
  font-size: 13px;
}

.remove-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: white;
  cursor: pointer;
  font-size: 22px;
  color: #94a3b8;
}

.locate-btn {
  height: 68px;
  border: none;
  border-radius: 18px;
  color: white;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.28);
}

.locate-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.privacy-note {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.credit-note {
  text-align: center;
  margin-top: 8px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.analysis-section {
  margin-top: 30px;
}

.progress-card {
  padding: 26px;
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, rgba(239,246,255,.95), rgba(255,255,255,.96));
}

.progress-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.planet {
  font-size: 42px;
}

.progress-title h2 {
  margin: 0;
  color: #2563eb;
  font-size: 26px;
}

.steps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  position: relative;
}

.step {
  text-align: center;
  color: var(--muted);
}

.step-dot {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: #cbd5e1;
  font-weight: 800;
}

.step strong {
  display: block;
  color: #111827;
  font-size: 14px;
}

.step span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.step.done .step-dot {
  background: var(--green);
}

.step.done span {
  color: var(--green);
}

.step.active .step-dot {
  background: var(--blue);
  animation: pulse 1s infinite;
}

.step.active span {
  color: var(--blue);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.result-card,
.map-card {
  padding: 20px;
}

.section-title {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 18px;
}

.main-result {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-result h2 {
  color: #2563eb;
  margin: 0 0 8px;
  font-size: 26px;
}

.main-result p {
  color: var(--muted);
  margin: 0;
}

.score-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 8px solid #4ade80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-circle strong {
  font-size: 20px;
}

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

.info-grid {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.info-grid div {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.info-grid div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.info-grid div:nth-child(3),
.info-grid div:nth-child(4) {
  border-bottom: none;
}

.info-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.reason-box {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.reason-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reason-header button {
  border: none;
  background: transparent;
  cursor: pointer;
}

.reason-box ul {
  padding-left: 20px;
  color: #475569;
  line-height: 1.8;
}

.reason-box li::marker {
  color: #10b981;
}

#map {
  height: 390px;
  border-radius: 18px;
  overflow: hidden;
  background: #e5e7eb;
}

.map-empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(248, 250, 252, 0.94));
}

.features-section {
  margin-top: 34px;
  text-align: center;
}

.features-section h2 {
  font-size: 24px;
  margin-bottom: 22px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.feature-card div {
  font-size: 30px;
}

.feature-card h3 {
  margin: 12px 0 6px;
  font-size: 17px;
}

.feature-card p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.seo-section,
.faq-section {
  margin-top: 34px;
}

.seo-section {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.seo-section h2,
.faq-section h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.seo-section p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

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

.faq-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.faq-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

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

.footer {
  text-align: center;
  color: var(--muted);
  margin: 36px 0 20px;
  font-size: 14px;
}

.footer p {
  margin: 6px 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  display: none;
  z-index: 999;
}

.guide-modal {
  width: min(680px, calc(100% - 28px));
  border: none;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--text);
}

.guide-modal::backdrop {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
}

.guide-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  padding: 26px;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.guide-header span {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
}

.guide-header h2 {
  margin: 6px 0 0;
  font-size: 26px;
}

.guide-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: #64748b;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.guide-steps {
  list-style: none;
  counter-reset: guide-step;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.guide-steps li {
  counter-increment: guide-step;
  position: relative;
  padding-left: 50px;
}

.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  font-weight: 800;
}

.guide-steps strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}

.guide-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.guide-note {
  margin-top: 22px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  background: rgba(255, 251, 235, 0.9);
  color: #92400e;
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.7;
  font-weight: 700;
}

.payment-modal {
  width: min(560px, calc(100% - 28px));
  border: none;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--text);
}

.payment-modal::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.payment-panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  padding: 26px;
}

.payment-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.payment-header span {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
}

.payment-header h2 {
  margin: 6px 0 0;
  font-size: 24px;
}

.payment-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: #64748b;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.payment-explain {
  margin-top: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(239, 246, 255, 0.76);
}

.payment-explain strong {
  display: block;
  color: #1d4ed8;
  font-size: 16px;
  margin-bottom: 6px;
}

.payment-explain p {
  margin: 0;
  color: #475569;
  line-height: 1.75;
  font-weight: 650;
}

.payment-product {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: rgba(248, 250, 252, 0.82);
}

.payment-product strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.payment-product p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.payment-price {
  color: #2563eb;
  font-size: 26px;
  font-weight: 900;
  white-space: nowrap;
}

.payment-status {
  margin-top: 16px;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  padding: 12px 14px;
  line-height: 1.6;
  font-weight: 700;
}

.payment-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pay-btn,
.check-pay-btn {
  height: 48px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.pay-btn {
  border: none;
  color: white;
  background: linear-gradient(90deg, #1677ff, #2563eb);
}

.check-pay-btn {
  border: 1px solid var(--border);
  color: #111827;
  background: white;
}

.pay-btn:disabled,
.check-pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pay-link {
  display: block;
  margin-top: 14px;
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.payment-tip {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .upload-bottom,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .steps,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .container {
    width: calc(100% - 24px);
    margin-top: 28px;
  }

  .topbar {
    width: calc(100% - 24px);
    align-items: flex-start;
    gap: 12px;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .language-control {
    max-width: 146px;
  }

  .guide-panel {
    padding: 20px;
  }

  .guide-header h2 {
    font-size: 22px;
  }

  .payment-panel {
    padding: 20px;
  }

  .payment-product,
  .payment-actions {
    grid-template-columns: 1fr;
  }

  .payment-product {
    display: grid;
  }
}
