/* Map enhancements - real colors and hover effects */

/* Enhance map country colors to look more realistic */
.map-country-path {
  transition: fill 0.3s ease, stroke 0.3s ease, opacity 0.3s ease;
}

.map-country-path {
  /* Use more realistic earth tones for country fill */
  fill: #3d6b2f; /* A realistic forest/earth tone */
  stroke: rgba(95, 130, 150, 0.4);
  stroke-width: 0.55;
}

.map-country-path:hover,
.map-country-path.highlighted {
  fill: #5d8b4f !important; /* Lighter shade on hover */
  stroke: rgba(158, 196, 207, 0.6) !important;
}

/* Realistic map background */
#worldmap {
  background: linear-gradient(135deg, #1a3a5f 0%, #2a4a6f 100%);
}

/* Enhance node visibility and styling */
.map-node-core {
  transition: r 0.2s ease, filter 0.2s ease;
}

.map-node-core:hover {
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.8)) !important; /* Gold/yellow glow on hover */
}

.map-node-pulse {
  animation: mapPulse 3s ease-in-out infinite;
}

/* Enhance tooltip appearance */
.map-tooltip {
  background: rgba(30, 30, 40, 0.96) !important;
  border: 1px solid rgba(255, 215, 0, 0.6) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(12px) !important;
}

/* Ranking enhancements */
.ranking-header {
  position: relative;
}

.ranking-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: var(--text2);
  position: sticky;
  top: 0;
  background: rgba(13, 13, 26, 0.9);
  padding: 10px 0;
  z-index: 10;
}

/* Rank number enhancements - show ranking order clearly */
.rank-number {
  font-size: 32px !important;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.rank-number::before {
  content: attr(data-rank);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--gold);
  font-weight: bold;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 2;
}

/* Special ranks styling */
.rank-number.rank-1::before { content: "🥇"; font-size: 16px; }
.rank-number.rank-2::before { content: "🥈"; font-size: 16px; }
.rank-number.rank-3::before { content: "🥉"; font-size: 16px; }

/* Progress bar enhancements - fix width to match score ratio */
.signal-track {
  position: relative;
  height: 20px;
  border-radius: 10px;
  border: 1px solid rgba(0, 191, 255, 0.12);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.signal-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0; /* Will be set dynamically based on score */
  min-width: 0;
  background: linear-gradient(90deg, rgba(0,191,255,0.14), rgba(0,191,255,0.42));
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Fix for register page layout - make the boxes equal size */
.register-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.register-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

/* Remove the booting live sync area if present */
#booting-live-sync {
  display: none !important;
}

/* Header enhancements for user login */
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 18px;
  background: rgba(0, 170, 255, 0.1);
  border: 1px solid rgba(0, 170, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile:hover {
  background: rgba(0, 170, 255, 0.2);
  border-color: rgba(0, 170, 255, 0.4);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00AAFF, #00FF99);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.user-name {
  font-size: 12px;
  color: var(--text);
  font-family: var(--font-data);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 51, 85, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ranking-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .rank-number {
    font-size: 24px !important;
    min-width: 48px;
  }

  .rank-number::before {
    font-size: 10px;
    top: -16px;
  }

  .signal-track {
    height: 16px;
  }
}