/* 服务器状态卡�?- 全新现代设计 */
.server-status-card {
  max-width: 600px;
  margin: 2rem auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

#mc-status.updating {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.server-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 服务器头�?*/
.server-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.server-status-card.offline .server-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.server-status-card.error .server-header {
  background: linear-gradient(135deg, #ff9500 0%, #ff6b35 100%);
}

.server-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.server-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.server-info {
  flex: 1;
}

.server-name {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.server-version {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 500;
}

.server-players {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 500;
}

.server-status-text {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 500;
}

.error-details {
  margin: 0.5rem 0 0 0;
  font-size: 0.75rem;
  opacity: 0.8;
  font-family: 'Monaco', 'Menlo', monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 服务器指�?*/
.server-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.metric-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.metric-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.metric-item:hover::before {
  opacity: 1;
}

.metric-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric-item.excellent {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.metric-item.good {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.metric-item.fair {
  border-color: #f97316;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
}

.metric-item.poor {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.metric-item.neutral {
  border-color: #6b7280;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.metric-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.metric-icon svg {
  width: 20px;
  height: 20px;
  color: #374151;
}

.metric-item.excellent .metric-icon {
  background: #10b981;
  color: white;
}

.metric-item.good .metric-icon {
  background: #f59e0b;
  color: white;
}

.metric-item.fair .metric-icon {
  background: #f97316;
  color: white;
}

.metric-item.poor .metric-icon {
  background: #ef4444;
  color: white;
}

.metric-item.neutral .metric-icon {
  background: #6b7280;
  color: white;
}

.metric-content {
  flex: 1;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 0.125rem;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
}

.metric-sub {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}

/* 玩家列表区域 */
.players-section {
  padding: 1.5rem;
  background: #ffffff;
}

.players-title {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
}

.players-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
  margin-right: 0.5rem;
}

.players-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.player-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  position: relative;
}

.player-item:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  margin-right: 0.75rem;
  border: 2px solid #e2e8f0;
  transition: border-color 0.2s ease;
}

.player-item:hover .player-avatar {
  border-color: #667eea;
}

.player-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-players {
  text-align: center;
  color: #9ca3af;
  padding: 2rem 1rem;
  font-style: italic;
  font-size: 0.875rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* 响应式设�?*/
@media (max-width: 640px) {
  .server-status-card {
    margin: 1rem;
    max-width: none;
  }

  .server-header {
    padding: 1rem;
  }

  .server-icon {
    width: 40px;
    height: 40px;
  }

  .server-icon svg {
    width: 20px;
    height: 20px;
  }

  .server-name {
    font-size: 1.125rem;
  }

  .server-metrics {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.75rem;
  }

  .metric-item {
    padding: 0.875rem;
  }

  .players-list {
    grid-template-columns: 1fr;
  }

  .players-section {
    padding: 1rem;
  }
}

/* 暗色模式支持 */
[data-md-color-scheme="slate"] .server-status-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
}

[data-md-color-scheme="slate"] .server-metrics {
  background: #1e293b;
  border-bottom-color: #334155;
}

[data-md-color-scheme="slate"] .metric-item {
  background: #334155;
  border-color: #475569;
}

[data-md-color-scheme="slate"] .metric-item.excellent {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  border-color: #10b981;
}

[data-md-color-scheme="slate"] .metric-item.good {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  border-color: #f59e0b;
}

[data-md-color-scheme="slate"] .metric-item.fair {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
  border-color: #f97316;
}

[data-md-color-scheme="slate"] .metric-item.poor {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  border-color: #ef4444;
}

[data-md-color-scheme="slate"] .metric-item.neutral {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  border-color: #6b7280;
}

[data-md-color-scheme="slate"] .metric-value {
  color: #f1f5f9;
}

[data-md-color-scheme="slate"] .metric-label {
  color: #94a3b8;
}

[data-md-color-scheme="slate"] .metric-sub {
  color: #64748b;
}

[data-md-color-scheme="slate"] .players-section {
  background: #1e293b;
}

[data-md-color-scheme="slate"] .players-title {
  color: #e2e8f0;
}

[data-md-color-scheme="slate"] .players-title::before {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-md-color-scheme="slate"] .player-item {
  background: #334155;
  border-color: #475569;
}

[data-md-color-scheme="slate"] .player-item:hover {
  background: #475569;
  border-color: #64748b;
}

[data-md-color-scheme="slate"] .player-name {
  color: #e2e8f0;
}

[data-md-color-scheme="slate"] .no-players {
  background: #334155;
  border-color: #475569;
  color: #64748b;
}

/* 加载动画 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.server-status-card.loading .metric-item {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 状态变化动�?*/
.server-status-card {
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

