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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a1a;
  color: #ccc;
  min-height: 100vh;
}

.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 30px 20px;
  text-align: center;
  border-bottom: 1px solid #333;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  color: #fff;
}

header .subtitle {
  font-size: 0.95rem;
  color: #888;
}

main {
  flex: 1;
  padding: 30px 20px;
  width: 100%;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 2px solid #333;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: #888;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: #ff8800;
  border-bottom-color: #ff8800;
}

.hidden {
  display: none !important;
}

.search-section {
  background: transparent;
  margin-bottom: 30px;
}

.input-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.coord-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coord-input label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.coord-input input,
.name-search-input {
  padding: 10px 12px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #fff;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.coord-input input:focus,
.name-search-input:focus {
  outline: none;
  background: #333;
  border-color: #ff8800;
  box-shadow: 0 0 8px rgba(255, 136, 0, 0.2);
}

.name-search-input {
  width: 100%;
}

.button-group {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 12px 32px;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: #ff8800;
  color: #fff;
  flex: 1;
}

.btn-primary:hover {
  background: #ff9922;
}

.btn-primary:active {
  background: #dd7700;
}

.btn-secondary {
  background: #2a2a2a;
  color: #ff8800;
  border: 1px solid #ff8800;
}

.btn-secondary:hover {
  background: #3a3a3a;
}

.format-hint {
  color: #666;
  font-size: 0.8rem;
  margin-top: 10px;
}

.results-section {
  margin-top: 30px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.results-header h2 {
  font-size: 1.3rem;
  color: #fff;
}

.result-count {
  background: #2a2a2a;
  color: #ff8800;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid #ff8800;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item {
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.result-item:hover {
  background: #333;
  border-color: #ff8800;
}

.result-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #ff8800;
  margin-bottom: 8px;
  word-break: break-all;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  font-size: 0.9rem;
}

.detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  color: #666;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.detail-value {
  color: #ccc;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coords-text {
  flex: 1;
}

.copy-btn {
  background: #ff8800;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  color: #fff;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #ff9922;
}

.copy-btn:active {
  background: #dd7700;
}

.distance-badge {
  background: rgba(255, 136, 0, 0.1);
  color: #ff8800;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid #ff8800;
  display: inline-block;
  width: fit-content;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1rem;
}

.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 3px solid #333;
  border-top-color: #ff8800;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

footer {
  text-align: center;
  padding: 20px;
  color: #555;
  font-size: 0.85rem;
  border-top: 1px solid #333;
}

footer a {
  color: #ff8800;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ff9922;
  text-decoration: underline;
}

.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Tablet und Zwischengröße */
@media (max-width: 1024px) {
  main {
    padding: 20px 15px;
  }

  .input-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .result-details {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  header {
    padding: 20px 15px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header .subtitle {
    font-size: 0.9rem;
  }

  main {
    padding: 20px 15px;
  }

  .tabs {
    margin-bottom: 20px;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  .search-section {
    margin-bottom: 20px;
  }

  .input-group {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
  }

  .coord-input label {
    font-size: 0.75rem;
  }

  .coord-input input,
  .name-search-input {
    padding: 10px;
    font-size: 16px;
  }

  .button-group {
    flex-direction: column;
    gap: 8px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .format-hint {
    font-size: 0.75rem;
    margin-top: 8px;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
  }

  .results-header h2 {
    font-size: 1.1rem;
  }

  .result-count {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  .result-item {
    padding: 12px;
  }

  .result-name {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .result-details {
    grid-template-columns: 1fr;
    gap: 10px;
    font-size: 0.85rem;
  }

  .detail-label {
    font-size: 0.7rem;
  }

  .detail-value {
    font-size: 0.85rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .copy-btn {
    padding: 4px 6px;
    font-size: 0.75rem;
    margin-top: 4px;
  }

  .distance-badge {
    font-size: 0.8rem;
    padding: 3px 8px;
  }

  .no-results {
    padding: 30px 15px;
    font-size: 0.95rem;
  }

  .loading {
    padding: 30px 15px;
  }

  .spinner {
    width: 35px;
    height: 35px;
  }

  footer {
    padding: 15px;
    font-size: 0.75rem;
  }

  .footer-links {
    margin-top: 8px;
    gap: 12px;
    flex-wrap: wrap;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }

  .tabs {
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.2px;
  }

  .search-section {
    margin-bottom: 15px;
  }

  .input-group {
    gap: 8px;
  }

  .coord-input input,
  .name-search-input {
    padding: 8px;
    font-size: 16px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .result-item {
    padding: 10px;
  }

  .result-name {
    font-size: 0.95rem;
  }

  .results-header h2 {
    font-size: 1rem;
  }

  .detail-value {
    flex-direction: column;
    gap: 6px;
  }

  .coords-text {
    word-break: break-all;
  }

  .copy-btn {
    align-self: flex-start;
  }
}
