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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
}

header {
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 500;
}

main {
  padding: 1.5rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.input-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.input-section label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

#callsign-input {
  flex: 1;
  max-width: 400px;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  text-transform: uppercase;
  font-family: inherit;
  resize: vertical;
}

#callsign-input:focus {
  outline: none;
  border-color: #3498db;
}

#lookup-btn {
  padding: 0.75rem 1.5rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

#lookup-btn:hover {
  background: #2980b9;
}

#lookup-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

#status-message {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #666;
}

#status-message.error {
  color: #e74c3c;
}

#status-message.success {
  color: #27ae60;
}

.content-wrapper {
  display: flex;
  gap: 1.5rem;
}

.table-section {
  flex: 1;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.table-section h2,
.map-section h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 1rem;
}

#results-table {
  width: 100%;
  border-collapse: collapse;
  display: none;
}

#results-table.has-data {
  display: table;
}

#results-table th,
#results-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#results-table th {
  background: #f8f9fa;
  font-weight: 500;
  color: #555;
}

#results-table td {
  vertical-align: top;
}

#results-table td[contenteditable="true"] {
  cursor: text;
  min-width: 100px;
}

#results-table td[contenteditable="true"]:focus {
  outline: 2px solid #3498db;
  outline-offset: -2px;
  background: #f0f8ff;
}

.callsign-cell {
  font-weight: 600;
  font-family: monospace;
  font-size: 1.1rem;
}

.delete-btn {
  padding: 0.4rem 0.8rem;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.delete-btn:hover {
  background: #c0392b;
}

#empty-message {
  color: #888;
  font-style: italic;
}

#empty-message.hidden {
  display: none;
}

.map-section {
  flex: 1;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#map {
  height: 500px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

@media (max-width: 900px) {
  .content-wrapper {
    flex-direction: column;
  }

  #map {
    height: 400px;
  }
}
