:root {
  --bg-0: #070b16;
  --bg-1: #0b1324;
  --bg-2: #121c31;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --glass-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: rgba(245, 249, 255, 0.96);
  --muted: rgba(214, 225, 244, 0.72);
  --accent: #79b8ff;
  --accent-2: #9ed0ff;
  --accent-3: rgba(137, 199, 255, 0.28);
  --ok: #7de2b7;
  --warn: #ffd37a;
  --err: #ff978d;
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.18);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --blur: 18px;
  --blur-soft: 10px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 12% 14%, rgba(122, 182, 255, 0.28), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.11), transparent 16%),
    radial-gradient(circle at 50% 100%, rgba(84, 140, 255, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 38%, var(--bg-0) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.hero {
  position: relative;
  margin-bottom: 26px;
  padding: 22px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  overflow: hidden;
}

.hero::before,
.hero::after,
.card::before,
.card::after,
.hero-note::before,
.hero-note::after,
.tool-switch-wrap::before,
.tool-switch-wrap::after,
.tool-switch button::before,
.tool-switch button::after,
.result-card::before,
.result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before,
.card::before,
.hero-note::before,
.tool-switch-wrap::before,
.result-card::before {
  background:
    radial-gradient(circle at var(--mx, 20%) var(--my, 0%), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  mix-blend-mode: screen;
  opacity: 0.42;
}

.hero::after,
.card::after,
.hero-note::after,
.tool-switch-wrap::after,
.result-card::after {
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.16);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 1px;
  opacity: 0.45;
}

.hero-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(241, 248, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dff1ff, #77bdff);
  box-shadow: 0 0 18px rgba(121, 184, 255, 0.8);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: end;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5.8vw, 52px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-weight: 750;
  color: rgba(249, 252, 255, 0.98);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-copy {
  max-width: 54ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-note {
  position: relative;
  display: grid;
  gap: 8px;
  align-self: stretch;
  padding: 16px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--blur)) saturate(125%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(125%);
  transition: box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.hero-note strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 248, 255, 0.94);
}

.hero-note span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tool-switch-wrap {
  position: relative;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  overflow: hidden;
}

.tool-switch {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: block;
  margin: 0 0 10px;
  color: rgba(247, 250, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.tool-switch button {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 13px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  color: rgba(223, 233, 248, 0.86);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.28;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
}

.tool-switch button::before {
  background:
    radial-gradient(circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 46%);
  opacity: 0.32;
}

.tool-switch button::after {
  inset: 1px;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.tool-switch button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(248, 252, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 22px rgba(0, 0, 0, 0.16);
  filter: none;
}

.tool-switch button[aria-pressed="true"] {
  border-color: rgba(184, 225, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(151, 210, 255, 0.20), rgba(112, 167, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(55, 112, 212, 0.16);
}

.card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--blur)) saturate(125%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(125%);
  overflow: hidden;
  transition: box-shadow 240ms ease, border-color 240ms ease, background-color 240ms ease;
}

.card:hover,
.hero-note:hover,
.result-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tool-panel.is-hidden {
  display: none;
}

input[type="file"],
input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--blur-soft)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--blur-soft)) saturate(120%);
}

input[type="file"] {
  padding: 16px;
  cursor: pointer;
}

input[type="text"],
input[type="number"],
textarea,
select {
  padding: 15px 18px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, transform 180ms ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: rgba(157, 209, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(121, 184, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.07);
}

select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e9f4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

textarea {
  min-height: 164px;
  resize: vertical;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  margin: 10px 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(155, 212, 255, 0.56), rgba(255, 255, 255, 0.12));
  outline: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(193, 222, 255, 0.7));
  box-shadow: 0 10px 20px rgba(84, 156, 255, 0.28);
  appearance: none;
  cursor: pointer;
}

input[type="range"]:disabled::-webkit-slider-thumb {
  opacity: 0.55;
  cursor: not-allowed;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  margin-top: 18px;
}

.col {
  min-width: 0;
}

button:not(.tool-switch button):not(.icon-button) {
  width: 100%;
  margin-top: 22px;
  padding: 15px 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(175, 221, 255, 0.20), rgba(84, 152, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(179, 225, 255, 0.22);
  color: #f6fbff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 22px rgba(43, 97, 183, 0.16);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease, border-color 220ms ease;
}

button:not(.tool-switch button):not(.icon-button):hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(200, 234, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(47, 104, 196, 0.18);
  filter: none;
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(218, 227, 242, 0.52);
  box-shadow: none;
}

.icon-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.icon-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

.hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

code {
  padding: 0.15rem 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(236, 247, 255, 0.96);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.92em;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.queue-head label {
  margin: 0;
}

.file-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 14px;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.file-queue.is-empty {
  align-items: center;
  color: var(--muted);
}

.file-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(166, 214, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  color: rgba(242, 248, 255, 0.94);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.badge-good {
  color: var(--ok);
}

.badge-medium {
  color: var(--warn);
}

.badge-poor {
  color: var(--err);
}

pre {
  margin: 20px 0 0;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  color: rgba(220, 231, 249, 0.84);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  max-height: 230px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.ok {
  color: var(--ok);
  font-weight: 600;
}

.warn {
  color: var(--warn);
  font-weight: 600;
}

.err {
  color: var(--err);
  font-weight: 600;
}

.result-card {
  position: relative;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(151, 233, 188, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(152, 255, 210, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  text-align: left;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  transition: box-shadow 240ms ease, border-color 240ms ease, background-color 240ms ease;
}

.result-card h3 {
  margin: 0 0 6px;
  color: rgba(215, 255, 233, 0.98);
  font-size: 19px;
}

.result-card p {
  margin: 0 0 18px;
  color: rgba(221, 240, 230, 0.8);
}

.footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(207, 220, 240, 0.68);
  font-size: 12.5px;
  line-height: 1.6;
}

.footer a {
  color: rgba(210, 235, 255, 0.96);
}

a {
  color: inherit;
}

@keyframes liquidFloat {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-3px);
  }
}

.hero,
.hero-note,
.tool-switch-wrap {
  animation: none;
}

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

  .tool-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 18px, 1180px);
    padding: 18px 0 42px;
  }

  .hero {
    padding: 22px 18px 24px;
    border-radius: 32px;
  }

  h1 {
    font-size: clamp(34px, 12vw, 50px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .tool-switch-wrap {
    padding: 10px;
    border-radius: 28px;
  }

  .tool-switch {
    grid-template-columns: 1fr;
  }

  .tool-switch button {
    text-align: center;
  }

  .card,
  .result-card {
    padding: 20px;
    border-radius: 28px;
  }

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

  .queue-head {
    flex-direction: column;
    align-items: stretch;
  }

  .icon-button {
    width: 100%;
    border-radius: 16px;
  }
}
