/* Collection Explorer - Hans Gross Kriminalmuseum Archive */

/* CSS Custom Properties */
:root {
  /* Collection Colors */
  --collection-bg: #1a1a1a;
  --collection-grid: #2a2a2a;
  --collection-surface: #252525;
  
  /* Object Type Colors */
  --karteikarten-primary: #22c55e;
  --karteikarten-secondary: #16a34a;
  --karteikarten-incomplete: #15803d;
  
  --objekte-primary: #f97316;
  --objekte-secondary: #ea580c;
  --objekte-incomplete: #dc2626;
  
  /* State Colors */
  --hover-glow: rgba(255, 255, 255, 0.1);
  --select-ring: #3b82f6;
  --search-highlight: #fbbf24;
  --focus-outline: #60a5fa;
  
  /* UI Colors */
  --panel-bg: rgba(26, 26, 26, 0.95);
  --panel-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Museum Orange Accent */
  --museum-orange: #e65100;
  --museum-orange-light: #ff8a50;
  
  /* Typography */
  --font-ui: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Easing */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-indexes */
  --z-canvas: 1;
  --z-overlay: 10;
  --z-controls: 100;
  --z-modal: 1000;
  --z-toast: 1100;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-ui);
  background: var(--collection-bg);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--museum-orange);
  color: white;
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: 6px;
  z-index: var(--z-toast);
  font-weight: 600;
  transition: top 0.3s var(--ease-smooth);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Header */
.explorer-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-controls);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  padding: var(--space-4) var(--space-6);
}

.explorer-header .experiment-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 4px;
  font-size: 0.7rem;
}

.explorer-header .notice-badge {
  background: #ffc107;
  color: #000;
  padding: 2px 5px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.5px;
}

.explorer-header .notice-text {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-search {
  flex: 0 1 250px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: white;
  font-size: 0.8125rem;
  outline: none;
  transition: all 0.2s var(--ease-smooth);
}

.header-search::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.explorer-search-input {
  width: 100%;
  padding: 6px 32px 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s var(--ease-smooth);
}

.explorer-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.explorer-search-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: white;
}

.search-results-count {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 0.75rem;
  color: white;
  white-space: nowrap;
}

.search-results-count .results-number {
  font-weight: 600;
  margin-right: 4px;
}

.nav-link-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s var(--ease-smooth);
  white-space: nowrap;
}

.nav-link-main:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.nav-link-main .link-icon {
  font-size: 1rem;
}

.nav-link-main .link-text {
  white-space: nowrap;
}

.header-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  white-space: nowrap;
}

.header-icon {
  font-size: 1.25rem;
}

.header-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.header-stats {
  display: flex;
  gap: var(--space-6);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--museum-orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--collection-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  transition: opacity 0.5s var(--ease-smooth);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  max-width: 400px;
  padding: var(--space-8);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--collection-grid);
  border-top: 3px solid var(--museum-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-6);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-content h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.loading-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.loading-progress {
  width: 100%;
  height: 4px;
  background: var(--collection-grid);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--museum-orange), var(--museum-orange-light));
  border-radius: 2px;
  transition: width 0.3s var(--ease-smooth);
  width: 0%;
}

/* Main Explorer Interface */
.explorer-main {
  position: relative;
  height: 100vh;
  padding-top: 80px; /* Account for header */
}

.canvas-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 80px);
  background: var(--collection-bg);
  cursor: grab;
  overflow: hidden;
}

.canvas-container.grabbing {
  cursor: grabbing;
}

.main-canvas,
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background: transparent;
}

.grid-overlay {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
}

.grid-overlay.visible {
  opacity: 0.1;
}

/* Zoom Indicator */
.zoom-indicator {
  position: absolute;
  top: 80px;
  left: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 4px 8px;
  z-index: var(--z-overlay);
  font-size: 11px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.zoom-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: var(--space-2);
}

.zoom-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.zoom-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* Search Overlay */
.search-overlay {
  position: absolute;
  top: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-controls);
  width: 100%;
  max-width: 500px;
  padding: 0 var(--space-4);
}

.search-container {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: var(--space-4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: var(--space-3);
}

.search-input {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s var(--ease-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--museum-orange);
  box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  background: var(--museum-orange);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.search-clear:hover {
  background: var(--museum-orange-light);
  transform: translateY(-50%) scale(1.1);
}

.search-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.search-zoom-fit {
  background: var(--museum-orange);
  color: white;
  border: none;
  border-radius: 6px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: all 0.2s var(--ease-smooth);
}

.search-zoom-fit:hover {
  background: var(--museum-orange-light);
  transform: translateY(-1px);
}

/* Navigation Controls */
.nav-controls {
  position: fixed;
  right: 20px;
  top: 80px;
  z-index: var(--z-controls);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Zoom Controls */
.zoom-controls {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.zoom-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: #f0f0f0;
  border-color: #999;
  color: #333;
}

.zoom-btn:active {
  transform: scale(0.95);
}

.zoom-slider-container {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 2px 0;
}

.zoom-slider {
  -webkit-appearance: slider-vertical;
  width: 3px;
  height: 50px;
  background: #e0e0e0;
  border-radius: 2px;
  cursor: pointer;
  outline: none;
  writing-mode: vertical-lr;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--museum-orange);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s var(--ease-smooth);
}

.zoom-slider::-webkit-slider-thumb:hover {
  background: var(--museum-orange-light);
  transform: scale(1.1);
}

/* View Mode Controls */
.view-mode-controls {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.view-mode-btn {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-smooth);
}

.view-mode-btn:hover {
  background: var(--panel-border);
  color: var(--text-primary);
}

.view-mode-btn.active {
  background: var(--museum-orange);
  border-color: var(--museum-orange);
  color: white;
  box-shadow: 0 0 20px rgba(230, 81, 0, 0.3);
}

/* Minimap */
/* Combined Map & Legend Panel */
.map-legend-panel {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  z-index: var(--z-controls);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 200px;
}

.minimap-section {
  width: 200px;
  height: 160px;
  position: relative;
  border-bottom: 1px solid var(--panel-border);
}

.section-header {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.legend-section-compact {
  padding: 8px 12px;
}

.legend-items-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-item-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Legacy minimap styles for compatibility */
.minimap {
  display: none;
}

.minimap.collapsed {
  width: 60px;
  height: 60px;
}

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

.minimap-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.minimap.collapsed .minimap-title {
  display: none;
}

.minimap-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 4px;
  transition: color 0.2s var(--ease-smooth);
}

.minimap-toggle:hover {
  color: var(--text-primary);
}

.minimap-canvas {
  width: 100%;
  height: 120px;
  cursor: pointer;
  border-radius: 0 0 11px 11px;
}

.minimap.collapsed .minimap-canvas {
  display: none;
}

.minimap-viewport {
  position: absolute;
  border: 2px solid var(--select-ring);
  background: rgba(59, 130, 246, 0.1);
  pointer-events: none;
  border-radius: 2px;
}

/* Information Panel */
.info-panel {
  position: fixed;
  left: -400px;
  top: 80px;
  width: 400px;
  height: calc(100vh - 80px);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--panel-border);
  z-index: var(--z-controls);
  transition: left 0.3s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 24px rgba(0, 0, 0, 0.2);
}

.info-panel.open {
  left: 0;
}

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

.panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: 8px;
  transition: all 0.2s var(--ease-smooth);
}

.panel-close:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
}

.no-selection {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.no-selection-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

/* Object Details */
.object-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.object-image-section {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.object-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: contain;
}

.object-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--text-secondary);
}

.image-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.object-info-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.object-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.object-metadata {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.metadata-row {
  display: flex;
  gap: var(--space-2);
}

.metadata-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 60px;
}

.metadata-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
}

.no-selection h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.no-selection p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.interaction-hints {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: left;
}

.hint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--glass-bg);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.hint-key {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--collection-grid);
  color: var(--text-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-weight: 600;
}

.hint-action {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Legend */
.legend {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  width: 280px;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  z-index: var(--z-controls);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s var(--ease-smooth);
}

.legend.collapsed {
  width: 120px;
}

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

.legend-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.legend-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 4px;
  transition: all 0.2s var(--ease-smooth);
}

.legend-toggle:hover {
  color: var(--text-primary);
}

.legend.collapsed .legend-toggle {
  transform: rotate(180deg);
}

.legend-content {
  padding: var(--space-4);
  max-height: 300px;
  overflow-y: auto;
  transition: all 0.3s var(--ease-smooth);
}

.legend.collapsed .legend-content {
  display: none;
}

.legend-section {
  margin-bottom: var(--space-5);
}

.legend-section:last-child {
  margin-bottom: 0;
}

.legend-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-primary);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-color.karteikarten {
  background: var(--karteikarten-primary);
}

.legend-color.objekte {
  background: var(--objekte-primary);
}

.legend-color.complete {
  background: var(--karteikarten-primary);
}

.legend-color.partial {
  background: var(--museum-orange);
}

.legend-color.incomplete {
  background: var(--objekte-incomplete);
}

.zoom-levels {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.zoom-level-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding: var(--space-2);
  background: var(--glass-bg);
  border-radius: 6px;
}

.zoom-range {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.zoom-desc {
  color: var(--text-primary);
  font-weight: 500;
}

/* Help Overlay */
.help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
}

.help-overlay.active {
  display: flex;
}

.help-content {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

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

.help-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.help-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: 8px;
  transition: color 0.2s var(--ease-smooth);
}

.help-close:hover {
  color: var(--text-primary);
}

.help-body {
  padding: var(--space-6);
}

.help-section {
  margin-bottom: var(--space-6);
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.help-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.help-shortcuts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--glass-bg);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.shortcut-keys {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--collection-grid);
  color: var(--text-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-weight: 600;
}

.shortcut-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.help-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6);
  border-top: 1px solid var(--panel-border);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: var(--space-3) var(--space-5);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--museum-orange), var(--museum-orange-light));
  color: white;
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 81, 0, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
  background: var(--panel-border);
  transform: translateY(-1px);
}

/* Performance Monitor */
.performance-monitor {
  position: fixed;
  top: 100px;
  right: var(--space-4);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: var(--space-3);
  z-index: var(--z-controls);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.perf-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-1);
}

.perf-label {
  color: var(--text-muted);
}

.perf-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Back to Main Link */
.back-to-main {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-controls);
}

.back-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s var(--ease-smooth);
  backdrop-filter: blur(10px);
}

.back-link:hover {
  background: var(--museum-orange);
  border-color: var(--museum-orange);
  color: white;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav-controls {
    right: var(--space-4);
    transform: translateY(-50%) scale(0.9);
  }
  
  .minimap {
    width: 150px;
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .minimap-canvas {
    height: 90px;
  }
  
  .legend {
    width: 240px;
    bottom: var(--space-4);
    left: var(--space-4);
  }
  
  .search-overlay {
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .explorer-header {
    padding: var(--space-3) var(--space-4);
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
  
  .header-stats {
    gap: var(--space-4);
  }
  
  .explorer-main {
    padding-top: 120px;
  }
  
  .canvas-container {
    height: calc(100vh - 120px);
  }
  
  .info-panel {
    width: 100vw;
    left: -100vw;
    top: 120px;
    height: calc(100vh - 120px);
  }
  
  .info-panel.open {
    left: 0;
  }
  
  .nav-controls {
    bottom: var(--space-4);
    right: var(--space-4);
    top: auto;
    transform: none;
    flex-direction: row;
  }
  
  .zoom-controls {
    flex-direction: row;
    padding: var(--space-3);
  }
  
  .zoom-slider-container {
    height: auto;
    width: 80px;
  }
  
  .zoom-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 20px;
  }
  
  .minimap,
  .legend {
    display: none;
  }
  
  .search-overlay {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    max-width: none;
    padding: var(--space-4);
  }
  
  .back-to-main {
    top: var(--space-3);
    right: var(--space-3);
  }
  
  .back-link {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
  }
  
  .zoom-indicator {
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-2) var(--space-3);
  }
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --panel-border: rgba(255, 255, 255, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.1);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .loading-spinner {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .explorer-header,
  .nav-controls,
  .search-overlay,
  .minimap,
  .legend,
  .help-overlay,
  .performance-monitor,
  .back-to-main {
    display: none !important;
  }
  
  .canvas-container {
    height: 100vh;
    background: white;
  }
  
  .explorer-main {
    padding-top: 0;
  }
}

/* Hierarchy Navigation Styles */

/* Hierarchy Controls */
.hierarchy-controls {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--space-4);
}

.hierarchy-level-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hierarchy-btn {
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-smooth);
  position: relative;
}

.hierarchy-btn:hover {
  background: var(--panel-border);
  color: var(--text-primary);
  transform: scale(1.05);
}

.hierarchy-btn.active {
  background: var(--museum-orange);
  border-color: var(--museum-orange);
  color: white;
  box-shadow: 0 0 20px rgba(230, 81, 0, 0.3);
}

.hierarchy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.hierarchy-btn::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--collection-bg);
  color: var(--text-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  margin-left: var(--space-2);
  border: 1px solid var(--panel-border);
  transition: opacity 0.2s var(--ease-smooth);
  z-index: 1000;
}

.hierarchy-btn:hover::after {
  opacity: 1;
}

.hierarchy-navigation {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--panel-border);
}

.nav-btn {
  width: 44px;
  height: 36px;
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-smooth);
}

.nav-btn:hover:not(:disabled) {
  background: var(--museum-orange);
  border-color: var(--museum-orange);
  color: white;
  transform: translateY(-1px);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Breadcrumb Navigation */
.hierarchy-breadcrumb {
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 0.875rem;
  max-width: 100%;
  overflow: hidden;
}

.breadcrumb-item {
  color: var(--text-secondary);
  transition: color 0.2s var(--ease-smooth);
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-item:hover {
  color: var(--text-primary);
  background: var(--panel-border);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--museum-orange);
  color: white;
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 var(--space-1);
}

/* Level Indicator */
.level-indicator {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--glass-bg);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  margin-left: var(--space-3);
}

/* Container Object Styling */
.container-object {
  position: relative;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.container-object:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.container-object.selected {
  filter: brightness(1.2);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
}

/* Hierarchy-specific zoom levels */
.zoom-level-hierarchy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--glass-bg);
  border-radius: 8px;
  margin-top: var(--space-3);
}

.zoom-level-hierarchy h4 {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hierarchy-zoom-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding: var(--space-1);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s var(--ease-smooth);
}

.hierarchy-zoom-item:hover {
  background: var(--panel-border);
}

.hierarchy-zoom-item.active {
  background: var(--museum-orange);
  color: white;
}

.hierarchy-level-name {
  font-weight: 500;
  color: var(--text-primary);
}

.hierarchy-level-desc {
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* Hierarchy Context Panel */
.hierarchy-context {
  position: fixed;
  top: 160px;
  left: var(--space-4);
  width: 280px;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  z-index: var(--z-controls);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s var(--ease-smooth);
}

.hierarchy-context.collapsed {
  width: 60px;
  height: 60px;
  overflow: hidden;
}

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

.hierarchy-context-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.hierarchy-context.collapsed .hierarchy-context-title {
  display: none;
}

.hierarchy-context-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 4px;
  transition: color 0.2s var(--ease-smooth);
}

.hierarchy-context-toggle:hover {
  color: var(--text-primary);
}

.hierarchy-context.collapsed .hierarchy-context-toggle {
  transform: rotate(180deg);
}

.hierarchy-context-content {
  padding: var(--space-4);
  max-height: 400px;
  overflow-y: auto;
}

.hierarchy-context.collapsed .hierarchy-context-content {
  display: none;
}

.context-section {
  margin-bottom: var(--space-4);
}

.context-section:last-child {
  margin-bottom: 0;
}

.context-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-2) 0;
}

.context-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.context-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding: var(--space-2);
  background: var(--glass-bg);
  border-radius: 6px;
}

.context-stat-label {
  color: var(--text-secondary);
}

.context-stat-value {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Hierarchy Search Enhancements */
.hierarchy-search-filters {
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: var(--space-3);
  margin-top: var(--space-3);
}

.search-scope-selector {
  margin-bottom: var(--space-3);
}

.search-scope-selector label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
  display: block;
}

.search-scope-select {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: var(--space-2);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.search-hierarchy-level {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Responsive Design for Hierarchy Features */
@media (max-width: 1024px) {
  .hierarchy-controls {
    transform: scale(0.9);
  }
  
  .hierarchy-context {
    width: 240px;
    left: var(--space-3);
  }
  
  .breadcrumb-item {
    max-width: 100px;
  }
}

@media (max-width: 768px) {
  .hierarchy-controls {
    flex-direction: row;
    padding: var(--space-2);
  }
  
  .hierarchy-level-selector {
    flex-direction: row;
  }
  
  .hierarchy-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .hierarchy-btn::after {
    display: none; /* Hide tooltips on mobile */
  }
  
  .hierarchy-context {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    margin: var(--space-3) 0;
  }
  
  .hierarchy-breadcrumb {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
  }
  
  .breadcrumb-item {
    max-width: 80px;
    padding: var(--space-1);
  }
  
  .level-indicator {
    display: none; /* Hide on mobile to save space */
  }
}

/* Animation for hierarchy transitions */
@keyframes hierarchyTransition {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hierarchy-transition {
  animation: hierarchyTransition 0.3s var(--ease-smooth);
}

/* Focus states for accessibility */
.hierarchy-btn:focus-visible,
.nav-btn:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 2px;
}

.breadcrumb-item:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 1px;
}

/* Action buttons in object details */
.object-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--font-small);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-primary);
}

.action-btn.primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.action-btn.primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.action-btn.gams-link {
  background: var(--bg-tertiary);
  border-color: var(--border-accent);
}

.action-btn.gams-link:hover {
  background: var(--bg-hover);
  border-color: var(--color-accent);
}

