* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  background: #0a0a0f; 
  color: #fff; 
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; 
  overflow: hidden; 
  user-select: none; 
}

/* 碰撞红色叠加层 */
#crashOverlay { position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 150; pointer-events: none; transition: background 0.5s; }
#crashOverlay.show { background: rgba(255,0,0,0.3); }

/* 警告边框叠加层 */
#warningOverlay { position: fixed; inset: 0; pointer-events: none; z-index: 50; display: none; }
#warningOverlay.show { display: block; }
.warning-border { position: absolute; inset: 0; border: 6px solid transparent; transition: border-color 0.2s; }
.warning-border.red { border-color: rgba(244,67,54,0.6); animation: pulse-red 0.4s infinite alternate; }
@keyframes pulse-red { from { border-color: rgba(244,67,54,0.3); } to { border-color: rgba(244,67,54,0.8); } }

/* 顶部状态栏 */
#topBar { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  height: 38px; 
  background: rgba(10,10,15,0.85); 
  border-bottom: 1px solid rgba(255,149,0,0.3); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0 16px; 
  z-index: 100; 
}
.status-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #ccc; }
.status-item .val { color: #fff; font-weight: 600; }
.status-item .unit { color: #888; font-size: 10px; }
.battery-bar { width: 60px; height: 14px; background: #1a1a25; border-radius: 7px; overflow: hidden; border: 1px solid #333; }
.battery-fill { height: 100%; background: #4caf50; border-radius: 7px; transition: width 0.5s, background 0.3s; }
.battery-fill.low { background: #f44336; }
.battery-fill.mid { background: #ff9800; }

/* 左侧面板 */
#leftPanel {
  position: fixed;
  left: 12px;
  top: 50px;
  width: 170px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  background: rgba(10,10,15,0.88);
  border-radius: 12px;
  border: 1px solid rgba(255,149,0,0.25);
  padding: 12px;
  z-index: 90;
}
/* 右侧面板 */
#rightPanel {
  position: fixed;
  right: 12px;
  top: 50px;
  width: 160px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  background: rgba(10,10,15,0.88);
  border-radius: 12px;
  border: 1px solid rgba(255,149,0,0.25);
  padding: 12px;
  z-index: 90;
}
/* 面板滚动条 */
#leftPanel::-webkit-scrollbar, #rightPanel::-webkit-scrollbar {
  width: 3px;
}
#leftPanel::-webkit-scrollbar-track, #rightPanel::-webkit-scrollbar-track {
  background: transparent;
}
#leftPanel::-webkit-scrollbar-thumb, #rightPanel::-webkit-scrollbar-thumb {
  background: rgba(255,149,0,0.3);
  border-radius: 2px;
}
.panel-title { font-size: 11px; color: #ff9500; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.panel-title.collapsible { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.panel-title.collapsible:hover { color: #ffad33; }
.collapse-icon { font-size: 9px; transition: transform 0.2s; }
.panel-title.collapsed .collapse-icon { transform: rotate(-90deg); }
.panel-content { overflow: hidden; transition: max-height 0.3s ease-out; }
.panel-content.collapsed { max-height: 0 !important; overflow: hidden; }
.drone-card { background: #12121a; border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: pointer; border: 1.5px solid transparent; transition: all 0.2s; }
.drone-card:hover { border-color: rgba(255,149,0,0.5); }
.drone-card.active { border-color: #ff9500; background: #1a1500; }
.drone-card .name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.drone-card .specs { font-size: 10px; color: #888; }
.drone-card .stats { margin-top: 6px; display: flex; gap: 8px; }
.drone-card .stat { font-size: 10px; color: #aaa; }
.drone-card .stat span { color: #ff9500; font-weight: 600; }
.obstacle-indicator { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 3px; width: 100%; margin: 0 auto; }
.ob-cell { width: 100%; aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); transition: all 0.1s; display: flex; align-items: center; justify-content: center; font-size: 8px; overflow: hidden; }
#ob-drone-icon { font-size: 12px !important; }
.ob-cell.active-safe { background: rgba(76,175,80,0.5); border-color: #4caf50; }
.ob-cell.active-warn { background: rgba(255,152,0,0.5); border-color: #ff9800; }
.ob-cell.active-danger { background: rgba(244,67,54,0.7); border-color: #f44336; }

/* 底部遥测面板 */
#bottomPanel { 
  position: fixed; 
  bottom: 12px; 
  left: 50%; 
  transform: translateX(-50%); 
  display: flex; 
  gap: 10px; 
  z-index: 90; 
}
.tele-panel { background: rgba(10,10,15,0.92); border-radius: 12px; border: 1px solid rgba(255,149,0,0.25); padding: 10px 14px; min-width: 100px; text-align: center; }
.tele-panel .label { font-size: 9px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.tele-panel .value { font-size: 20px; font-weight: 700; color: #fff; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tele-panel .unit { font-size: 10px; color: #888; margin-top: 1px; }

/* 虚拟摇杆 */
#joystickLeft { position: fixed; bottom: 80px; left: 20px; width: 130px; height: 130px; z-index: 90; }
#joystickRight { position: fixed; bottom: 80px; right: 20px; width: 130px; height: 130px; z-index: 90; }
.joystick-base { width: 130px; height: 130px; border-radius: 50%; background: rgba(20,20,30,0.85); border: 2px solid rgba(255,149,0,0.4); position: relative; touch-action: none; cursor: pointer; }
.joystick-thumb { width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff9500, #cc5500); border: 2px solid #ff9500; box-shadow: 0 0 12px rgba(255,149,0,0.5); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: box-shadow 0.1s; }
.joystick-label { text-align: center; font-size: 10px; color: #888; margin-top: 4px; }

/* 控制按钮 */
.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.ctrl-btn-inline {
  flex: 1 1 calc(50% - 4px);
  min-width: 50px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,149,0,0.4);
  background: rgba(20,20,30,0.85);
  color: #ff9500;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.ctrl-btn-inline:hover, .ctrl-btn-inline:active { 
  background: rgba(255,149,0,0.2); 
  border-color: #ff9500; 
}
.ctrl-btn-inline.active {
  background: rgba(255,149,0,0.3);
  box-shadow: 0 0 8px rgba(255,149,0,0.4);
}
.ctrl-btn-inline.half-width {
  flex: 1 1 calc(25% - 4px);
  min-width: 45px;
}
.ctrl-btn-inline .icon { font-size: 14px; }

.ctrl-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,149,0,0.5); background: rgba(20,20,30,0.85); color: #ff9500; font-size: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.ctrl-btn:hover, .ctrl-btn:active { background: rgba(255,149,0,0.2); border-color: #ff9500; }
.ctrl-btn.active { background: rgba(255,149,0,0.3); box-shadow: 0 0 10px rgba(255,149,0,0.4); }
.ctrl-btn .icon { font-size: 16px; }

.gear-btn { width: 36px; height: 28px; border-radius: 6px; border: 1.5px solid rgba(255,149,0,0.4); background: rgba(20,20,30,0.85); color: #888; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.gear-btn:hover { border-color: rgba(255,149,0,0.6); color: #aaa; }
.gear-btn.active { background: rgba(255,149,0,0.25); border-color: #ff9500; color: #ff9500; box-shadow: 0 0 8px rgba(255,149,0,0.3); }

/* M档 特殊样式 */
.gear-btn.manual { border-color: rgba(255,100,50,0.4); color: #888; }
.gear-btn.manual:hover { border-color: rgba(255,100,50,0.6); color: #ff6432; }
.gear-btn.manual.active { background: rgba(255,100,50,0.25); border-color: #ff6432; color: #ff6432; box-shadow: 0 0 8px rgba(255,100,50,0.4); }

/* 飞行模式 M档 样式 */
#flightMode.manual { color: #ff6432 !important; }

/* 设置图标 Logo */
.settings-logo {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
  margin-right: 8px;
}
.settings-logo:hover {
  background: rgba(255,149,0,0.2);
}
.settings-logo .logo-icon {
  font-size: 20px;
}

/* M档 提示弹窗 */
#manualModePromptModal {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: none;
  align-items: center;
  justify-content: center;
}
#manualModePromptModal .modal-icon { font-size: 48px; }
#manualModePromptModal .modal-btn.primary {
  background: rgba(255,149,0,0.8);
  color: #000;
  font-weight: 600;
  border: none;
  padding: 12px 32px;
}
#manualModePromptModal .modal-btn.primary:hover {
  background: rgba(255,149,0,1);
}

/* 通知 */
#notification { position: fixed; top: 50px; left: 50%; transform: translateX(-50%); background: rgba(10,10,15,0.95); border: 1px solid rgba(255,149,0,0.5); border-radius: 8px; padding: 8px 20px; font-size: 13px; color: #ff9500; z-index: 200; pointer-events: none; opacity: 0; transition: opacity 0.3s; white-space: nowrap; }
#notification.show { opacity: 1; }

/* 开始界面 */
#startScreen { position: fixed; inset: 0; background: rgba(10,10,15,0.97); z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
#startScreen h1 { font-size: 32px; color: #ff9500; letter-spacing: 2px; text-shadow: 0 0 20px rgba(255,149,0,0.4); }
#startScreen p { color: #888; font-size: 14px; }
.start-btn { padding: 14px 48px; background: #ff9500; color: #000; border: none; border-radius: 30px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.start-btn:hover { background: #ffad33; transform: scale(1.05); }
.rc-preview { width: 280px; height: 160px; background: #1a1a25; border-radius: 16px; border: 2px solid rgba(255,149,0,0.3); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #555; }

/* 十字准星 - FPV模式 */
#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 80;
}
#crosshair::before,
#crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255, 149, 0, 0.8);
}
#crosshair::before {
  width: 2px;
  height: 40px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}
#crosshair::after {
  width: 40px;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
#crosshair .center-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 149, 0, 0.9);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 加载提示 */
#loadingText { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #ff9500; font-size: 18px; z-index: 400; }

/* 设置按钮 */
.settings-btn { 
  width: 28px; 
  height: 28px; 
  border-radius: 50%; 
  border: none; 
  background: rgba(255,149,0,0.2); 
  color: #ff9500; 
  font-size: 18px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: all 0.2s; 
}
.settings-btn:hover { background: rgba(255,149,0,0.4); }

/* 全屏按钮 */
.fullscreen-btn { 
  width: 28px; 
  height: 28px; 
  border-radius: 50%; 
  border: none; 
  background: rgba(255,149,0,0.2); 
  color: #ff9500; 
  font-size: 14px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: all 0.2s; 
  margin-right: 6px;
}
.fullscreen-btn:hover { background: rgba(255,149,0,0.4); }

/* 设置弹窗 */
#settingsModal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.settings-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.settings-container {
  position: relative;
  width: 92%;
  max-width: 520px;
  max-height: 85vh;
  background: rgba(26, 26, 37, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(255,149,0,0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,149,0,0.2);
}
.settings-title {
  font-size: 16px;
  font-weight: 600;
  color: #ff9500;
}
.settings-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #888;
  font-size: 16px;
  cursor: pointer;
}
.settings-close:hover { color: #fff; }

.settings-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,149,0,0.2);
  overflow-x: auto;
}
.settings-tab {
  flex: 1;
  min-width: 60px;
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.settings-tab:hover { color: #fff; }
.settings-tab.active { 
  color: #ff9500; 
  border-bottom-color: #ff9500; 
}

.settings-content {
  padding: 16px;
  overflow-y: auto;
  max-height: 50vh;
}

.setting-item {
  margin-bottom: 16px;
}
.setting-label {
  font-size: 13px;
  color: #fff;
  margin-bottom: 8px;
}
.setting-desc {
  font-size: 11px;
  color: #666;
  margin-top: 6px;
}
.setting-desc.warning {
  color: #ff6b6b;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.setting-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.option-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,149,0,0.3);
  background: transparent;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.option-btn:hover { border-color: rgba(255,149,0,0.6); color: #fff; }
.option-btn.active { 
  background: rgba(255,149,0,0.2); 
  border-color: #ff9500; 
  color: #ff9500; 
}

.action-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,149,0,0.3);
  background: rgba(255,149,0,0.1);
  color: #ff9500;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn:hover { background: rgba(255,149,0,0.2); }
.action-btn.danger { 
  border-color: rgba(255,100,100,0.3); 
  background: rgba(255,100,100,0.1); 
  color: #ff6b6b; 
}
.action-btn.danger:hover { background: rgba(255,100,100,0.2); }

.number-input {
  width: 80px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,149,0,0.3);
  background: #12121a;
  color: #fff;
  font-size: 13px;
  text-align: center;
}
.number-input:focus { outline: none; border-color: #ff9500; }
.unit-label {
  font-size: 12px;
  color: #888;
}

/* 关于页面 */
.about-section {
  text-align: center;
  padding: 20px;
}
.about-logo { font-size: 48px; margin-bottom: 12px; }
.about-title { font-size: 18px; color: #ff9500; margin-bottom: 8px; }
.about-version { font-size: 12px; color: #666; margin-bottom: 16px; }
.about-desc { font-size: 13px; color: #aaa; line-height: 1.6; margin-bottom: 16px; }
.about-tech { font-size: 11px; color: #666; }

/* 确认弹窗 */
#avoidOffModal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}
.modal-container {
  position: relative;
  width: 85%;
  max-width: 320px;
  background: #1a1a25;
  border-radius: 16px;
  border: 1px solid rgba(255,149,0,0.3);
  padding: 24px;
  text-align: center;
}
.modal-icon { font-size: 40px; margin-bottom: 12px; }
.modal-title { font-size: 16px; color: #ff9500; margin-bottom: 12px; }
.modal-desc { font-size: 13px; color: #aaa; line-height: 1.6; margin-bottom: 20px; }
.modal-buttons { display: flex; gap: 10px; justify-content: center; }
.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-btn.cancel {
  background: rgba(255,255,255,0.1);
  color: #888;
}
.modal-btn.cancel:hover { background: rgba(255,255,255,0.15); }
.modal-btn.danger {
  background: rgba(255,100,100,0.2);
  color: #ff6b6b;
}
.modal-btn.danger:hover { background: rgba(255,100,100,0.3); }

/* 响应式 */

/* 云台俯仰控制 - 独立竖直条，在右侧面板左侧 */
#gimbalBar {
  position: fixed;
  right: 188px; /* 紧贴右侧面板左边缘(12+160+padding) */
  top: 50px; /* 和右侧面板顶部对齐 */
  width: 36px;
  height: 280px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 4px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: none;
}
.gimbal-degree {
  font-size: 10px;
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
  white-space: nowrap;
}
.gimbal-degree.at-limit {
  color: #ff3b30;
}
.gimbal-slider {
  position: relative;
  width: 20px;
  flex: 1;
  cursor: pointer;
  touch-action: none;
}
.gimbal-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
.gimbal-tick {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 2px;
  background: rgba(255,255,255,0.25);
}
.gimbal-tick-top { top: 6px; }
.gimbal-tick-mid { top: 43.75%; transform: translate(-50%, -50%); }
.gimbal-tick-bottom { bottom: 6px; }
.gimbal-tick-label {
  position: absolute;
  right: 100%;
  font-size: 7px;
  color: #666;
  padding-right: 4px;
  white-space: nowrap;
}
.gimbal-tick-label-top { top: 2px; }
.gimbal-tick-label-mid { top: 43.75%; transform: translateY(-50%); }
.gimbal-tick-label-bottom { bottom: 2px; }
.gimbal-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 9px;
  border-radius: 5px;
  background: radial-gradient(circle at 50% 30%, #ff9500, #cc5500);
  border: 1.5px solid #ff9500;
  box-shadow: 0 0 8px rgba(255,149,0,0.5);
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: box-shadow 0.15s, background 0.15s;
  z-index: 2;
}
.gimbal-thumb:hover {
  box-shadow: 0 0 12px rgba(255,149,0,0.7);
}
.gimbal-thumb.at-limit {
  background: radial-gradient(circle at 50% 30%, #ff3b30, #cc0000);
  border-color: #ff3b30;
  box-shadow: 0 0 10px rgba(255,59,48,0.6);
}
.gimbal-thumb.dragging {
  cursor: grabbing;
  box-shadow: 0 0 14px rgba(255,149,0,0.8);
}
.gimbal-limit-notify {
  font-size: 7px;
  color: #ff3b30;
  text-align: center;
  margin-top: 2px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  #leftPanel { width: 150px; left: 6px; top: 44px; padding: 8px; font-size: 11px; max-height: calc(100vh - 260px); }
  #rightPanel { width: 130px; right: 6px; top: 44px; padding: 8px; max-height: calc(100vh - 260px); }
  #gimbalBar { right: 146px; width: 28px; height: 180px; }
  #bottomPanel { gap: 4px; }
  .tele-panel { padding: 6px 8px; min-width: 70px; }
  .tele-panel .value { font-size: 16px; }
  .tele-panel .label { font-size: 8px; }
  #joystickLeft { bottom: 60px; left: 10px; }
  #joystickRight { bottom: 60px; right: 10px; }
  .joystick-base { width: 100px; height: 100px; }
  .joystick-thumb { width: 40px; height: 40px; }
  .ctrl-btn { width: 40px; height: 40px; font-size: 8px; }
  .ctrl-btn .icon { font-size: 14px; }
  .settings-tabs { overflow-x: auto; }
  .settings-tab { min-width: 50px; font-size: 11px; padding: 10px 6px; }
}

/* 地图选择卡片 */
.map-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #12121a;
  border-radius: 10px;
  border: 2px solid rgba(255,149,0,0.25);
  cursor: pointer;
  transition: all 0.2s;
}
.map-card:hover {
  border-color: rgba(255,149,0,0.5);
  background: #1a1500;
}
.map-card.active {
  border-color: #ff9500;
  background: rgba(255,149,0,0.15);
}
.map-preview {
  font-size: 36px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}
.map-info {
  flex: 1;
}
.map-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.map-desc {
  font-size: 11px;
  color: #888;
}

@media (max-width: 768px) {
  .map-card {
    padding: 10px;
    gap: 8px;
  }
  .map-preview {
    font-size: 28px;
    width: 40px;
    height: 40px;
  }
  .map-name {
    font-size: 13px;
  }
  .map-desc {
    font-size: 10px;
  }
}

/* 航点飞行弹窗 */
#waypointModal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.waypoint-container {
  position: relative;
  width: 92%;
  max-width: 540px;
  background: rgba(26, 26, 37, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(255,149,0,0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.waypoint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,149,0,0.2);
}
.waypoint-title {
  font-size: 16px;
  font-weight: 600;
  color: #ff9500;
}
.waypoint-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #888;
  font-size: 16px;
  cursor: pointer;
}
.waypoint-close:hover { color: #fff; }
#waypointMap {
  width: 100%;
  aspect-ratio: 1;
  background: #0a0a0f;
  cursor: crosshair;
  display: block;
}
.waypoint-controls {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,149,0,0.2);
}
.waypoint-speed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}
.waypoint-speed-row input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,149,0,0.3);
  border-radius: 2px;
  outline: none;
}
.waypoint-speed-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff9500;
  cursor: pointer;
}
.waypoint-info {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 10px;
}
.waypoint-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.waypoint-btn {
  padding: 10px 28px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.waypoint-btn.clear {
  background: rgba(255,255,255,0.1);
  color: #888;
}
.waypoint-btn.clear:hover { background: rgba(255,255,255,0.15); color: #fff; }
.waypoint-btn.go {
  background: rgba(255,149,0,0.8);
  color: #000;
}
.waypoint-btn.go:hover { background: rgba(255,149,0,1); }

/* 航点确认弹窗 */
#waypointConfirmModal {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: none;
  align-items: center;
  justify-content: center;
}
#waypointConfirmModal .modal-btn.primary {
  background: rgba(255,149,0,0.8);
  color: #000;
  font-weight: 600;
  border: none;
  padding: 12px 32px;
}
#waypointConfirmModal .modal-btn.primary:hover {
  background: rgba(255,149,0,1);
}

@media (max-width: 768px) {
  .waypoint-container {
    max-width: 95%;
  }
  #waypointMap {
    max-height: 300px;
  }
}