/* =========================================================
   Filee · GeekHuang Lab
   Direction: spec sheet / blueprint grid, dark studio
   ========================================================= */

:root {
  --bg: #070b14;
  --bg-2: #0b1020;
  --surface: #0d131f;
  --surface-2: #111928;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);
  --grid-line: rgba(148, 178, 222, 0.045);
  --grid-major: rgba(148, 178, 222, 0.075);

  --text: #e7ebf3;
  --text-2: #a3adc1;
  --text-3: #6f7b91;

  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.14);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --ok: #6cc49a;
  --warn: #d9b26a;
  --down: #e07a7a;

  --font-sans: "Inter", "Geist", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", "IBM Plex Mono", "SF Mono", ui-monospace,
    Menlo, Consolas, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 180ms;
  --t-mid: 240ms;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg);
  border-radius: 6px;
  background: var(--line-2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--line-3);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(80% 50% at 50% -10%, rgba(56, 189, 248, 0.09), transparent 70%),
    radial-gradient(60% 40% at 100% 110%, rgba(167, 139, 250, 0.06), transparent 70%);
}

.grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 240px 240px, 240px 240px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.25) 70%, transparent);
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--text-3);
}

/* ---------- top bar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.02));
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand__text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand__sub {
  color: var(--text-3);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  box-shadow: 0 0 0 3px rgba(95, 106, 128, 0.12);
}

.status.is-online {
  color: var(--ok);
}

.status.is-online i {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(108, 196, 154, 0.12);
}

.status.is-offline {
  color: var(--down);
}

.status.is-offline i {
  background: var(--down);
  box-shadow: 0 0 0 3px rgba(224, 122, 122, 0.12);
}

.ghlink {
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: color var(--t-fast) var(--ease);
}

.ghlink:hover {
  color: var(--cyan);
}

/* ---------- layout ---------- */

main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 46px);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 640;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

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

.lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  text-wrap: pretty;
}

/* ---------- panel ---------- */

.panel {
  position: relative;
  padding: clamp(20px, 3.2vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 19, 31, 0.94), rgba(11, 16, 32, 0.94));
  box-shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--line-3);
  border-style: solid;
  pointer-events: none;
}

.corner--tl {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
  border-top-left-radius: var(--radius);
}

.corner--tr {
  top: -1px;
  right: -1px;
  border-width: 1px 1px 0 0;
  border-top-right-radius: var(--radius);
}

.corner--bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 1px 1px;
  border-bottom-left-radius: var(--radius);
}

.corner--br {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
  border-bottom-right-radius: var(--radius);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel__head--mt {
  margin-top: 34px;
}

.panel__head h2 {
  margin: 0;
  color: var(--text-2);
  font-weight: 500;
}

/* ---------- drop zone ---------- */

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 38px 22px;
  border: 1px dashed var(--line-3);
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.025);
  text-align: center;
  transition: border-color var(--t-mid) var(--ease), background var(--t-mid) var(--ease),
    transform var(--t-mid) var(--ease);
}

.drop:hover,
.drop:focus-visible {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 24px 70px -48px rgba(56, 189, 248, 0.7);
  outline: none;
}

.drop.is-drag {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.09);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.24), 0 26px 80px -46px rgba(56, 189, 248, 0.8);
  transform: scale(1.005);
}

.drop__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  color: var(--cyan);
  opacity: 0.9;
}

.drop__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.drop__hint {
  margin: 8px 0 0;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

/* ---------- file list ---------- */

.files {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.files:empty {
  display: none;
}

.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.file__ext {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.file__body {
  min-width: 0;
  flex: 1;
}

.file__name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file__meta {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.file__remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-3);
  line-height: 1;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.file__remove:hover {
  background: rgba(224, 122, 122, 0.1);
  color: var(--down);
}

/* ---------- formats ---------- */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.search:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

.search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--text-3);
}

.search input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.88rem;
}

.search input::placeholder {
  color: var(--text-3);
}

.formats__groups {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.formats.is-empty .search {
  display: none;
}

.format-group__label {
  margin: 0 0 9px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.format-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.chip:hover {
  border-color: var(--line-3);
  color: var(--text);
}

.chip.is-selected {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #04121c;
  font-weight: 600;
}

.chip__engine {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--violet);
}

.chip.is-selected .chip__engine {
  background: #04121c;
  opacity: 0.55;
}

.formats__empty {
  margin: 16px 0 0;
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ---------- action bar ---------- */

.actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.actionbar__meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.actionbar__meta .mono:first-child {
  color: var(--text-2);
  letter-spacing: 0.05em;
  text-transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: var(--cyan);
  color: #04121c;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
    opacity var(--t-fast) var(--ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -12px rgba(56, 189, 248, 0.65);
}

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

.btn:disabled {
  border-color: var(--line-2);
  background: var(--surface-2);
  color: var(--text-3);
  opacity: 0.8;
  cursor: not-allowed;
}

.btn__arrow {
  font-family: var(--font-mono);
  font-size: 14px;
}

/* ---------- progress ---------- */

.progress {
  margin-top: 20px;
}

.progress__bar {
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.progress__bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 220ms var(--ease);
}

.progress__bar i.is-indeterminate {
  width: 38%;
  animation: sweep 1.15s var(--ease) infinite;
}

@keyframes sweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(300%);
  }
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
}

.progress__meta .mono:first-child {
  color: var(--text-2);
  text-transform: none;
  letter-spacing: 0.03em;
}

/* ---------- alert ---------- */

.alert {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(224, 122, 122, 0.32);
  border-radius: var(--radius-sm);
  background: rgba(224, 122, 122, 0.08);
  color: #f0b0b0;
  font-size: 0.85rem;
}

.alert.is-ok {
  border-color: rgba(108, 196, 154, 0.32);
  background: rgba(108, 196, 154, 0.08);
  color: #a9e0c4;
}

/* ---------- results ---------- */

.results {
  margin-top: 22px;
  padding: clamp(20px, 3.2vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.resultList {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.result__state {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.result.is-ok .result__state {
  background: rgba(108, 196, 154, 0.12);
  color: var(--ok);
}

.result.is-error .result__state {
  background: rgba(224, 122, 122, 0.12);
  color: var(--down);
}

.result__body {
  min-width: 0;
  flex: 1;
}

.result__name {
  display: block;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result__meta {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.result__download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.result__download:hover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--cyan);
}

/* ---------- notes ---------- */

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(13, 19, 31, 0.55);
}

.note .mono {
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.note p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px 34px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .topbar {
    padding: 18px 18px;
  }

  .ghlink {
    display: none;
  }

  main {
    padding: 0 18px 56px;
  }

  .hero {
    padding-top: 34px;
  }

  .panel,
  .results {
    padding: 18px;
  }

  .drop {
    min-height: 180px;
    padding: 30px 16px;
  }

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

  .btn {
    justify-content: center;
  }

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

  .footer {
    padding: 18px 18px 28px;
  }
}

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