/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
}

#cesiumContainer {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* 顶部标题栏 */
#titleBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(180deg, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.7) 100%);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

#titleBar h1 {
  font-size: 16px;
  font-weight: 600;
  color: #f5f5f5;
  letter-spacing: 1px;
}

#titleBar h1 span.accent {
  color: #ffc107;
}

#titleBar .date-badge {
  margin-left: 16px;
  padding: 2px 10px;
  background: rgba(255,193,7,0.15);
  border: 1px solid rgba(255,193,7,0.3);
  border-radius: 12px;
  font-size: 11px;
  color: #ffc107;
}

#titleBar .source-badge {
  margin-left: auto;
  font-size: 11px;
  color: #888;
}

/* 图例面板 */
#legend {
  position: absolute;
  top: 60px;
  left: 12px;
  width: 200px;
  background: rgba(15, 15, 20, 0.88);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px;
  z-index: 100;
  backdrop-filter: blur(12px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#legend::-webkit-scrollbar {
  width: 4px;
}

#legend::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.legend-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}

.legend-section {
  margin-bottom: 10px;
}

.legend-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
  color: #ccc;
}

.legend-line {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-box {
  display: inline-block;
  width: 16px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}

.legend-arrow {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.legend-ring {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid;
  flex-shrink: 0;
  opacity: 0.8;
}

.legend-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 10px;
  color: #666;
  line-height: 1.5;
}

/* 信息面板 */
#infoPanel {
  position: absolute;
  top: 60px;
  right: 12px;
  width: 320px;
  max-height: calc(100vh - 80px);
  background: rgba(15, 15, 20, 0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  overflow-y: auto;
  transform: translateX(340px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#infoPanel.visible {
  transform: translateX(0);
  opacity: 1;
}

#infoPanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#infoPanelTitle {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

#infoPanelClose {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

#infoPanelClose:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

#infoPanelContent {
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #ccc;
}

#infoPanelContent h3 {
  color: #fff;
  margin-bottom: 8px;
  font-size: 15px;
}

#infoPanelContent p {
  margin-bottom: 8px;
}

#infoPanelContent b {
  color: #e0e0e0;
}

/* 底部状态栏 */
#statusBar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(10,10,10,0.85);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  color: #666;
  gap: 20px;
}

#statusBar .status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

#statusBar .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
  animation: pulse 2s infinite;
}

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

/* 快捷操作按钮 */
#quickActions {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 100;
}

.quick-btn {
  padding: 8px 16px;
  background: rgba(15, 15, 20, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  font-family: inherit;
}

.quick-btn:hover {
  background: rgba(30, 30, 40, 0.95);
  border-color: rgba(255,193,7,0.4);
  color: #ffc107;
}

/* 隐藏Cesium默认InfoBox */
.cesium-infoBox {
  display: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
  #legend {
    width: 160px;
    padding: 10px;
    font-size: 11px;
  }
  
  #infoPanel {
    width: 280px;
  }

  #titleBar h1 {
    font-size: 13px;
  }
}
