:root {
  --bg: #07111f;
  --paper: rgba(10, 24, 43, 0.76);
  --panel: rgba(12, 33, 58, 0.78);
  --ink: #eaf4ff;
  --muted: #98abc4;
  --line: rgba(126, 164, 210, 0.18);
  --primary: #ff8a5b;
  --primary-dark: #ffb38f;
  --success: #29c38a;
  --warning: #ffbd59;
  --danger: #ff6b7a;
  --shadow: 0 28px 80px rgba(2, 8, 18, 0.42);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  position: relative;
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 138, 91, 0.22), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(89, 221, 184, 0.16), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(61, 115, 255, 0.18), transparent 36%),
    linear-gradient(140deg, #04101d 0%, #0a1d33 48%, #102845 100%);
  font-family: "Avenir Next", "Trebuchet MS", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  padding: 32px 18px 48px;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -140px;
  left: -120px;
  width: 360px;
  height: 360px;
  border-radius: 32% 68% 55% 45%;
  background: radial-gradient(circle, rgba(255, 138, 91, 0.32), rgba(255, 138, 91, 0));
  filter: blur(8px);
}

body::after {
  right: -120px;
  bottom: 40px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(92, 232, 189, 0.18), transparent 42%),
    radial-gradient(circle at 70% 70%, rgba(92, 141, 255, 0.2), transparent 38%);
  filter: blur(6px);
}

button,
select,
textarea {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.tool-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(11, 29, 51, 0.92), rgba(15, 43, 74, 0.82)),
    linear-gradient(120deg, rgba(255, 138, 91, 0.14), rgba(92, 232, 189, 0.1));
  border-radius: var(--radius-xl);
  padding: 34px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 91, 0.2), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 52rem;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.75;
}

.hero-panel {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(8, 19, 34, 0.96), rgba(9, 28, 50, 0.96));
  border-radius: var(--radius-xl);
  padding: 22px;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background:
    linear-gradient(120deg, rgba(255, 138, 91, 0.1), rgba(92, 232, 189, 0.08)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.stat-card span {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.03em;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff6ee;
}

.tool-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    var(--paper);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  padding: 22px;
}

.notice-bar {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(255, 138, 91, 0.14), rgba(61, 115, 255, 0.08));
  border: 1px solid rgba(255, 179, 143, 0.22);
}

.notice-bar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

code {
  padding: 0.15em 0.45em;
  border-radius: 999px;
  background: rgba(255, 138, 91, 0.12);
  color: var(--primary-dark);
}

.toolbar,
.action-bar,
.status-panel,
.batch-card {
  margin-top: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.toolbar-group {
  display: grid;
  gap: 8px;
}

.toolbar-group--grow {
  flex: 1 1 320px;
}

.field-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

select,
.chip,
.btn {
  border: 0;
  border-radius: 14px;
}

select {
  min-width: 172px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(8, 22, 39, 0.82);
  border: 1px solid rgba(126, 164, 210, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 14px;
  color: #ffd6c2;
  background: linear-gradient(135deg, rgba(255, 138, 91, 0.14), rgba(13, 31, 53, 0.92));
  border: 1px solid rgba(255, 138, 91, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.chip:hover,
.chip:focus-visible,
.btn:hover,
.btn:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(4, 13, 25, 0.28);
}

.chip:hover,
.chip:focus-visible {
  border-color: rgba(255, 179, 143, 0.42);
  background: linear-gradient(135deg, rgba(255, 138, 91, 0.22), rgba(13, 31, 53, 0.96));
}

.editor-wrap {
  margin-top: 18px;
}

textarea {
  width: 100%;
  min-height: 440px;
  resize: vertical;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid rgba(126, 164, 210, 0.18);
  background:
    linear-gradient(180deg, rgba(4, 16, 29, 0.96), rgba(7, 24, 43, 0.98)),
    linear-gradient(90deg, rgba(255, 138, 91, 0.05), rgba(92, 232, 189, 0.04));
  color: #dff0ff;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

textarea::placeholder {
  color: rgba(152, 171, 196, 0.72);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.batch-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 41, 51, 0.1);
}

.batch-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.batch-head .field-label {
  display: block;
  margin-bottom: 6px;
}

.batch-text,
.batch-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.batch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.upload-box {
  min-width: 240px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(20, 108, 148, 0.3);
  background: rgba(20, 108, 148, 0.05);
  color: var(--primary-dark);
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.btn {
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  box-shadow: 0 14px 28px rgba(1, 10, 20, 0.34);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.btn-primary { background: linear-gradient(135deg, #ff7f50, #ff9b73); }
.btn-success { background: linear-gradient(135deg, #18b779, #34d49a); color: #052119; }
.btn-warning { background: linear-gradient(135deg, #ffb13d, #ffd16d); color: #382100; }
.btn-danger { background: linear-gradient(135deg, #f85a76, #ff7f8f); }
.btn-muted { background: linear-gradient(135deg, #24415f, #365a81); }

.status-panel {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--panel);
  border: 1px solid rgba(126, 164, 210, 0.14);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7d96b5;
  box-shadow: 0 0 0 5px rgba(125, 150, 181, 0.15);
}

.status-dot.is-ready {
  background: #29c38a;
  box-shadow: 0 0 0 5px rgba(41, 195, 138, 0.18);
}

.status-dot.is-busy {
  background: #ffbd59;
  box-shadow: 0 0 0 5px rgba(255, 189, 89, 0.16);
}

.status-dot.is-error {
  background: #ff6b7a;
  box-shadow: 0 0 0 5px rgba(255, 107, 122, 0.16);
}

.status-meta {
  color: var(--muted);
  line-height: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  body {
    padding: 18px 12px 28px;
  }

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

  .hero-copy,
  .hero-panel,
  .tool-card {
    border-radius: 24px;
  }

  .hero-copy,
  .tool-card {
    padding: 20px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  textarea {
    min-height: 360px;
    padding: 16px;
  }
}
