* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

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

/* 隐藏面板的通用类 */
.panel-hidden {
  display: none !important;
}

/* 顶部标题栏 */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, rgba(26, 35, 126, 0.95), rgba(21, 101, 192, 0.95));
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
}

.header .subtitle {
  margin-left: 20px;
  font-size: 14px;
  opacity: 0.9;
}

/* 左侧控制面板 */
.control-panel {
  position: absolute;
  top: 80px;
  left: 20px;
  width: 280px;
  max-height: calc(100vh - 100px);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  overflow-y: auto;
}

.panel-section {
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.panel-section:last-child {
  border-bottom: none;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #1976d2;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.panel-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: #1976d2;
  margin-right: 8px;
  border-radius: 2px;
}

/* 图层列表 */
.layer-item {
  padding: 8px 10px;
  margin: 5px 0;
  background: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.layer-item:hover {
  background: #e3f2fd;
  transform: translateX(2px);
}

.layer-item.active {
  background: #1976d2;
  color: white;
}

.layer-badge {
  background: #fff;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.layer-item.active .layer-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 统计信息 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.stats-grid .stat-card:nth-child(3) {
  grid-column: 1 / -1;
}

.stat-card {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #1976d2;
}

.stat-label {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* 按钮样式 */
.btn {
  padding: 8px 16px;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  margin-top: 10px;
  width: 100%;
}

.btn:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* 加载指示器 */
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 30px 50px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  text-align: center;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #333;
  font-size: 14px;
}

/* 右下角信息面板 */
.info-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  font-size: 12px;
  max-width: 300px;
}

.info-item {
  margin: 5px 0;
  color: #666;
}

.info-label {
  font-weight: 600;
  color: #333;
}

/* 滚动条美化 */
.control-panel::-webkit-scrollbar {
  width: 6px;
}

.control-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 图片预览模态框 */
.relic-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.relic-modal-content {
  background: white;
  border-radius: 8px;
  width: 900px;
  height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.relic-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.relic-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.close-btn:hover {
  color: #333;
}

.relic-modal-body {
  padding: 20px;
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.relic-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  height: 100%;
}

.relic-image-container {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.relic-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  pointer-events: none;
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 40px;
  color: #333;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 4px;
  transition: all 0.2s;
  user-select: none;
}

.carousel-btn:hover {
  background: white;
  transform: scale(1.1);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.image-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

