:root {
  color-scheme: dark;
  --bg-color: #020b1a;
  --panel-bg: rgb(6 30 65 / 85%);
  --panel-bg-strong: rgb(8 42 86 / 78%);
  --border-color: #0d4a8a;
  --border-soft: rgb(13 74 138 / 42%);
  --border-glow: rgb(0 150 255 / 30%);
  --text-primary: #e0f0ff;
  --text-secondary: #7aa2d9;
  --accent-cyan: #00d4ff;
  --accent-green: #00ff88;
  --accent-red: #ff3366;
  --accent-orange: #ff9933;
  --map-blue: #66c2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: "Microsoft YaHei", "PingFang SC", Inter, system-ui, sans-serif;
  font-size: 12px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.bg-layer,
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.bg-layer {
  background:
    radial-gradient(ellipse at 50% 50%, rgb(0 60 120 / 15%) 0%, transparent 70%),
    linear-gradient(180deg, #020b1a 0%, #051530 50%, #020b1a 100%);
}

.grid-bg {
  background-image:
    linear-gradient(rgb(0 80 160 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(0 80 160 / 6%) 1px, transparent 1px);
  background-size: 40px 40px;
}

.particle {
  position: absolute;
  bottom: -20px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  from {
    transform: translateY(0);
    opacity: 0;
  }
  12%,
  82% {
    opacity: 0.7;
  }
  to {
    transform: translateY(-100vh);
    opacity: 0;
  }
}

/* 顶部标题栏沿用参考页面的指挥中心视觉，YOLO 只作为首个视角框内的业务能力。 */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgb(0 40 90 / 60%) 0%, transparent 100%);
}

.header::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: -1px;
  left: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.header-left,
.header-right,
.header-actions,
.status-badge {
  display: flex;
  align-items: center;
}

.header-left {
  gap: 12px;
}

.header-right {
  gap: 16px;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0066cc, #00aaff);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 0 12px rgb(0 150 255 / 40%);
}

.sys-title {
  color: var(--text-secondary);
  font-size: 14px;
}

.status-badge {
  gap: 4px;
  color: var(--accent-green);
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.header-center {
  text-align: center;
}

.main-title {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #66c2ff 100%);
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgb(0 150 255 / 50%));
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1.15;
}

.sub-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.sub-nav span {
  transition: color 0.2s;
}

.sub-nav span:hover {
  color: var(--accent-cyan);
}

.datetime {
  text-align: right;
  line-height: 1.4;
}

.time-display {
  color: var(--accent-cyan);
  font: 600 16px/1.2 Consolas, monospace;
  letter-spacing: 1px;
}

.date-display {
  color: var(--text-secondary);
  font-size: 10px;
}

.header-actions {
  gap: 8px;
}

.action-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: rgb(0 60 120 / 30%);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}

.action-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--border-glow);
}

.main-container {
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: calc(100vh - 56px - 36px);
  padding: 12px 16px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--panel-bg);
  box-shadow: inset 0 0 18px rgb(0 100 200 / 8%);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.panel-header-left,
.panel-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.panel-header-right {
  color: var(--text-secondary);
  font-size: 10px;
}

.panel-title-icon {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.uav-yolo-header {
  justify-content: flex-start;
  padding-right: 8px;
}

.uav-title-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.uav-title-control-row .panel-header-left {
  flex: 0 0 auto;
}

.top-panels-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-view-panel {
  height: 480px;
}

.ai-view-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px;
  height: calc(100% - 38px);
  padding: 6px;
}

.ai-view-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.data-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 4px;
  border: 1px solid rgb(13 74 138 / 35%);
  border-radius: 3px;
  background: rgb(0 36 78 / 35%);
}

.data-label {
  color: var(--text-secondary);
  font-size: 8px;
}

.data-value {
  color: var(--accent-cyan);
  font: 700 11px/1.15 Consolas, monospace;
}

.data-value.green,
.success-text {
  color: var(--accent-green);
}

.drone-icon-area {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 42px;
  border: 1px dashed rgb(0 212 255 / 32%);
  border-radius: 4px;
  background: rgb(0 40 90 / 20%);
  text-align: center;
}

.drone-mini-icon {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  color: var(--accent-cyan);
  font-weight: 700;
  text-shadow: 0 0 10px var(--accent-cyan);
}

.task-status-text {
  color: var(--text-secondary);
  font-size: 8px;
  line-height: 1.35;
}

.ai-view-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.yolo-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  height: 100%;
  min-height: 0;
}

.view-image-placeholder {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(13 74 138 / 50%);
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 45%, rgb(0 212 255 / 12%) 0%, transparent 34%),
    linear-gradient(135deg, rgb(0 24 52 / 90%) 0%, rgb(1 8 20 / 96%) 100%);
}

.view-image-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(0 212 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(0 212 255 / 5%) 1px, transparent 1px);
  background-size: 24px 24px;
}

.yolo-video-stage {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  background: #01040a;
}

#cameraVideo,
#overlayCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#cameraVideo {
  object-fit: contain;
  background: #01040a;
}

#overlayCanvas {
  z-index: 2;
  pointer-events: none;
}

.video-metrics-bar {
  position: absolute;
  top: 7px;
  left: 50%;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  width: calc(100% - 14px);
  padding: 4px;
  border: 1px solid rgb(13 74 138 / 75%);
  border-radius: 4px;
  background: rgb(0 18 44 / 78%);
  transform: translateX(-50%);
  backdrop-filter: blur(4px);
}

.video-metric-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid rgb(13 74 138 / 38%);
  border-radius: 3px;
  background: rgb(0 50 100 / 24%);
}

.video-metric-item span,
.video-metric-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-metric-item span {
  color: var(--text-secondary);
  font-size: 9px;
}

.video-metric-item strong {
  color: var(--accent-cyan);
  font: 700 10px/1 Consolas, monospace;
}

.scan-line {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 6;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  animation: scanDown 3s ease-in-out infinite;
}

@keyframes scanDown {
  0% {
    top: 0;
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.view-label-badge {
  position: absolute;
  top: 38px;
  left: 8px;
  z-index: 7;
  max-width: 130px;
  overflow: hidden;
  padding: 4px 8px;
  border: 1px solid rgb(0 212 255 / 45%);
  border-radius: 3px;
  background: rgb(0 18 44 / 74%);
  color: var(--accent-cyan);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compass-widget {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgb(0 212 255 / 45%);
  border-radius: 50%;
  background: rgb(0 18 44 / 70%);
  color: var(--accent-cyan);
  font: 700 11px/1 Consolas, monospace;
}

.view-overlay-info,
.target-info-panel {
  position: absolute;
  z-index: 7;
  border: 1px solid rgb(0 212 255 / 35%);
  border-radius: 3px;
  background: rgb(0 18 44 / 76%);
  color: var(--text-primary);
  line-height: 1.35;
  backdrop-filter: blur(4px);
}

.view-overlay-info {
  top: 52%;
  left: 50%;
  padding: 6px 8px;
  color: var(--accent-orange);
  font-size: 11px;
}

.view-overlay-info span {
  color: var(--accent-orange);
  font-size: 9px;
}

.overlay-person {
  top: 42%;
  left: 46%;
  color: var(--accent-red);
}

.overlay-person span {
  color: var(--accent-red);
}

.empty-state,
.message {
  position: absolute;
  right: 10px;
  left: 10px;
  z-index: 9;
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: rgb(0 18 44 / 82%);
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
}

.empty-state {
  bottom: 10px;
}

.empty-state.hidden {
  display: none;
}

.message {
  bottom: 10px;
  min-height: 30px;
  margin: 0;
  line-height: 1.35;
}

.message:empty {
  display: none;
}

.message.error {
  color: var(--accent-red);
}

.message.warn {
  color: var(--accent-orange);
}

.uav-flight-strip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgb(13 74 138 / 44%);
  border-radius: 3px;
  background: rgb(0 18 44 / 78%);
  backdrop-filter: blur(4px);
}

.uav-flight-strip .data-item {
  min-width: 0;
  padding: 4px 6px;
  background: rgb(0 48 96 / 30%);
}

.yolo-control-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgb(13 74 138 / 42%);
  border-radius: 3px;
  background: rgb(0 24 52 / 58%);
}

.yolo-header-controls {
  display: grid;
  grid-template-columns: 46px 46px 70px minmax(100px, 1fr);
  flex: 0 1 274px;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  height: 100%;
  max-width: min(100%, 274px);
  padding: 0;
  border: 0;
  background: transparent;
}

.yolo-header-controls .primary-button,
.yolo-header-controls .ghost-button {
  height: 24px;
  padding: 0 4px;
  font-size: 9px;
}

.yolo-header-controls .field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 4px;
  border: 1px solid rgb(13 74 138 / 42%);
  border-radius: 3px;
  background: rgb(0 24 52 / 58%);
}

.yolo-header-controls .field:last-of-type {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.yolo-header-controls .field span {
  font-size: 8px;
  white-space: nowrap;
}

.yolo-header-controls .field input[type="number"] {
  width: 28px;
  height: 18px;
  padding: 0 2px;
}

.yolo-header-controls .field input[type="range"] {
  width: 42px;
}

.yolo-header-controls output {
  font-size: 9px;
}

.toolbar,
.yolo-actions,
.yolo-params {
  min-width: 0;
}

.yolo-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.primary-button,
.ghost-button {
  height: 30px;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.primary-button {
  border: 1px solid var(--accent-cyan);
  background: rgb(0 130 190 / 72%);
  color: #ffffff;
  font-weight: 700;
}

.ghost-button {
  border: 1px solid var(--border-color);
  background: rgb(0 40 80 / 36%);
  color: var(--text-primary);
}

.primary-button:hover,
.ghost-button:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 0 8px rgb(0 150 255 / 24%);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.yolo-params {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.field {
  display: grid;
  gap: 4px;
}

.compact-field {
  min-width: 0;
}

.field span {
  color: var(--text-secondary);
  font-size: 9px;
}

.field input[type="number"] {
  width: 100%;
  height: 26px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 0 6px;
  background: rgb(0 24 52 / 88%);
  color: var(--text-primary);
}

.field input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent-cyan);
}

output {
  color: var(--accent-cyan);
  font: 700 10px/1 Consolas, monospace;
}

.humanoid-silhouette {
  position: absolute;
  top: 26%;
  left: 42%;
  z-index: 2;
  width: 58px;
  height: 126px;
  border-radius: 34px 34px 12px 12px;
  background:
    radial-gradient(circle at 50% 16%, rgb(0 212 255 / 45%) 0 16px, transparent 17px),
    linear-gradient(rgb(0 212 255 / 24%), rgb(0 212 255 / 8%));
  filter: drop-shadow(0 0 12px rgb(0 212 255 / 42%));
}

.detection-box {
  position: absolute;
  z-index: 5;
  border: 1px solid var(--accent-green);
  box-shadow: 0 0 8px rgb(0 255 136 / 38%);
}

.det-box-1 {
  top: 23%;
  left: 39%;
  width: 84px;
  height: 74px;
}

.det-box-2 {
  top: 45%;
  left: 36%;
  width: 126px;
  height: 138px;
}

.det-box-3 {
  right: 16%;
  bottom: 22%;
  width: 64px;
  height: 52px;
}

.target-info-panel {
  right: 14px;
  bottom: 48px;
  width: 120px;
  padding: 8px;
  font-size: 10px;
}

.tip-title {
  margin-bottom: 5px;
  color: var(--accent-cyan);
  font-weight: 700;
}

.tip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
}

.tip-val {
  color: var(--accent-green);
}

.tip-val.red {
  color: var(--accent-red);
}

.left-col,
.right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.mission-overview-panel,
.target-lock-panel {
  min-height: 168px;
}

.mission-body,
.target-body,
.risk-body {
  padding: 12px;
}

.mission-body {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
}

.mission-count {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid rgb(0 212 255 / 40%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(0 212 255 / 16%), transparent 70%);
}

.count-num {
  color: var(--accent-cyan);
  font: 800 30px/1 Consolas, monospace;
}

.count-label,
.mr-label,
.info-label,
.stat-label,
.pb-label {
  color: var(--text-secondary);
}

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

.mission-row,
.info-row,
.risk-row,
.stat-item,
.progress-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.mr-label,
.rr-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mr-dot,
.rr-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-cyan {
  background: var(--accent-cyan);
}

.dot-green,
.dot-g {
  background: var(--accent-green);
}

.dot-orange,
.dot-o {
  background: var(--accent-orange);
}

.dot-blue {
  background: #3399ff;
}

.dot-r {
  background: var(--accent-red);
}

.mr-val,
.info-val,
.stat-val,
.rr-percent {
  color: var(--text-primary);
  font-family: Consolas, monospace;
}

.alert-panel {
  flex: 1;
  min-height: 270px;
}

.alert-list {
  height: 246px;
  overflow: hidden;
  padding: 10px;
}

.alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 56px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 7px 8px;
  border: 1px solid rgb(13 74 138 / 35%);
  border-left-color: var(--accent-red);
  border-radius: 3px;
  background: rgb(0 24 52 / 52%);
}

.alert-item.warning {
  border-left-color: var(--accent-orange);
}

.alert-item.info {
  border-left-color: var(--accent-cyan);
}

.ai-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.alert-level-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.level-high {
  background: rgb(255 51 102 / 18%);
  color: var(--accent-red);
}

.level-warn {
  background: rgb(255 153 51 / 18%);
  color: var(--accent-orange);
}

.level-info {
  background: rgb(0 212 255 / 18%);
  color: var(--accent-cyan);
}

.alert-msg,
.alert-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-time {
  color: var(--text-secondary);
  font-size: 10px;
}

.alert-status {
  padding: 2px 5px;
  border-radius: 3px;
  text-align: center;
  font-size: 10px;
}

.status-pending {
  background: rgb(255 153 51 / 18%);
  color: var(--accent-orange);
}

.status-handled {
  background: rgb(0 255 136 / 14%);
  color: var(--accent-green);
}

.status-new {
  background: rgb(0 212 255 / 14%);
  color: var(--accent-cyan);
}

.center-map-area {
  min-width: 0;
}

.map-container {
  position: relative;
  height: 100%;
  min-height: 508px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 50%, rgb(0 80 160 / 16%), transparent 58%),
    rgb(2 12 30 / 72%);
}

.map-title-bar {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  padding: 6px 16px;
  border: 1px solid rgb(0 212 255 / 40%);
  border-radius: 3px;
  background: rgb(0 18 44 / 72%);
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 2px;
  transform: translateX(-50%);
}

.map-svg {
  width: 100%;
  height: 100%;
  min-height: 508px;
}

.area-highlight {
  fill: rgb(255 153 51 / 16%);
  stroke: var(--accent-orange);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}

.area-label,
.node-label,
.node-sublabel {
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgb(2 11 26 / 80%);
  stroke-width: 3px;
  font-family: "Microsoft YaHei", sans-serif;
}

.area-label {
  fill: var(--accent-orange);
  font-size: 11px;
}

.link-line {
  stroke: rgb(0 212 255 / 18%);
  stroke-width: 1;
}

.link-line-active {
  stroke: url("#lineGradient");
  stroke-width: 2;
  stroke-dasharray: 12 8;
  animation: dashFlow 2.8s linear infinite;
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -40;
  }
}

.node-circle {
  fill: rgb(0 40 90 / 78%);
  stroke: var(--accent-cyan);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgb(0 212 255 / 55%));
  animation: nodePulse 2.6s ease-in-out infinite;
}

@keyframes nodePulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

.node-core {
  fill: var(--accent-cyan);
}

.node-label {
  fill: var(--text-primary);
  font-size: 11px;
}

.node-sublabel {
  fill: var(--text-secondary);
  font-size: 9px;
}

.center-node-label,
.active-label {
  fill: var(--accent-green);
}

.bottom-tabs-bar {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tab-btn {
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: rgb(0 60 120 / 25%);
  color: var(--text-secondary);
  cursor: pointer;
}

.tab-btn:hover,
.tab-btn.active {
  border-color: var(--accent-cyan);
  background: linear-gradient(180deg, rgb(0 80 150 / 60%) 0%, rgb(0 50 100 / 40%) 100%);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgb(0 150 255 / 20%);
}

.target-body {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
}

.target-avatar {
  display: grid;
  place-items: center;
}

.target-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.star-rating {
  color: var(--accent-orange);
  letter-spacing: 1px;
}

.meter-bar {
  flex: 1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(13 74 138 / 40%);
}

.meter-fill {
  width: 86%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-orange), var(--accent-red));
}

.risk-panel {
  flex: 1;
  min-height: 254px;
}

.risk-gauge-area {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  align-items: center;
}

.gauge-wrapper {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
}

.gauge-svg {
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgb(13 74 138 / 52%);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent-red);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 30;
}

.gauge-inner {
  position: absolute;
  display: grid;
  place-items: center;
}

.gauge-num {
  color: var(--accent-red);
  font: 800 24px/1 Consolas, monospace;
}

.gauge-unit {
  color: var(--text-secondary);
  font-size: 10px;
}

.risk-details {
  display: grid;
  gap: 9px;
}

.risk-warning-text {
  margin-top: 12px;
  padding: 8px;
  border: 1px solid rgb(255 153 51 / 35%);
  border-radius: 3px;
  background: rgb(255 153 51 / 10%);
  color: var(--accent-orange);
}

.footer-status-bar {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--panel-bg);
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.footer-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.system-link {
  color: var(--accent-cyan);
}

.stat-icon {
  color: var(--accent-cyan);
}

.mini-progress {
  width: 54px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(13 74 138 / 42%);
}

.mp-fill {
  width: 65%;
  height: 100%;
  background: var(--accent-cyan);
}

.mp-fill.warn {
  width: 42%;
  background: var(--accent-orange);
}

.data-rate-label,
.data-rate-value {
  color: var(--text-secondary);
  font-size: 10px;
}

@media (max-width: 1280px) {
  .main-container {
    grid-template-columns: 300px minmax(0, 1fr) 290px;
  }

  .ai-view-body {
    grid-template-columns: 44px minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {
  .header {
    height: auto;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .main-title {
    font-size: 21px;
    letter-spacing: 2px;
  }

  .main-container,
  .top-panels-row {
    grid-template-columns: 1fr;
  }

  .top-panels-row,
  .footer-status-bar {
    grid-column: auto;
  }

  .ai-view-panel {
    height: auto;
    min-height: 480px;
  }

  .map-container,
  .map-svg {
    min-height: 440px;
  }
}

@media (max-width: 720px) {
  .header-left,
  .header-right,
  .sub-nav,
  .footer-left,
  .footer-right {
    flex-wrap: wrap;
  }

  .header-center {
    text-align: left;
  }

  .sub-nav {
    justify-content: flex-start;
  }

  .ai-view-body,
  .mission-body,
  .target-body,
  .risk-gauge-area {
    grid-template-columns: 1fr;
  }

  .ai-view-left {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drone-icon-area {
    grid-column: 1 / -1;
  }

  .video-metrics-bar {
    grid-template-columns: 1fr;
    width: calc(100% - 16px);
  }

  .yolo-params,
  .bottom-tabs-bar {
    grid-template-columns: 1fr;
  }
}
