/* 全局样式 */
:root {
  --primary-color: #ffffff;
  --success-color: #ffffff;
  --warning-color: #cccccc;
  --danger-color: #ffffff;
  --background-color: #000000;
  --card-background: #111111;
  --card-background-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #808080;
  --border-radius: 12px;
  --transition-speed: 0.3s;
  --border-color: #333333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 头部样式 */
.header {
  margin-bottom: 3rem;
  text-align: center;
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(241, 245, 249, 0.1);
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 统计概览样式 */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 
              0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all var(--transition-speed);
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-4px);
  background: var(--card-background-hover);
  box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff, #cccccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* 地图部分样式 */
.map-section {
  background: var(--card-background);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.map-section h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* 服务网格样式 */
.services h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.service-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.service-card {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all var(--transition-speed);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-card:hover {
  transform: translateY(-4px);
  background: var(--card-background-hover);
  box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.service-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.service-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.service-uptime {
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.service-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.metric .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.service-status {
  margin-top: 1rem;
}

.status-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.status-indicator {
  height: 100%;
  border-radius: 999px;
  transition: width var(--transition-speed);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.timeline {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* 服务地图样式 */
.service-map {
  margin: 1rem auto;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 80%;
  transition: all var(--transition-speed);
  overflow: hidden;
}

.map-toggle {
  cursor: pointer;
  padding: 12px;
  background: var(--card-background-hover);
  border-radius: var(--border-radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-speed);
  user-select: none;
}

.map-toggle:hover {
  background: var(--border-color);
}

.toggle-icon {
  transition: transform var(--transition-speed);
}

.map-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .service-metrics {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .service-card {
    padding: 1rem;
  }

  .service-map {
    margin: 1rem -1rem;
    padding: 1rem;
  }
}

/* 动画效果 */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.warning .stat-value {
  background: linear-gradient(135deg, #ffffff, #cccccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.alert .stat-value {
  background: linear-gradient(135deg, #ffffff, #cccccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 2s infinite;
}