:root {
  --bg: #09070d;
  --bg-soft: #100d16;
  --panel: rgba(20, 16, 28, 0.88);
  --panel-solid: #15111d;
  --panel-raised: #1b1625;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(181, 113, 255, 0.28);
  --text: #f7f3fb;
  --muted: #948b9f;
  --muted-light: #b7afc0;
  --purple: #a855f7;
  --purple-bright: #c678ff;
  --purple-deep: #6d28d9;
  --green: #55d99a;
  --danger: #ff7b91;
  --radius: 22px;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(106, 42, 157, 0.2), transparent 34rem),
    linear-gradient(180deg, #0b080f 0%, var(--bg) 45%, #0b0810 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
[role="button"]:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.12;
  pointer-events: none;
}

.ambient-one {
  top: 30rem;
  left: -20rem;
  background: #7329bd;
}

.ambient-two {
  top: 65rem;
  right: -22rem;
  background: #59208e;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand > span:last-child > span {
  color: var(--purple-bright);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(196, 117, 255, 0.35);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(171, 79, 247, 0.22), rgba(109, 40, 217, 0.08));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 7px 20px rgba(109, 40, 217, 0.2);
}

.brand-mark svg {
  width: 23px;
  fill: none;
  stroke: var(--purple-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(85, 217, 154, 0.08), 0 0 12px rgba(85, 217, 154, 0.5);
}

main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  max-width: 760px;
  margin: 86px auto 74px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--purple-bright);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.19em;
}

.eyebrow > span {
  width: 16px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(46px, 7vw, 74px);
  font-weight: 780;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.hero h1 span {
  background: linear-gradient(100deg, #f0ddff 10%, #bf72ff 54%, #8e43df 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 12px 45px rgba(165, 85, 247, 0.14);
}

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

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 29px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-light);
  font-size: 11px;
}

.hero-pills svg {
  width: 14px;
  fill: none;
  stroke: var(--purple-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(150deg, rgba(24, 19, 33, 0.96), rgba(14, 11, 20, 0.96));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(20px);
}

.workspace::before {
  position: absolute;
  top: -1px;
  left: 24%;
  width: 52%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 124, 255, 0.6), transparent);
  content: "";
}

.tool-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 7px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.tab-button::after {
  position: absolute;
  bottom: -8px;
  left: 25%;
  width: 50%;
  height: 1px;
  background: transparent;
  content: "";
}

.tab-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tab-button:hover {
  color: var(--muted-light);
}

.tab-button.active {
  background: linear-gradient(180deg, rgba(173, 79, 247, 0.12), rgba(173, 79, 247, 0.035));
  color: #d8a4ff;
}

.tab-button.active::after {
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  box-shadow: 0 0 12px var(--purple);
}

.tool-panel {
  padding: 39px 48px 48px;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}

.panel-heading.compact {
  align-items: center;
}

.step-label {
  display: block;
  margin-bottom: 8px;
  color: var(--purple-bright);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.panel-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.panel-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.format-chip {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 176px;
  padding: 26px;
  overflow: hidden;
  border: 1px dashed rgba(180, 111, 240, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.035), transparent 55%),
    rgba(255, 255, 255, 0.012);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dropzone::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(191, 115, 248, 0.1) 0.7px, transparent 0.7px);
  background-size: 16px 16px;
  content: "";
  opacity: 0.3;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: rgba(196, 116, 255, 0.7);
  background-color: rgba(168, 85, 247, 0.05);
}

.dropzone.dragover {
  transform: scale(1.005);
}

.drop-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  margin-right: 18px;
  place-items: center;
  border: 1px solid rgba(190, 112, 255, 0.2);
  border-radius: 15px;
  background: rgba(168, 85, 247, 0.08);
}

.drop-icon svg {
  width: 29px;
  fill: none;
  stroke: var(--purple-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.drop-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
}

.drop-copy strong {
  font-size: 13px;
  font-weight: 620;
}

.drop-copy strong span {
  color: var(--purple-bright);
}

.drop-copy small,
.mini-dropzone small {
  color: var(--muted);
  font-size: 11px;
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.file-preview img {
  width: 58px;
  height: 46px;
  border-radius: 8px;
  background: #0a080d;
  object-fit: cover;
}

.file-preview.small img {
  width: 48px;
  height: 48px;
}

.file-meta {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.file-meta strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta span {
  color: var(--muted);
  font-size: 10px;
}

.icon-button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.icon-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.section-divider {
  height: 1px;
  margin: 34px 0;
  background: linear-gradient(90deg, transparent, var(--line) 9%, var(--line) 91%, transparent);
}

.type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.type-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.type-button.active {
  background: var(--panel-raised);
  color: #d6a1ff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.type-button svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.field-label {
  display: block;
  margin: 22px 0 9px;
  color: var(--muted-light);
  font-size: 11px;
}

.textarea-wrap {
  position: relative;
}

textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 16px 16px 34px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(5, 4, 8, 0.42);
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea::placeholder {
  color: #625a6c;
}

textarea:focus {
  border-color: rgba(184, 100, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.07);
}

.textarea-wrap > span {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #716879;
  font-size: 9px;
}

.mini-dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed rgba(180, 111, 240, 0.25);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
}

.mini-dropzone:hover,
.mini-dropzone.dragover {
  border-color: rgba(196, 116, 255, 0.65);
  background: rgba(168, 85, 247, 0.04);
}

.mini-dropzone > svg {
  width: 27px;
  fill: none;
  stroke: var(--purple-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.mini-dropzone > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.mini-dropzone strong {
  font-size: 12px;
  font-weight: 620;
}

.capacity-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.capacity-row > div:first-child {
  display: flex;
  min-width: 138px;
  flex-direction: column;
  gap: 4px;
}

.capacity-row span {
  color: var(--muted);
  font-size: 9px;
}

.capacity-row strong {
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 580;
}

.capacity-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.capacity-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple-deep), var(--purple-bright));
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  transition: width 240ms ease, background 180ms ease;
}

.capacity-track span.over {
  background: var(--danger);
}

#payload-size {
  min-width: 48px;
  text-align: right;
}

.primary-button {
  position: relative;
  display: grid;
  width: 100%;
  height: 52px;
  margin-top: 27px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(204, 145, 255, 0.25);
  border-radius: 12px;
  background: linear-gradient(100deg, #6f24ba, #a145e5 52%, #7731c2);
  box-shadow: 0 12px 32px rgba(112, 36, 186, 0.24), inset 0 1px rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  transition: filter 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.primary-button::before {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  content: "";
  transform: skewX(-20deg);
  transition: left 450ms ease;
}

.primary-button:not(:disabled):hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.primary-button:not(:disabled):hover::before {
  left: 120%;
}

.primary-button:disabled {
  background: #2a2431;
  box-shadow: none;
  color: #766d80;
  cursor: not-allowed;
  opacity: 0.78;
}

.button-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

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

.primary-button.loading .button-label {
  visibility: hidden;
}

.button-loader {
  position: absolute;
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: white;
  border-radius: 50%;
  animation: rotate 700ms linear infinite;
}

.primary-button.loading .button-loader {
  display: block;
}

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

.result-card {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(87, 220, 156, 0.16);
  border-radius: 16px;
  background: rgba(14, 25, 22, 0.3);
  animation: reveal 340ms ease both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-preview {
  position: relative;
  height: 260px;
  overflow: hidden;
  background:
    linear-gradient(45deg, #17131e 25%, transparent 25%),
    linear-gradient(-45deg, #17131e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #17131e 75%),
    linear-gradient(-45deg, transparent 75%, #17131e 75%);
  background-color: #100d16;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.result-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-preview > span {
  position: absolute;
  right: 13px;
  bottom: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(85, 217, 154, 0.2);
  border-radius: 999px;
  background: rgba(7, 13, 11, 0.82);
  color: #9cefc5;
  font-size: 9px;
  backdrop-filter: blur(9px);
}

.result-preview > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.result-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.result-info h3,
.decode-status h3,
.decoded-header h3,
.decode-error h3 {
  margin: 0;
  font-size: 15px;
}

.result-info p,
.decode-status p,
.decode-error p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid rgba(193, 113, 255, 0.25);
  border-radius: 9px;
  background: rgba(168, 85, 247, 0.09);
  color: #d9abff;
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.download-button:hover {
  border-color: rgba(193, 113, 255, 0.5);
  background: rgba(168, 85, 247, 0.15);
}

.download-button svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.decode-zone {
  min-height: 220px;
}

.decode-status {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 160px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.018);
}

.scan-preview {
  position: relative;
  width: 145px;
  height: 115px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 11px;
  background: #08060b;
}

.scan-preview img {
  width: 100%;
  height: 100%;
  opacity: 0.72;
  object-fit: cover;
}

.scan-line {
  position: absolute;
  top: -10%;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--purple-bright);
  box-shadow: 0 0 15px 3px rgba(168, 85, 247, 0.6);
  animation: scan 1.3s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: 5%; opacity: 0.25; }
  50% { top: 92%; opacity: 1; }
}

.decoded-result {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(85, 217, 154, 0.18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30, 49, 41, 0.24), rgba(20, 17, 26, 0.7));
  animation: reveal 340ms ease both;
}

.decoded-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.success-icon,
.error-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(85, 217, 154, 0.2);
  border-radius: 11px;
  background: rgba(85, 217, 154, 0.08);
  color: var(--green);
}

.success-icon svg,
.error-icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.decoded-header > div:nth-child(2) {
  flex: 1;
}

.decoded-header span:not(.result-type) {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.result-type {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-light);
  font-size: 9px;
}

.decoded-content {
  position: relative;
  margin: 0 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(3, 3, 5, 0.33);
}

.text-result {
  min-height: 110px;
}

.decoded-content pre {
  max-height: 280px;
  margin: 0;
  overflow: auto;
  padding: 17px 60px 17px 17px;
  color: #ddd6e4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #18131f;
  color: var(--muted-light);
  font-size: 9px;
  cursor: pointer;
}

.copy-button:hover {
  color: var(--text);
}

.copy-button svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.image-result {
  padding: 16px;
  text-align: center;
}

.image-result img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  margin: 0 auto 14px;
  border-radius: 8px;
  object-fit: contain;
}

.decoded-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  color: var(--muted);
  font-size: 9px;
}

.decoded-footer button,
.decode-error > button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--purple-bright);
  font-size: 9px;
  cursor: pointer;
}

.decode-error {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 123, 145, 0.16);
  border-radius: 15px;
  background: rgba(67, 25, 35, 0.14);
  animation: reveal 300ms ease both;
}

.error-icon {
  border-color: rgba(255, 123, 145, 0.18);
  background: rgba(255, 123, 145, 0.07);
  color: var(--danger);
}

.decode-error > div:nth-child(2) {
  flex: 1;
}

.how-it-works {
  padding: 150px 0 130px;
}

.section-intro {
  max-width: 580px;
  margin-bottom: 45px;
}

.section-intro h2 {
  margin: 18px 0 13px;
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -0.05em;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

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

.feature-grid article {
  position: relative;
  min-height: 225px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 20, 34, 0.75), rgba(15, 12, 21, 0.72));
}

.feature-grid article::after {
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(180, 102, 247, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.04);
  content: "";
}

.feature-number {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #4d4555;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.feature-grid svg {
  width: 29px;
  margin: 10px 0 32px;
  fill: none;
  stroke: var(--purple-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.feature-grid h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

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

footer {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: #706778;
  font-size: 9px;
}

footer > span {
  text-align: right;
}

.footer-brand {
  font-size: 13px;
}

.footer-brand .brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
}

.footer-brand .brand-mark svg {
  width: 18px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 16px;
  border: 1px solid rgba(194, 119, 255, 0.25);
  border-radius: 10px;
  background: rgba(25, 19, 33, 0.94);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  color: var(--muted-light);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(14px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    padding-top: 18px;
  }

  .hero {
    margin: 64px auto 54px;
  }

  .hero h1 {
    font-size: clamp(43px, 14vw, 61px);
  }

  .tool-panel {
    padding: 30px 22px 28px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .panel-heading.compact {
    align-items: center;
  }

  .format-chip {
    display: none;
  }

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

  .feature-grid article {
    min-height: 190px;
  }

  .how-it-works {
    padding: 100px 0 90px;
  }

  footer {
    grid-template-columns: 1fr auto;
  }

  footer p {
    display: none;
  }
}

@media (max-width: 520px) {
  .header-note {
    font-size: 0;
  }

  .header-note .status-dot {
    margin-right: 3px;
  }

  .hero {
    margin-top: 52px;
  }

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

  .hero-pills span:nth-child(3) {
    display: none;
  }

  .workspace {
    border-radius: 18px;
  }

  .tool-tabs {
    padding: 5px;
  }

  .tab-button {
    height: 47px;
  }

  .tool-panel {
    padding: 27px 16px 22px;
  }

  .panel-heading.compact {
    display: block;
  }

  .type-switch {
    width: 100%;
    margin-top: 16px;
  }

  .type-button {
    justify-content: center;
  }

  .dropzone {
    min-height: 185px;
    flex-direction: column;
  }

  .drop-icon {
    margin: 0 0 13px;
  }

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

  .capacity-row {
    grid-template-columns: 1fr auto;
  }

  .capacity-track {
    grid-row: 2;
    grid-column: 1 / 3;
  }

  .result-preview {
    height: 210px;
  }

  .result-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-button {
    width: 100%;
  }

  .decode-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-preview {
    width: 100%;
    height: 150px;
  }

  .decoded-header {
    align-items: flex-start;
  }

  .result-type {
    margin-left: auto;
  }

  .decoded-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .decode-error {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .decode-error > button {
    margin-left: 53px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
