:root {
  --bg: #050b0d;
  --surface: rgba(12, 24, 25, 0.9);
  --surface-strong: rgba(15, 31, 32, 0.96);
  --line: rgba(106, 244, 225, 0.18);
  --line-strong: rgba(106, 244, 225, 0.36);
  --text: #f3fffb;
  --muted: #8ea7a2;
  --cyan: #24d8ea;
  --mint: #56eba8;
  --amber: #f7c45a;
  --red: #ff647d;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(36, 216, 234, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(86, 235, 168, 0.1), transparent 34%),
    radial-gradient(circle at 74% 14%, rgba(247, 196, 90, 0.08), transparent 22%),
    var(--bg);
}

body {
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.assistant-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(330px, 1fr);
  gap: 22px;
  align-items: start;
}

.assistant-phone {
  width: min(100%, 520px);
  display: grid;
  gap: 12px;
}

.assistant-header,
.hero-assistant,
.chat-card,
.quick-panel,
.task-card,
.live-card,
.alert-card,
.mini-data-card,
.window-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.assistant-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5, 12, 13, 0.94);
}

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

.brand-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  background: #061112;
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.08;
}

.brand-caption,
.mini-label,
.task-summary,
.live-grid span,
.system-line,
.voice-status,
.window-card p {
  color: var(--muted);
}

.brand-caption {
  margin-top: 3px;
  font-size: 12px;
}

.data-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 38px;
  color: #061112;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
}

.hero-assistant {
  padding: 18px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 188px;
  background:
    linear-gradient(135deg, rgba(36, 216, 234, 0.16), transparent 42%),
    linear-gradient(315deg, rgba(86, 235, 168, 0.11), transparent 40%),
    var(--surface-strong);
}

.assistant-orb {
  display: grid;
  place-items: center;
}

.mic-orb {
  width: 94px;
  height: 94px;
  border: 0;
  color: #061112;
  font-weight: 900;
  background:
    radial-gradient(circle at 30% 24%, #ffffff 0 11%, rgba(255, 255, 255, 0.55) 12% 18%, transparent 19%),
    conic-gradient(from 130deg, var(--cyan), var(--mint), #dffcf6, var(--cyan));
  box-shadow: 0 0 34px rgba(36, 216, 234, 0.34);
}

.mic-orb.listening {
  animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.04);
  }
}

.mic-orb span {
  display: block;
  font-size: 14px;
}

.mini-label {
  display: inline-flex;
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.25;
}

h1,
h2,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
}

.hero-text p {
  margin-top: 9px;
  color: #cfe3de;
  font-size: 14px;
  line-height: 1.65;
}

.voice-status {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.chat-card,
.task-card,
.live-card,
.alert-card,
.mini-data-card {
  padding: 13px;
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 136px;
  max-height: 300px;
  overflow: auto;
  padding: 2px 2px 8px;
}

.chat-bubble {
  max-width: 90%;
  padding: 11px 12px;
  white-space: pre-wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
  line-height: 1.65;
}

.chat-bubble.user {
  align-self: flex-end;
  color: #061112;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
}

.chat-bubble.assistant {
  align-self: flex-start;
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  margin-top: 10px;
}

.chat-input input {
  min-width: 0;
  height: 44px;
  color: var(--text);
  outline: 0;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.22);
  padding: 0 12px;
}

.chat-input button,
.primary-command {
  border: 0;
  color: #061112;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
}

.quick-panel {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-panel button,
.secondary-command,
.mini-tabs a {
  min-height: 42px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
  font-weight: 800;
}

.quick-panel button:nth-child(2) {
  border-color: rgba(247, 196, 90, 0.45);
  color: #ffe4a4;
}

.card-head,
.live-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head.compact {
  margin-bottom: 9px;
}

.card-head strong {
  color: var(--mint);
  font-size: 21px;
  white-space: nowrap;
}

.task-summary {
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 11px;
}

.decision-strip,
.live-grid {
  display: grid;
  gap: 8px;
}

.decision-strip {
  grid-template-columns: 1.1fr 1fr 0.8fr;
}

.decision-strip > div,
.live-grid > div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.decision-strip span,
.live-grid span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.decision-strip strong,
.live-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 17px;
  line-height: 1.2;
}

.command-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 9px;
  margin-top: 11px;
}

.primary-command,
.secondary-command {
  min-height: 46px;
  padding: 0 12px;
}

.progress-value {
  color: var(--cyan);
  font-weight: 900;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 11px;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
}

.live-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.5;
}

.system-line span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.alert-list {
  display: grid;
  gap: 8px;
}

.alert-item {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.alert-item strong {
  display: block;
  font-size: 13px;
}

.alert-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.alert-item.warn {
  border-color: rgba(247, 196, 90, 0.45);
}

.alert-item.danger {
  border-color: rgba(255, 100, 125, 0.45);
}

.alert-item.success {
  border-color: rgba(86, 235, 168, 0.4);
}

.mini-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-tabs a {
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
  padding: 8px;
}

.hidden-data {
  display: none;
}

.external-window {
  display: grid;
  gap: 14px;
}

.window-card {
  padding: 22px;
}

.hero-window h2 {
  max-width: 720px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
}

.window-card p {
  margin-top: 12px;
  max-width: 760px;
  font-size: 14px;
  line-height: 1.8;
}

.flow-window {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.flow-window span {
  display: grid;
  place-items: center;
  min-height: 58px;
  text-align: center;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .assistant-shell {
    grid-template-columns: 1fr;
  }

  .assistant-phone {
    margin: 0 auto;
  }

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

  .hero-window {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .assistant-shell {
    padding: 0;
  }

  .assistant-phone {
    width: 100%;
  }

  .assistant-header {
    min-height: 68px;
  }

  .hero-assistant {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
  }

  .assistant-orb {
    justify-content: stretch;
  }

  .mic-orb {
    width: 100%;
    height: 54px;
  }

  h1 {
    font-size: 30px;
  }

  .quick-panel,
  .decision-strip,
  .live-grid,
  .mini-tabs,
  .external-window,
  .flow-window {
    grid-template-columns: 1fr 1fr;
  }

  .chat-bubble {
    max-width: 96%;
  }
}

@media (max-width: 410px) {
  .quick-panel,
  .decision-strip,
  .live-grid,
  .mini-tabs,
  .command-row,
  .external-window {
    grid-template-columns: 1fr;
  }

  .data-link {
    min-width: 72px;
    font-size: 12px;
  }

  .brand-name {
    font-size: 20px;
  }
}
