/* Map specific styles */

.map-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-bg);
}

/* Map Header */
.map-header {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.map-title h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.map-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.map-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.player-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}

.player-count .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Map Container */
.map-container {
  flex: 1;
  display: flex;
  position: relative;
}

.map-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #E8EFE0;
}

.map-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(135deg, #E8F4EC 0%, #C2E2BC 100%),
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(74, 124, 89, 0.02) 10px, rgba(74, 124, 89, 0.02) 20px);
}

/* Player Markers */
.player-marker {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.2s;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.player-marker:hover {
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 20;
}

.player-marker svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.player-marker.carnivore {
  background: linear-gradient(135deg, #EF4444, #DC2626);
}

.player-marker.carnivore svg {
  color: white;
}

.player-marker.herbivore {
  background: linear-gradient(135deg, #22C55E, #16A34A);
}

.player-marker.herbivore svg {
  color: white;
}

.player-marker.friend {
  border-color: #3B82F6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.player-marker.friend-marker {
  border-color: #F59E0B;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Map Zones */
.map-zone {
  position: absolute;
  border: 2px dashed;
  border-radius: var(--radius-md);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.map-zone.water {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
}

.map-zone.forest {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
}

.zone-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Map Sidebar */
.map-sidebar {
  width: 320px;
  background: var(--surface-1);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-sidebar.hidden {
  display: none;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.sidebar-close {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.15s;
}

.sidebar-close:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Player List */
.player-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-bg);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.15s;
}

.player-item:hover {
  background: var(--surface-2);
}

.player-item.friend {
  background: var(--forest-100);
  border: 1px solid var(--forest-600);
}

.player-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.player-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.player-dino {
  font-size: 12px;
  margin-bottom: 2px;
}

.player-dino.carnivore {
  color: #DC2626;
}

.player-dino.herbivore {
  color: #16A34A;
}

.player-distance {
  font-size: 11px;
  color: var(--text-tertiary);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--forest-600);
  border-color: var(--forest-600);
  color: white;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.legend-icon.you {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.legend-icon.you svg {
  color: white;
}

.legend-icon.friend {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border-color: #F59E0B;
}

.legend-icon.friend svg {
  color: white;
}

.legend-icon.carnivore {
  background: linear-gradient(135deg, #EF4444, #DC2626);
}

.legend-icon.carnivore svg {
  color: white;
}

.legend-icon.herbivore {
  background: linear-gradient(135deg, #22C55E, #16A34A);
}

.legend-icon.herbivore svg {
  color: white;
}

/* Coming Soon Overlay */
.coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.coming-soon-content {
  text-align: center;
  max-width: 400px;
  padding: 32px;
}

.coming-soon-icon {
  width: 80px;
  height: 80px;
  color: var(--forest-600);
  margin: 0 auto 24px;
  stroke-width: 1.5;
}

.coming-soon-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.coming-soon-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.coming-soon-note {
  font-size: 14px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .map-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .map-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  }

  .map-legend {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .player-marker {
    width: 28px;
    height: 28px;
  }

  .player-marker svg {
    width: 16px;
    height: 16px;
  }
}
