:root {
  color-scheme: dark;
  --bg: #09111b;
  --panel: rgba(18, 24, 36, 0.92);
  --panel-soft: rgba(28, 37, 54, 0.92);
  --border: rgba(148, 163, 184, 0.16);
  --text: #e8eef7;
  --muted: #8d9aac;
  --accent: #22d3ee;
  --accent-2: #2563eb;
  --success: #34d399;
  --warn: #f59e0b;
  --danger: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 28%),
    radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.22), transparent 34%),
    linear-gradient(180deg, #09111b, #0c1420 34%, #0a1119 100%);
  color: var(--text);
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.3;
  pointer-events: none;
}

.orb-a {
  width: 220px;
  height: 220px;
  background: rgba(37, 99, 235, 0.42);
  top: -60px;
  right: -40px;
}

.orb-b {
  width: 180px;
  height: 180px;
  background: rgba(34, 211, 238, 0.34);
  left: -40px;
  bottom: 120px;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 18px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding-bottom: 14px;
}

.hero-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(157, 244, 255, 0.78);
}

.hero-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.hero-subtitle,
.api-hint,
.current-detail,
.queue-meta,
.empty-state {
  color: var(--muted);
}

.hero-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
}

.api-hint {
  margin-top: 12px;
  font-size: 11px;
  word-break: break-all;
}

.status-pill,
.queue-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill {
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
}

.status-pill.done {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.12);
  color: #bbf7d0;
}

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

.metric-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: var(--panel-soft);
  padding: 12px;
}

.metric-card-success {
  background: rgba(20, 83, 45, 0.26);
  border-color: rgba(52, 211, 153, 0.18);
}

.metric-card-warn {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(245, 158, 11, 0.2);
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
}

.current-header,
.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
}

.text-button {
  border: 0;
  background: transparent;
  color: #9be8ff;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}

.current-user {
  margin-top: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
  background: #172032;
  flex-shrink: 0;
}

.avatar.is-hidden {
  display: none;
}

.current-meta {
  min-width: 0;
}

.current-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  word-break: break-word;
}

.current-detail {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.action-card {
  display: grid;
  gap: 10px;
}

.action-button {
  width: 100%;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.action-button:disabled {
  opacity: 0.55;
}

.action-button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.action-button-secondary {
  background: rgba(37, 42, 54, 0.95);
  border-color: rgba(148, 163, 184, 0.16);
  color: var(--text);
}

.action-button-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.queue {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow: auto;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: var(--panel-soft);
  padding: 12px;
}

.queue-item-main {
  min-width: 0;
}

.queue-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-subtitle {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.queue-status {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.queue-status.done {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.1);
}

.queue-status.skip {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
}

.queue-status.current {
  color: #9be8ff;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.1);
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 26px 12px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 380px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-pill {
    margin-top: 2px;
  }
}
