:root {
  --bg-main: #f8fafc;
  --bg-soft: #eef6ff;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --glass-border: rgba(255, 255, 255, 0.68);

  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --primary-soft: #e0f2fe;

  --mint: #6ee7b7;
  --mint-dark: #10b981;

  --violet: #a78bfa;
  --violet-soft: #ede9fe;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --line: rgba(148, 163, 184, 0.24);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-soft: 0 24px 80px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 14px 36px rgba(15, 23, 42, 0.08);

  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 12%, rgba(125, 211, 252, 0.28), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(167, 139, 250, 0.22), transparent 34%),
    radial-gradient(circle at 48% 88%, rgba(110, 231, 183, 0.18), transparent 38%),
    linear-gradient(135deg, #f8fafc 0%, #eef6ff 46%, #f3f7f4 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.background-glow {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.62;
  pointer-events: none;
}

.glow-a {
  width: 220px;
  height: 220px;
  left: -70px;
  top: 120px;
  background: rgba(56, 189, 248, 0.28);
}

.glow-b {
  width: 260px;
  height: 260px;
  right: -80px;
  top: 260px;
  background: rgba(167, 139, 250, 0.24);
}

.glow-c {
  width: 220px;
  height: 220px;
  left: 40%;
  bottom: -90px;
  background: rgba(110, 231, 183, 0.22);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.glass-panel,
.glass-card,
.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.hero {
  min-height: 460px;
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 34px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 44%),
    radial-gradient(circle at 70% 20%, rgba(56, 189, 248, 0.20), transparent 32%),
    radial-gradient(circle at 30% 90%, rgba(16, 185, 129, 0.14), transparent 36%);
  pointer-events: none;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(224, 242, 254, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 13px;
  font-weight: 750;
}

.eyebrow.small {
  padding: 5px 10px;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--mint-dark));
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.hero h1 {
  margin: 22px 0 14px;
  max-width: 720px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-subtitle {
  margin: 0;
  max-width: 660px;
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-secondary);
  font-weight: 650;
}

.hero-desc {
  margin: 16px 0 0;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  transition: 180ms ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #38bdf8, #10b981);
  box-shadow: 0 14px 34px rgba(56, 189, 248, 0.26);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.24);
}

.btn-ghost {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(148, 163, 184, 0.24);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-2px);
}

.btn.full {
  width: 100%;
}

.icon {
  font-size: 18px;
}

.visual-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26);
}

.visual-header {
  height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot.red {
  background: #fb7185;
}

.window-dot.yellow {
  background: #fbbf24;
}

.window-dot.green {
  background: #34d399;
}

.visual-title {
  margin-left: 8px;
  font-size: 13px;
  color: #cbd5e1;
}

.visual-code {
  margin: 0;
  padding: 22px;
  font-size: 13px;
  line-height: 1.7;
  overflow: auto;
  font-family:
    "JetBrains Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

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

.glass-card {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.input-card h2 {
  margin: 16px 0 8px;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.input-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.card-icon,
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: rgba(224, 242, 254, 0.82);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
}

.card-icon.violet {
  color: #7c3aed;
  background: rgba(237, 233, 254, 0.92);
}

svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-zone {
  min-height: 160px;
  margin-bottom: 14px;
  padding: 24px;
  border-radius: 24px;
  border: 1.5px dashed rgba(56, 189, 248, 0.42);
  background: rgba(240, 249, 255, 0.58);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  transition: 180ms ease;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: rgba(56, 189, 248, 0.78);
  background: rgba(224, 242, 254, 0.78);
  transform: translateY(-2px);
}

.upload-zone input {
  display: none;
}

.upload-main {
  font-size: 17px;
  font-weight: 850;
}

.upload-sub,
.upload-file,
.hint {
  color: var(--text-muted);
  font-size: 13px;
}

.upload-file {
  max-width: 100%;
  word-break: break-all;
}

.url-input {
  width: 100%;
  min-height: 52px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
  transition: 160ms ease;
}

.url-input:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.20);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.feature-card {
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.feature-card h3 {
  margin: 15px 0 7px;
  font-size: 17px;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.result-section {
  margin-top: 20px;
  border-radius: var(--radius-xl);
  padding: 24px;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.result-header h2 {
  margin: 12px 0 4px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

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

.status-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.processing {
  background: rgba(224, 242, 254, 0.86);
  color: var(--primary-dark);
}

.status-pill.success {
  background: rgba(209, 250, 229, 0.86);
  color: #047857;
}

.status-pill.error {
  background: rgba(254, 226, 226, 0.86);
  color: #b91c1c;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.stat-card span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 4px;
}

.stat-card strong {
  display: block;
  font-size: 21px;
  line-height: 1.2;
  word-break: break-word;
}

.panels-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 14px;
}

.code-panel {
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.panel-title {
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 850;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.mini-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 850;
  transition: 160ms ease;
}

.mini-btn:hover {
  background: white;
  transform: translateY(-1px);
}

.mini-btn.primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #38bdf8, #10b981);
}

pre {
  margin: 0;
  min-height: 330px;
  max-height: 540px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
  font-family:
    "JetBrains Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

.footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .input-grid,
  .panels-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .hero,
  .result-section {
    border-radius: 26px;
    padding: 22px;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .features,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .result-header {
    flex-direction: column;
  }

  .status-pill {
    align-self: flex-start;
  }

  pre {
    max-height: 420px;
  }
}
