:root {
  /* Professionelle Blau-Grau-Palette */
  --primary-dark: #1a3a52;
  --primary-blue: #2c5aa0;
  --secondary-blue: #4a7ba7;
  --accent-blue: #5ba3d0;
  --light-gray: #f5f7fa;
  --gray-border: #e1e8ef;
  --gray-text: #6b7280;
  --text-dark: #1f2937;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #eff2f5 100%);
  color: var(--text-dark);
  overflow: hidden;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #eff2f5 100%);
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  color: white;
  padding: 20px 30px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  border-bottom: 3px solid var(--accent-blue);
}

.header-content {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-title i {
  font-size: 2em;
  opacity: 0.9;
}

.header-title h1 {
  font-size: 1.8em;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-title p {
  font-size: 0.9em;
  opacity: 0.85;
  margin-left: auto;
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 300px 1fr 380px;
  gap: 15px;
  padding: 15px;
  flex: 1;
  overflow: hidden;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Panels */
.left-panel,
.right-panel {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.map-panel {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#mapContainer {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Panel Section */
.panel-section {
  padding: 2px;
  border-bottom: 1px solid var(--gray-border);
  display: flex;
  flex-direction: column;
}

.panel-section:last-child {
  border-bottom: none;
  flex: 1;
  overflow-y: auto;
}

.panel-section h2 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-section i {
  color: var(--primary-blue);
}

.divider {
  height: 1px;
  background: var(--gray-border);
  margin: 15px 0;
}

/* Locations List */
.locations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.location-item {
  padding: 12px;
  background: var(--light-gray);
  border: 2px solid transparent;
  border-left: 4px solid var(--accent-blue);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.location-item:hover {
  background: linear-gradient(135deg, rgba(90, 163, 208, 0.1) 0%, rgba(74, 123, 167, 0.05) 100%);
  border-left-color: var(--primary-blue);

}

.location-item.active {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: white;
  border-left-color: var(--accent-blue);
}

.location-item.active .location-name {
  color: white;
  font-weight: 700;
}

.location-item.active .location-coords {
  color: rgba(255, 255, 255, 0.9);
}

.location-name {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.location-coords {
  font-size: 0.8em;
  color: var(--gray-text);
  font-family: 'Monaco', 'Courier New', monospace;
  letter-spacing: 0.3px;
}

/* Manual Input */
.manual-input h3 {
  font-size: 0.95em;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coord-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.coord-inputs input {
  padding: 10px 12px;
  border: 2px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
  transition: var(--transition);
}

.coord-inputs input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.panel-section.results-section {
  padding-top: 0;
}
/* Buttons */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: white;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {

  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-search {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: white;
  width: 100%;
  padding: 7px;
  font-size: 0.95em;
  margin-top: 1px;
  box-shadow: var(--shadow-sm);
}

.btn-search:hover:not(:disabled) {

  box-shadow: var(--shadow-md);
}

.btn-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Search Section */
.search-section {
  padding: 20px;
  border-bottom: 1px solid var(--gray-border);
}

.selected-location {
  background: linear-gradient(135deg, rgba(90, 163, 208, 0.1) 0%, rgba(74, 123, 167, 0.05) 100%);
  padding: 1px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
  margin-bottom: 1px;
}

.location-info p {
  font-size: 0.85em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.location-info i {
  color: var(--primary-blue);
  min-width: 16px;
}

.location-info strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* Radius Section */
.radius-section {
  margin-bottom: 15px;
}

.radius-section label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9em;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.radius-section i {
  color: var(--primary-blue);
}

.radius-input {
  display: flex;
  gap: 12px;
  align-items: center;
}

.radius-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent-blue), var(--primary-blue));
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.radius-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary-blue);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.radius-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary-blue);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.radius-display {
  min-width: 70px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(90, 163, 208, 0.1) 0%, rgba(74, 123, 167, 0.05) 100%);
  border-radius: 6px;
  font-weight: 700;
  color: var(--primary-blue);
  font-size: 0.9em;
  text-align: center;
  border: 1px solid var(--accent-blue);
}

/* Results Section */
.results-section {
  flex: 1;
  overflow-y: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--gray-text);
  text-align: center;
}

.empty-state i {
  font-size: 3em;
  color: var(--accent-blue);
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.9em;
}

/* Results Info */
.results-info {
  background: linear-gradient(135deg, rgba(90, 163, 208, 0.1) 0%, rgba(74, 123, 167, 0.05) 100%);
  border: 1px solid var(--accent-blue);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.results-info p {
  font-size: 0.85em;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.results-info strong {
  color: var(--text-dark);
  font-weight: 600;
}

.results-info i {
  color: var(--primary-blue);
  min-width: 16px;
}

.results-data {
  background: white;
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  border-left: 4px solid var(--primary-blue);
  padding: 3px;
margin-top: 3px;
}

.results-data p {
  font-size: 0.8em;
  color: var(--gray-text);
  word-break: break-word;
  line-height: 1.5;
  margin-bottom: 0;
}

.results-data strong {
  color: var(--text-dark);
  display: block;
  font-size: 0.85em;
  margin-bottom: 1px;
}

#copyAllButton {
  width: 100%;
  margin-top: 12px;
}

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading p {
  font-size: 0.9em;
  color: var(--gray-text);
}

/* Error Message */
.error-message {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  border: 1px solid var(--error);
  border-left: 4px solid var(--error);
  color: var(--error);
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

/* Responsive */
@media (max-width: 1400px) {
  .main-content {
    grid-template-columns: 280px 1fr 350px;
    gap: 12px;
    padding: 12px;
  }
}

@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .left-panel,
  .right-panel,
  .map-panel {
    max-height: none;
  }

  .header-title p {
    display: none;
  }
}

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

  .header-title h1 {
    font-size: 1.4em;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .left-panel,
  .right-panel {
    max-height: 400px;
  }
}