/* ============ 基础 ============ */
:root {
  --bg: #070910;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --ink: #eef1fa;
  --ink-soft: #a0a8c2;
  --ink-faint: #6a7391;
  --violet: #7c5cf6;
  --purple: #a855f7;
  --sky: #38bdf8;
  --grad: linear-gradient(135deg, #7c5cf6 0%, #a855f7 55%, #c084fc 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 246, 0.16), rgba(168, 85, 247, 0.1));
  --success: #34d399;
  --danger: #f87171;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --glow: 0 12px 40px rgba(124, 92, 246, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(124, 92, 246, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3a3f5c, #292d46);
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-track { background: transparent; }

.container {
  width: min(1000px, 92%);
  margin: 0 auto;
}

/* ============ 顶部光带与背景装饰 ============ */
.top-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 80;
  background: var(--grad);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

.bg-decoration {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.32;
  will-change: transform;
}

.orb-1 {
  width: 540px;
  height: 540px;
  background: #4f46e5;
  top: -200px;
  left: -140px;
  animation: drift1 20s ease-in-out infinite alternate;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: #7c3aed;
  top: 18%;
  right: -180px;
  opacity: 0.26;
  animation: drift2 26s ease-in-out infinite alternate;
}

.orb-3 {
  width: 420px;
  height: 420px;
  background: #0ea5e9;
  bottom: -160px;
  left: 28%;
  opacity: 0.18;
  animation: drift3 32s ease-in-out infinite alternate;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 85% 62% at 50% 0%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 62% at 50% 0%, #000 8%, transparent 72%);
}

@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, 70px) scale(1.18); }
}

@keyframes drift2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-80px, 100px) scale(1.12); }
}

@keyframes drift3 {
  from { transform: translate(0, 0); }
  to { transform: translate(130px, -60px); }
}

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 16, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--glow);
}

.brand-icon svg { width: 20px; height: 20px; }

.brand .arrow {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 4px;
}

.nav { display: flex; gap: 26px; }

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* ============ 首屏 ============ */
.hero {
  padding: 76px 0 34px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  animation: fadeUp 0.7s 0.05s ease both;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2.2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeUp 0.7s 0.12s ease both;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 42px;
  animation: fadeUp 0.7s 0.2s ease both;
}

.subtitle strong { color: var(--ink); font-weight: 600; }

/* ============ 拖拽上传区 ============ */
.drop-zone {
  position: relative;
  max-width: 660px;
  margin: 0 auto;
  background:
    linear-gradient(165deg, rgba(124, 92, 246, 0.1), rgba(168, 85, 247, 0.05) 45%, rgba(56, 189, 248, 0.05)),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 54px 24px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  outline: none;
  animation: fadeIn 0.7s 0.3s ease both;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.75), rgba(168, 85, 247, 0.22) 40%, rgba(56, 189, 248, 0.35) 80%, rgba(139, 92, 246, 0.75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.85;
  transition: opacity 0.25s;
  pointer-events: none;
}

.drop-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 30%), rgba(139, 92, 246, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.drop-inner { position: relative; z-index: 1; }

.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--glow);
}

.drop-zone:focus-visible { outline: 2px solid rgba(139, 92, 246, 0.7); outline-offset: 3px; }
.drop-zone:hover::after,
.drop-zone.dragover::after,
.drop-zone:hover::before,
.drop-zone.dragover::before { opacity: 1; }

.drop-zone.dragover {
  border-color: var(--purple);
  transform: scale(1.015);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.16), var(--shadow), var(--glow);
}

.drop-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--glow);
  animation: float 4.5s ease-in-out infinite;
  transition: transform 0.2s;
}

.drop-icon svg { width: 32px; height: 32px; }

.drop-zone.dragover .drop-icon { animation: bounce 0.55s ease; }

.drop-title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }

.drop-sub { color: var(--ink-soft); font-size: 14px; }

.link-like {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.hint {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-faint);
  animation: fadeUp 0.7s 0.42s ease both;
}

/* ============ 转换结果列表 ============ */
.results { padding: 20px 0 56px; }

.empty-hint {
  text-align: center;
  color: var(--ink-faint);
  font-size: 14px;
  padding: 30px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  animation: fadeUp 0.45s ease both;
}

.file-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.file-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: #c4b5fd;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.file-icon svg { width: 22px; height: 22px; }

.file-info { flex: 1; min-width: 0; }

.file-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status.pending { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.status.pending::before { background: #94a3b8; animation: pulse 1.6s ease-in-out infinite; }
.status.done { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.status.done::before { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status.error { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.status.error::before { background: var(--danger); }

.progress-wrap {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--grad);
  position: relative;
  overflow: hidden;
  transition: width 0.3s ease;
}

.progress-bar:not(.indeterminate)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 1.4s linear infinite;
}

.progress-bar.indeterminate {
  width: 40%;
  animation: slide 1.1s ease-in-out infinite;
}

/* ============ 按钮 ============ */
.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 92, 246, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 38px rgba(124, 92, 246, 0.5);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: var(--ink-faint);
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface-strong);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.11);
}

.btn-download {
  background: var(--grad-soft);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8ccff;
  flex-shrink: 0;
}

.btn-download:hover {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
}

.btn-download:disabled {
  opacity: 0.45;
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--ink-faint);
  box-shadow: none;
  cursor: not-allowed;
}

/* ============ 内容区块 ============ */
.section { padding: 66px 0; }

.section h2 {
  text-align: center;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.section-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 36px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 2px;
  background: var(--grad);
  border-radius: 0 0 6px 6px;
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: var(--shadow);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--glow);
  margin-bottom: 16px;
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 16px; margin-bottom: 8px; }

.card p { font-size: 14px; color: var(--ink-soft); }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 18px;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.steps li:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.4);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
  box-shadow: var(--glow);
}

.steps h3 { font-size: 16px; margin-bottom: 6px; }

.steps p { font-size: 14px; color: var(--ink-soft); }

.faq { max-width: 780px; margin: 0 auto; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 20px;
  margin-bottom: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s, background 0.2s;
}

details:hover { border-color: var(--border-strong); background: var(--surface-strong); }

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: #c4b5fd;
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: transform 0.25s, background 0.25s, color 0.25s;
}

details[open] summary::after {
  transform: rotate(45deg);
  background: var(--grad);
  color: #fff;
}

details p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ============ 提示气泡 ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: rgba(20, 23, 38, 0.88);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 60;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============ 动画与显现 ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.revealed {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes bounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.14) translateY(-4px); }
  70% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .nav { display: none; }
  .hero { padding-top: 48px; }
  .drop-zone { padding: 38px 16px; }
  .file-item { flex-wrap: wrap; }
  .btn-download { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; text-align: center; }
  .toolbar-right { display: flex; justify-content: center; gap: 10px; }
}

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