body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 20px 20px 0px 20px;
  background: #f4f4f4;
  min-height: 100vh;
  margin: 0;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: #c7dce0;
  color: #495057;
  padding: 20px;
  text-align: center;
  margin: 0;
}

.header h2 {
  margin: 0;
  font-size: 2.2em;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.content {
  padding: 30px;
}

.form-section {
  background: #f8f9fa;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.form-group {
  flex: 1;
  margin-right: 15px;
}

.form-group:last-child {
  margin-right: 0;
}



.form-group input[type="datetime-local"] {
  width: 100%;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #495057;
  font-size: 0.9em;
  letter-spacing: 0.5px;
}

input, select {
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
  color: #495057;
  width: 100%;
  box-sizing: border-box;
}

/* Make callsign field smaller */
.callsign-group {
  flex: 0 0 auto;
  width: auto;
}

#callsign {
  width: 150px;
  min-width: 150px;
}

/* Make time offset field smaller */
.time-offset-group {
  flex: 0 0 auto;
  width: auto;
  max-width: 200px;
}

#time-offset {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

input:focus, select:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

input:hover, select:hover {
  border-color: #adb5bd;
}

.tooltip-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #6c757d;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 16px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 5px;
  cursor: help;
  transition: background-color 0.3s ease;
  position: relative;
}

.tooltip-icon:hover {
  background: #4CAF50;
}

.tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.4;
  white-space: normal;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-icon:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

button {
  padding: 12px 24px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  min-width: 120px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
}

.map-section {
  margin: 25px 0;
}

#map {
  width: 100%;
  height: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.flight-time-section {
  margin: 20px 0;
  text-align: center;
}

.flight-time-box {
  display: inline-block;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 15px 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.flight-time-label {
  font-weight: 600;
  color: #495057;
  margin-right: 10px;
}

.flight-time-value {
  font-weight: 700;
  color: #007bff;
  font-size: 1.1em;
}



.results-section {
  background: white;
  padding: 20px;
  margin-top: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

table {
  border-collapse: collapse;
  width: 100%;
  background: white;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

th {
  background: #e9ecef;
  color: #495057;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 0.85em;
}

tr:hover {
  background-color: #f8f9fa;
}

td a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

td a:hover {
  text-decoration: underline;
}

.maplibregl-popup {
  max-width: 350px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.maplibregl-popup-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.4;
}

footer {
  text-align: center;
  padding: 20px 20px 20px 20px;
  color: #6c757d;
  font-size: 0.9em;
  border-top: 1px solid #e9ecef;
  background: #c7dce0;
  line-height: 1.6;
  margin-top: 40px;
  margin-left: -20px;
  margin-right: -20px;
}

footer p {
  margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    margin: 10px;
  }
  
  .content {
    padding: 20px;
  }
  
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .form-group {
    min-width: auto;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
  
  #map {
    height: 400px;
  }
  
  th, td {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animation for table expansion */
.expandable-row {
  transition: all 0.3s ease;
}

/* Map controls */
.map-controls {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-label {
  margin-left: 8px;
  font-size: 14px;
  color: #495057;
}

/* Pink checkbox styles */
.pink-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ff69b4;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  position: relative;
  background: white;
}

.pink-checkbox:checked {
  background: #ff69b4;
}

.pink-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pink-checkbox:hover {
  border-color: #ff1493;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
} 

.form-group select {
  width: 100%;
  padding: 8px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  color: #495057;
}

#time-offset {
  min-width: 140px;
  width: 100%;
}

 



/* Receiver tooltip styles */
.receiver-count {
  /* Inherits metric-value styles for consistent appearance */
}

/* Imperial tooltip styles */
.imperial-tooltip {
  position: fixed;
  background: #333;
  color: white;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Metric value styles */
.metric-value {
  cursor: help;
  border-bottom: 1px dotted #666;
}

.metric-value:hover {
  color: #007bff;
}

/* Chart Section Styles */
.chart-section {
  margin: 25px 0;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  overflow: hidden;
}

.chart-container {
  width: 100%;
  overflow: hidden;
}

.chart-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  overflow: hidden;
}

.chart-box {
  flex: 1;
  min-width: 300px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  height: 350px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chart-box h3 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

.chart-box canvas {
  width: 100% !important;
  height: 300px !important;
  max-height: 300px !important;
  min-height: 300px !important;
  flex: 1 1 auto;
  display: block;
  overflow: hidden;
}

@media (max-width: 768px) {
  .chart-row {
    flex-direction: column;
  }
  
  .chart-box {
    min-width: auto;
    height: 250px;
  }
  
  .chart-box canvas {
    height: 180px !important;
    max-height: 180px;
  }
}