﻿:root {
  --bg-main: #050915;
  --bg-ink: #040712;
  --bg-card: rgba(10, 16, 32, 0.74);
  --bg-card-strong: rgba(9, 14, 28, 0.92);
  --radius-panel: 26px;
  --line: rgba(111, 146, 213, 0.24);
  --line-soft: rgba(111, 146, 213, 0.14);
  --text-main: #edf3ff;
  --text-dim: #95aacf;
  --text-eyebrow: #65d4ff;
  --accent-warm-a: #ffcc78;
  --accent-warm-b: #ff8464;
  --accent-warm-c: #ff5f83;
  --accent-cool: #5fe0ff;
  --ok: #7ee7af;
  --warn: #ffd38a;
  --danger: #ff809e;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
}

body {
  position: relative;
  overflow-x: hidden;
}

body.lang-zh {
  --font-display: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body.theme-light {
  --bg-main: #edf3fb;
  --bg-ink: #f8fbff;
  --bg-card: rgba(255, 255, 255, 0.84);
  --bg-card-strong: rgba(255, 255, 255, 0.95);
  --line: rgba(120, 145, 188, 0.24);
  --line-soft: rgba(120, 145, 188, 0.14);
  --text-main: #152746;
  --text-dim: #5b7399;
  --text-eyebrow: #2f6dd8;
  --accent-warm-a: #ffc98c;
  --accent-warm-b: #ff9c84;
  --accent-warm-c: #ff7e9f;
  --accent-cool: #4fb6eb;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(4, 7, 14, 0) 0%, rgba(3, 6, 12, 0.7) 72%, rgba(2, 4, 9, 0.95) 100%);
}

body.theme-light::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(243, 248, 255, 0.56) 70%, rgba(233, 241, 254, 0.9) 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(71, 104, 171, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 104, 171, 0.18) 1px, transparent 1px);
  background-size: 58px 58px;
}

body.theme-light .bg-grid {
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(142, 166, 207, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 166, 207, 0.2) 1px, transparent 1px);
}

.bg-glow {
  background:
    radial-gradient(680px 430px at 12% -8%, rgba(255, 123, 76, 0.28), rgba(255, 123, 76, 0) 72%),
    radial-gradient(580px 360px at 77% 2%, rgba(78, 220, 255, 0.24), rgba(78, 220, 255, 0) 72%),
    radial-gradient(920px 700px at 62% 94%, rgba(22, 59, 133, 0.36), rgba(22, 59, 133, 0) 70%);
  animation: driftGlow 18s ease-in-out infinite alternate;
}

body.theme-light .bg-glow {
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(255, 180, 136, 0.48), rgba(255, 180, 136, 0) 74%),
    radial-gradient(620px 360px at 78% 2%, rgba(126, 214, 255, 0.34), rgba(126, 214, 255, 0) 72%),
    radial-gradient(980px 720px at 62% 96%, rgba(168, 191, 240, 0.38), rgba(168, 191, 240, 0) 72%);
}

.bg-rings {
  opacity: 0.24;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 92% 56%, rgba(145, 166, 216, 0.13), transparent 55%),
    repeating-radial-gradient(circle at 81% 78%, rgba(103, 127, 187, 0.09), rgba(103, 127, 187, 0.09) 8px, transparent 8px, transparent 30px);
}

body.theme-light .bg-rings {
  opacity: 0.2;
  mix-blend-mode: normal;
  background:
    radial-gradient(circle at 92% 56%, rgba(125, 152, 201, 0.18), transparent 55%),
    repeating-radial-gradient(circle at 81% 78%, rgba(123, 150, 205, 0.1), rgba(123, 150, 205, 0.1) 8px, transparent 8px, transparent 30px);
}

.bg-noise {
  opacity: 0.08;
  background-image: radial-gradient(rgba(198, 210, 243, 0.34) 0.7px, transparent 0.7px);
  background-size: 3px 3px;
}

body.theme-light .bg-noise {
  opacity: 0.03;
}

.wireframe {
  overflow: hidden;
}

.wire {
  position: absolute;
  border: 1px solid rgba(90, 123, 186, 0.2);
  border-radius: 28px;
  opacity: 0.42;
}

body.theme-light .wire {
  border-color: rgba(128, 152, 196, 0.26);
  opacity: 0.38;
}

.wire-a {
  width: 52vw;
  height: 14vw;
  left: 4vw;
  top: 24vw;
  transform: rotate(-10deg);
}

.wire-b {
  width: 35vw;
  height: 10vw;
  right: -5vw;
  top: 34vw;
  transform: rotate(24deg);
}

.wire-c {
  width: 42vw;
  height: 11vw;
  right: 13vw;
  top: 58vw;
  transform: rotate(8deg);
}

.topbar,
.studio-grid {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  padding: 18px 22px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(5, 10, 21, 0.84), rgba(5, 10, 21, 0.42));
}

body.theme-light .topbar {
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.92), rgba(249, 252, 255, 0.62));
  border-bottom: 1px solid rgba(120, 145, 188, 0.2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle,
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(163, 185, 232, 0.28);
  background: rgba(14, 23, 41, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(2, 8, 22, 0.45);
}

.lang-option,
.theme-option {
  position: relative;
  z-index: 2;
  min-width: 54px;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #a7bddf;
  transition: color 140ms ease;
}

.theme-option {
  border: 0;
  background: transparent;
  appearance: none;
  font-family: var(--font-body);
  cursor: pointer;
}

.lang-option.active,
.theme-option.active {
  color: #081b34;
  background: linear-gradient(135deg, #f7fbff, #bfd6ff);
  box-shadow: 0 8px 18px rgba(113, 174, 255, 0.35);
}

.lang-option:not(.active):hover,
.theme-option:not(.active):hover {
  color: #d9e7ff;
}

body.theme-light .lang-toggle,
body.theme-light .theme-toggle {
  border-color: rgba(109, 133, 178, 0.3);
  background: rgba(248, 251, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 26px rgba(126, 150, 191, 0.2);
}

body.theme-light .lang-option,
body.theme-light .theme-option {
  color: #55709d;
}

body.theme-light .lang-option.active,
body.theme-light .theme-option.active {
  color: #102746;
  background: linear-gradient(135deg, #ffffff, #d8e8ff);
  box-shadow: 0 8px 16px rgba(131, 164, 216, 0.3);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #0a172b;
  background: linear-gradient(130deg, #7ad4ff, #50f0c6);
  box-shadow: 0 16px 34px rgba(62, 208, 255, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.state-pill {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 34, 0.85);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.theme-light .state-pill {
  background: rgba(247, 251, 255, 0.94);
  border-color: rgba(121, 146, 192, 0.28);
}

.state-pill.idle {
  color: var(--text-dim);
}

.state-pill.running {
  color: #082038;
  background: linear-gradient(120deg, #8cd7ff, #6bffcf);
  border-color: transparent;
}

.state-pill.success {
  color: #062919;
  background: linear-gradient(120deg, #9dffc4, #74e6a6);
  border-color: transparent;
}

.state-pill.failed {
  color: #390b16;
  background: linear-gradient(120deg, #ff9db1, #ff7b97);
  border-color: transparent;
}

.studio-grid {
  max-width: 1700px;
  margin: 0 auto;
  padding: 10px 14px 20px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(169, 191, 240, 0.18),
    inset 0 -24px 60px rgba(4, 9, 20, 0.3),
    0 24px 68px rgba(2, 7, 19, 0.58);
  animation: panelRise 520ms ease both;
}

body.theme-light .panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -24px 60px rgba(207, 223, 250, 0.22),
    0 22px 52px rgba(130, 155, 201, 0.18);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(92, 146, 242, 0.14), rgba(92, 146, 242, 0) 35%, rgba(255, 128, 98, 0.11) 100%),
    radial-gradient(460px 220px at 100% 0%, rgba(104, 213, 255, 0.14), rgba(104, 213, 255, 0) 74%);
}

body.theme-light .panel::before {
  background:
    linear-gradient(140deg, rgba(110, 158, 240, 0.12), rgba(110, 158, 240, 0) 35%, rgba(255, 161, 121, 0.1) 100%),
    radial-gradient(460px 220px at 100% 0%, rgba(112, 203, 241, 0.12), rgba(112, 203, 241, 0) 74%);
}

.panel::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(116, 151, 219, 0), rgba(116, 151, 219, 0.62), rgba(116, 151, 219, 0));
  pointer-events: none;
}

body.theme-light .panel::after {
  background: linear-gradient(90deg, rgba(132, 162, 214, 0), rgba(132, 162, 214, 0.52), rgba(132, 162, 214, 0));
}

@media (hover: hover) {
  .panel {
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  }

  .panel:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 165, 241, 0.34);
    box-shadow:
      inset 0 1px 0 rgba(169, 191, 240, 0.22),
      inset 0 -24px 60px rgba(4, 9, 20, 0.34),
      0 30px 74px rgba(3, 8, 20, 0.64);
  }
}

.eyebrow {
  margin: 0;
  color: var(--text-eyebrow);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-panel {
  grid-column: span 7;
  min-height: 330px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-panel h1 {
  margin: 10px 0 0;
  max-width: 760px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 18px 0 0;
  max-width: 640px;
  color: #a9bcdf;
  font-size: 1.02rem;
  line-height: 1.54;
}

.hero-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #cad8f4;
  background: rgba(13, 22, 42, 0.72);
}

body.theme-light .hero-tags span {
  color: #36527d;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(129, 155, 202, 0.34);
}

.hero-strip {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-strip article {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(11, 20, 38, 0.74);
}

body.theme-light .hero-strip article {
  background: rgba(250, 253, 255, 0.9);
  border-color: rgba(129, 155, 202, 0.24);
}

.hero-strip span {
  display: block;
  color: #8ea7d1;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.theme-light .hero-strip span {
  color: #6d85ad;
}

.hero-strip strong {
  margin-top: 6px;
  display: block;
  color: #ebf2ff;
  font-size: 0.9rem;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

body.theme-light .hero-strip strong {
  color: #1b3458;
}

.hero-side {
  grid-column: span 5;
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr;
}

.download-panel {
  padding: 20px;
  min-height: 186px;
}

.download-path {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--line-soft);
  color: #d6e2ff;
  background: rgba(14, 23, 41, 0.86);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.34;
  word-break: break-all;
}

body.theme-light .download-path {
  background: rgba(252, 255, 255, 0.86);
  color: #3d557e;
}

.download-note {
  margin: 8px 0 0;
  color: #95abd1;
  font-size: 0.8rem;
}

.download-actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.download-actions .btn {
  min-height: 44px;
}

.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mini-card {
  padding: 16px;
  min-height: 150px;
}

.mini-card h3 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.1;
}

.mini-card p:last-child {
  margin: 10px 0 0;
  color: #9cb2d8;
  font-size: 0.9rem;
  line-height: 1.48;
}

body.theme-light .mini-card p:last-child {
  color: #5f7aa4;
}

.form-panel {
  grid-column: span 8;
  padding: 20px;
}

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

.panel-head h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 2.05rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.panel-note {
  margin: 8px 0 0;
  max-width: 300px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #9fb2d8;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.theme-light label {
  color: #6782ab;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(9, 18, 35, 0.9);
  color: var(--text-main);
  padding: 11px 13px;
  font-size: 0.93rem;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

body.theme-light input,
body.theme-light select {
  background: rgba(255, 255, 255, 0.92);
  color: #1a2e4f;
}

input[type="date"] {
  color-scheme: dark;
}

body.theme-light input[type="date"] {
  color-scheme: light;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.88;
  cursor: pointer;
  filter: invert(83%) sepia(10%) saturate(575%) hue-rotate(183deg) brightness(106%) contrast(95%);
}

body.theme-light input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.7;
  filter: invert(33%) sepia(16%) saturate(708%) hue-rotate(177deg) brightness(95%) contrast(90%);
}

input:hover,
select:hover {
  border-color: rgba(129, 170, 245, 0.34);
}

body.theme-light input:hover,
body.theme-light select:hover {
  border-color: rgba(111, 150, 220, 0.42);
}

input:focus,
select:focus {
  border-color: rgba(120, 206, 255, 0.64);
  box-shadow: 0 0 0 2px rgba(71, 194, 255, 0.18), 0 12px 24px rgba(6, 16, 34, 0.62);
  transform: translateY(-1px);
  background: rgba(10, 19, 37, 0.96);
}

body.theme-light input:focus,
body.theme-light select:focus {
  border-color: rgba(88, 170, 235, 0.58);
  box-shadow: 0 0 0 2px rgba(89, 175, 238, 0.18), 0 12px 24px rgba(152, 179, 226, 0.25);
  background: #ffffff;
}

.full {
  grid-column: 1 / -1;
}

.analyst-grid {
  margin: 2px 0 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: rgba(9, 17, 32, 0.64);
}

body.theme-light .analyst-grid {
  background: rgba(248, 252, 255, 0.76);
}

.analyst-grid legend {
  color: #c6d6f7;
  padding: 0 6px;
  font-size: 0.79rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.theme-light .analyst-grid legend {
  color: #607ea8;
}

.analyst-grid label {
  flex-direction: row;
  align-items: center;
  color: var(--text-main);
  font-weight: 500;
}

.analyst-grid input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #66d8ff;
}

.action-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.form-hint {
  margin: 0;
  color: #8ea5ce;
  font-size: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.btn {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  padding: 11px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: var(--text-main);
  background: rgba(12, 22, 42, 0.92);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease, border-color 150ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(7, 16, 35, 0.58);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  min-width: 208px;
  border: 0;
  color: #2b0f05;
  background: linear-gradient(115deg, var(--accent-warm-a) 0%, var(--accent-warm-b) 38%, var(--accent-warm-c) 100%);
  box-shadow: 0 18px 40px rgba(255, 111, 123, 0.34);
  animation: pulseButton 3.8s ease-in-out infinite;
}

body.theme-light .btn {
  color: #1f3659;
  background: rgba(246, 250, 255, 0.92);
  border-color: rgba(129, 155, 202, 0.28);
  box-shadow: 0 8px 18px rgba(145, 167, 207, 0.18);
}

body.theme-light .btn:hover:not(:disabled) {
  box-shadow: 0 14px 28px rgba(145, 167, 207, 0.24);
}

body.theme-light .btn.primary {
  color: #3c1708;
  box-shadow: 0 14px 30px rgba(255, 134, 116, 0.26);
}

.btn.subtle {
  width: 100%;
  background: linear-gradient(180deg, rgba(17, 30, 53, 0.9), rgba(12, 21, 39, 0.86));
}

body.theme-light .btn.subtle {
  color: #1e3558;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(236, 243, 255, 0.92));
}

.metrics-panel {
  grid-column: span 4;
  padding: 20px;
}

.metrics-panel h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1.82rem;
  line-height: 1;
}

.metrics-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metrics-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-card-strong);
}

.metrics-grid span {
  display: block;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metrics-grid strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.agent-status-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 356px;
  overflow: auto;
  padding-right: 4px;
}

.agent-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  padding: 8px 10px;
  background: rgba(10, 18, 32, 0.84);
  font-size: 0.82rem;
}

body.theme-light .agent-chip {
  background: rgba(252, 255, 255, 0.9);
  border-color: rgba(129, 155, 202, 0.22);
}

.agent-chip em {
  font-style: normal;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agent-chip em.pending {
  color: var(--warn);
}

.agent-chip em.in_progress {
  color: var(--accent-cool);
}

.agent-chip em.completed {
  color: var(--ok);
}

.agent-chip em.error {
  color: var(--danger);
}

.timeline-panel {
  grid-column: span 4;
  min-height: 500px;
  padding: 20px;
}

.timeline-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}

.timeline-list:empty::before {
  content: "No events yet. Start an analysis to stream execution logs.";
  display: block;
  border: 1px dashed rgba(119, 152, 218, 0.32);
  border-radius: 12px;
  padding: 14px;
  color: #95abd1;
  font-size: 0.83rem;
  line-height: 1.45;
}

body.lang-zh .timeline-list:empty::before {
  content: "暂无事件。启动分析后会实时显示执行日志。";
}

body.theme-light .timeline-list:empty::before {
  border-color: rgba(126, 156, 208, 0.42);
  color: #6380ad;
  background: rgba(250, 253, 255, 0.85);
}

.timeline-item {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(9, 18, 32, 0.86);
  animation: itemIn 220ms ease both;
}

body.theme-light .timeline-item {
  background: rgba(252, 255, 255, 0.86);
}

body.theme-light .timeline-meta {
  color: #6a84b1;
}

body.theme-light .timeline-item p {
  color: #27436e;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  color: #90a7d3;
  font-size: 0.71rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.timeline-item p {
  margin: 0;
  color: #dfebff;
  line-height: 1.44;
  white-space: pre-wrap;
  font-size: 0.83rem;
}

.report-panel {
  grid-column: span 8;
  min-height: 500px;
  padding: 20px;
}

.report-meta {
  color: #9fb3d9;
  font-size: 0.82rem;
}

body.theme-light .report-meta {
  color: #6782ac;
}

.report-nav {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-nav button {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(10, 20, 38, 0.92);
  color: #d6e5ff;
  cursor: pointer;
  font-size: 0.78rem;
  transition: border-color 140ms ease, transform 140ms ease, background-color 140ms ease;
}

body.theme-light .report-nav button {
  background: rgba(250, 253, 255, 0.92);
  color: #35517a;
  border-color: rgba(129, 155, 202, 0.26);
}

.report-nav button:hover {
  border-color: rgba(102, 196, 255, 0.58);
  transform: translateY(-1px);
}

body.theme-light .report-nav button:hover {
  border-color: rgba(86, 156, 233, 0.52);
}

.report-nav button.active {
  border-color: rgba(255, 160, 121, 0.65);
  background: linear-gradient(130deg, rgba(255, 145, 104, 0.24), rgba(78, 182, 255, 0.12));
  color: #fff0ea;
}

body.theme-light .report-nav button.active {
  border-color: rgba(251, 148, 110, 0.5);
  background: linear-gradient(130deg, rgba(255, 164, 132, 0.3), rgba(123, 191, 255, 0.22));
  color: #17345b;
}

.report-content {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(8, 15, 29, 0.9);
  padding: 16px;
  min-height: 350px;
  flex: 1;
  overflow: auto;
  line-height: 1.58;
}

body.theme-light .report-content {
  background: rgba(255, 255, 255, 0.88);
}

body.theme-light .report-content h1,
body.theme-light .report-content h2,
body.theme-light .report-content h3 {
  color: #1b3459;
}

.report-content h1,
.report-content h2,
.report-content h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.report-content p,
.report-content li {
  color: #d8e5fe;
}

body.theme-light .report-content p,
body.theme-light .report-content li {
  color: #2e466c;
}

body.theme-light .hero-subtitle,
body.theme-light .panel-note,
body.theme-light .download-note,
body.theme-light .form-hint {
  color: #5e769f;
}

.empty-state {
  color: var(--text-dim);
}

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

::-webkit-scrollbar-track {
  background: rgba(9, 16, 32, 0.5);
  border-radius: 999px;
}

body.theme-light ::-webkit-scrollbar-track {
  background: rgba(225, 235, 251, 0.62);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(120, 177, 255, 0.5), rgba(255, 140, 109, 0.48));
  border-radius: 999px;
  border: 2px solid rgba(9, 16, 32, 0.4);
}

body.theme-light ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(122, 176, 238, 0.6), rgba(255, 167, 134, 0.56));
  border-color: rgba(236, 243, 255, 0.95);
}

@keyframes driftGlow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, -12px, 0) scale(1.03);
  }
}

@keyframes pulseButton {
  0%,
  100% {
    box-shadow: 0 18px 40px rgba(255, 111, 123, 0.3);
  }
  50% {
    box-shadow: 0 24px 52px rgba(255, 111, 123, 0.44);
  }
}

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

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

@media (min-width: 1321px) {
  .hero-panel {
    grid-column: 1 / span 7;
    grid-row: 1;
  }

  .hero-side {
    grid-column: 8 / span 5;
    grid-row: 1;
  }

  .form-panel {
    grid-column: 1 / span 8;
    grid-row: 2;
  }

  .timeline-panel {
    grid-column: 9 / span 4;
    grid-row: 2;
  }

  .metrics-panel {
    grid-column: 1 / span 4;
    grid-row: 3;
  }

  .report-panel {
    grid-column: 5 / span 8;
    grid-row: 3;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 1320px) {
  .hero-panel,
  .hero-side,
  .form-panel,
  .metrics-panel,
  .timeline-panel,
  .report-panel {
    grid-column: 1 / -1;
  }

  .hero-side {
    grid-template-rows: unset;
  }

  .mini-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head h2 {
    font-size: 1.72rem;
  }
}

@media (max-width: 860px) {
  .topbar {
    padding: 14px 12px 8px;
  }

  .topbar-right {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .lang-option,
  .theme-option {
    min-width: 48px;
    padding: 6px 12px;
  }

  .studio-grid {
    padding: 8px 10px 18px;
    gap: 10px;
  }

  .hero-panel {
    min-height: unset;
    padding: 18px;
  }

  .hero-panel h1 {
    font-size: clamp(1.9rem, 10vw, 3rem);
  }

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

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

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

  .panel-head {
    flex-direction: column;
  }

  .panel-note {
    max-width: none;
  }

  .mini-cards {
    grid-template-columns: 1fr;
  }

  .action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-hint {
    order: 2;
  }

  .wire-a,
  .wire-b,
  .wire-c {
    display: none;
  }

  .btn.primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
