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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a1a;
  color: #e2e8f0;
}

#globeContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#globeContainer:active {
  cursor: grabbing;
}

/* Tooltip styling injected by globe.gl */
.globe-tooltip {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid rgba(247, 147, 26, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  max-width: 280px;
}

.globe-tooltip strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #f7931a;
  font-family: 'JetBrains Mono', monospace;
}

.globe-tooltip .tooltip-row {
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  word-break: break-all;
}

#uiPanel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 340px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(247, 147, 26, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.panel-handle {
  display: none;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f7931a 0%, #ffcd4e 50%, #f7931a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.panel-header .subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
  font-weight: 400;
}

.error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.error-banner.hidden {
  display: none;
}

.error-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.error-text {
  font-size: 13px;
  color: #fca5a5;
  line-height: 1.4;
}

.stats-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-item {
  background: rgba(30, 41, 59, 0.6);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(247, 147, 26, 0.1);
}

.stat-item:last-child {
  grid-column: span 2;
}

.stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #f7931a;
  font-weight: 500;
}

.selected-info {
  animation: slideIn 0.3s ease;
}

.selected-info.hidden {
  display: none;
}

.no-selection {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 14px;
  font-style: italic;
}

.no-selection.hidden {
  display: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(247, 147, 26, 0.4), transparent);
  margin-bottom: 20px;
}

.selected-info h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #f1f5f9;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.info-item {
  background: rgba(30, 41, 59, 0.5);
  padding: 12px 10px;
  border-radius: 8px;
}

.info-item.full-width {
  grid-column: span 2;
}

.info-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

.info-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #22d3ee;
  font-weight: 500;
  word-break: break-all;
}

.info-summary {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  font-style: italic;
}

.panel-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
  text-align: center;
}

.panel-footer a {
  font-size: 12px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.panel-footer a:hover {
  color: #f7931a;
}

/* Mobile styles */
@media (max-width: 768px) {
  #uiPanel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 55vh;
    border-radius: 24px 24px 0 0;
    padding: 12px 16px 24px;
  }
  
  .panel-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(247, 147, 26, 0.4);
    border-radius: 2px;
    margin: 0 auto 12px;
  }
  
  .panel-header {
    margin-bottom: 16px;
  }
  
  .panel-header h1 {
    font-size: 1.4rem;
  }
  
  .panel-header .subtitle {
    font-size: 0.8rem;
  }
  
  .stats-section {
    margin-bottom: 16px;
    gap: 8px;
  }
  
  .stat-item {
    padding: 10px;
  }
  
  .stat-value {
    font-size: 12px;
  }
  
  .info-grid {
    gap: 8px;
  }
  
  .info-item {
    padding: 10px 8px;
  }
  
  .info-label {
    font-size: 9px;
  }
  
  .info-value {
    font-size: 10px;
  }
  
  .info-summary {
    font-size: 12px;
  }
  
  .panel-footer {
    margin-top: 16px;
    padding-top: 12px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  #uiPanel {
    padding: 10px 12px 20px;
  }
  
  .panel-header h1 {
    font-size: 1.25rem;
  }
  
  .info-item {
    padding: 8px 6px;
  }
  
  .info-value {
    font-size: 9px;
  }
}

/* Scrollbar styling */
#uiPanel::-webkit-scrollbar {
  width: 6px;
}

#uiPanel::-webkit-scrollbar-track {
  background: transparent;
}

#uiPanel::-webkit-scrollbar-thumb {
  background: rgba(247, 147, 26, 0.3);
  border-radius: 3px;
}

#uiPanel::-webkit-scrollbar-thumb:hover {
  background: rgba(247, 147, 26, 0.5);
}