/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New',
    monospace;
  background: #ffffff;
  min-height: 100vh;
  color: #1a1a1a;
  line-height: 1.3;
  font-size: 13px;
  font-weight: 400;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.station-info {
  flex: 1;
}

.station-code {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.station-name {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 0.25rem;
  font-weight: 400;
}

.elevation {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 400;
}

.timestamp {
  background: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #4a5568;
  font-weight: 400;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
}

/* Section headings */
section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

section h2 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

/* Current Conditions Grid */
.observation-info {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.5rem;
  border: 1px solid #e2e8f0;
}

.info-item {
  display: flex;
  gap: 0.5rem;
}

.info-label {
  font-weight: 500;
  color: #4a5568;
  font-size: 0.85rem;
}

.info-value {
  color: #1a1a1a;
  font-weight: 400;
  font-family: 'SF Mono', 'Monaco', monospace;
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.condition-card {
  background: #ffffff;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.condition-card:hover {
  border-color: #cbd5e0;
  background: #f8fafc;
}

.condition-card.primary {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
}

.condition-card.primary .condition-label {
  color: #e2e8f0;
}

.condition-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.condition-value {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
  font-family: 'SF Mono', 'Monaco', monospace;
}

.condition-card.primary .condition-value {
  color: #ffffff;
}

.condition-label {
  font-size: 0.75rem;
  color: #718096;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Flight Rules */
.flight-rules-indicator {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #e2e8f0;
}

.rules-label {
  font-weight: 500;
  color: #4a5568;
}

.rules-value {
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  background: #1a1a1a;
  color: #ffffff;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.8rem;
}

/* METAR Section */
.metar-container {
  display: grid;
  gap: 0.75rem;
}

.metar-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.metar-info {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.8rem;
  border: 1px solid #2d3748;
}

.metar-field {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.metar-field label {
  display: block;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metar-code {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.8rem;
  word-break: break-all;
  white-space: pre-wrap;
  border: 1px solid #2d3748;
  margin-bottom: 0.5rem;
}

.metar-explanation {
  background: #f0fff4;
  color: #22543d;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid #9ae6b4;
}

/* Station Information Section */
.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.station-field {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.station-field label {
  display: block;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.station-value {
  color: #1a1a1a;
  font-weight: 400;
  font-size: 0.9rem;
  font-family: 'SF Mono', 'Monaco', monospace;
}

/* TAF Section */
.taf-container {
  display: grid;
  gap: 0.75rem;
}

.taf-code {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.8rem;
  word-break: break-all;
  white-space: pre-wrap;
  border: 1px solid #2d3748;
  margin-bottom: 0.5rem;
}

.taf-explanation {
  background: #edf2f7;
  color: #2d3748;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid #cbd5e0;
}

.taf-info {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 3px;
  color: #1a1a1a;
  font-weight: 400;
  font-family: 'SF Mono', 'Monaco', monospace;
  border: 1px solid #e2e8f0;
}

/* Nowcast Section */
.nowcast-container {
  display: grid;
  gap: 0.75rem;
}

.nowcast-code {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.8rem;
  word-break: break-all;
  white-space: pre-wrap;
  border: 1px solid #2d3748;
  margin-bottom: 0.5rem;
}

.nowcast-explanation {
  background: #fef5e7;
  color: #744210;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid #fbd38d;
}

.nowcast-info {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 3px;
  color: #1a1a1a;
  font-weight: 400;
  font-family: 'SF Mono', 'Monaco', monospace;
  border: 1px solid #e2e8f0;
}

.nowcast-field {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.nowcast-field label {
  display: block;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Forecast Analysis */
.analysis-container {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 4px;
  line-height: 1.4;
  border: 1px solid #e2e8f0;
}

.analysis-content {
  color: #1a1a1a;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

/* Forecast Timeline */
.timeline-container {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.timeline {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.timeline-item {
  min-width: 80px;
  background: #ffffff;
  padding: 0.75rem;
  border-radius: 3px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.timeline-item:hover {
  border-color: #cbd5e0;
  background: #f8fafc;
}

.timeline-time {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  font-family: 'SF Mono', 'Monaco', monospace;
}

.timeline-condition {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: #4a5568;
}

.timeline-details {
  font-weight: 400;
  color: #1a1a1a;
  font-size: 0.7rem;
  font-family: 'SF Mono', 'Monaco', monospace;
  line-height: 1.2;
}

.timeline-temp {
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Monaco', monospace;
}

/* TAF Timeline item styles */
.timeline-item.taf-main {
  border-left: 3px solid #4299e1;
}

.timeline-item.taf-tempo {
  border-left: 3px solid #ed8936;
}

.timeline-item.taf-synthetic {
  border-left: 3px solid #38a169;
}

/* Forecast Chart */
.forecast-chart-container {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.forecast-chart {
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.forecast-table {
  min-width: 700px;
  border-collapse: collapse;
  background: #ffffff;
}

.forecast-table th,
.forecast-table td {
  padding: 1rem 0.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

.forecast-table th {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
  color: #ffffff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.forecast-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.forecast-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.forecast-table tbody tr:hover {
  background: #edf2f7;
  transition: background-color 0.2s ease;
}

.parameter-header {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
}

.main-period-row {
  border-left: 5px solid #4299e1;
  background: linear-gradient(
    90deg,
    rgba(66, 153, 225, 0.05) 0%,
    transparent 100%
  );
}

.tempo-period-row {
  border-left: 5px solid #ed8936;
  background: linear-gradient(
    90deg,
    rgba(237, 137, 54, 0.05) 0%,
    transparent 100%
  );
}

.change-period-row {
  border-left: 5px solid #38a169;
  background: linear-gradient(
    90deg,
    rgba(56, 161, 105, 0.05) 0%,
    transparent 100%
  );
}

/* Time formatting */
.time-period {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.9rem;
}

.time-ist {
  font-size: 0.75rem;
  color: #4a5568;
  margin-top: 0.125rem;
}

/* Parameter cells */
.parameter-cell {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.3;
}

.weather-cell {
  background: #f7fafc;
  border-radius: 4px;
  padding: 0.5rem;
  margin: 0.25rem 0;
}

.cloud-cell {
  background: #edf2f7;
  border-radius: 4px;
  padding: 0.5rem;
  margin: 0.25rem 0;
}

/* Synthetic TAF Chart */
.synthetic-taf-chart-container {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.synthetic-taf-chart-container h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.synthetic-taf-chart {
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.synthetic-taf-table {
  min-width: 700px;
  border-collapse: collapse;
  background: #ffffff;
}

.synthetic-taf-table th,
.synthetic-taf-table td {
  padding: 1rem 0.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

.synthetic-taf-table th {
  background: linear-gradient(135deg, #2d3748 0%, #1a1a1a 100%);
  color: #ffffff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.synthetic-taf-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.synthetic-taf-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.synthetic-taf-table tbody tr:hover {
  background: #edf2f7;
  transition: background-color 0.2s ease;
}

.synthetic-period-row {
  border-left: 5px solid #9f7aea;
  background: linear-gradient(
    90deg,
    rgba(159, 122, 234, 0.05) 0%,
    transparent 100%
  );
}

.chart-legend {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.main-period {
  background: #4299e1;
}

.legend-color.tempo-period {
  background: #ed8936;
}

.legend-color.change-period {
  background: #38a169;
}

.legend-color.synthetic-period {
  background: #9f7aea;
}

/* Original TAF Chart */
.original-taf-chart-container {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.original-taf-chart-container h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.original-taf-chart {
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.original-taf-table {
  min-width: 700px;
  border-collapse: collapse;
  background: #ffffff;
}

.original-taf-table th,
.original-taf-table td {
  padding: 1rem 0.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

.original-taf-table th {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: #ffffff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.original-taf-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.original-taf-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.original-taf-table tbody tr:hover {
  background: #edf2f7;
  transition: background-color 0.2s ease;
}

.original-main-row {
  border-left: 5px solid #e53e3e;
  background: linear-gradient(
    90deg,
    rgba(229, 62, 62, 0.05) 0%,
    transparent 100%
  );
}

.original-tempo-row {
  border-left: 5px solid #dd6b20;
  background: linear-gradient(
    90deg,
    rgba(221, 107, 32, 0.05) 0%,
    transparent 100%
  );
}

.legend-color.original-main {
  background: #e53e3e;
}

.legend-color.original-tempo {
  background: #dd6b20;
}

/* METAR Charts */
.original-metar-chart-container,
.synthetic-metar-chart-container {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.original-metar-chart-container h3,
.synthetic-metar-chart-container h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.original-metar-chart,
.synthetic-metar-chart {
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.original-metar-table,
.synthetic-metar-table {
  min-width: 800px;
  border-collapse: collapse;
  background: #ffffff;
}

.original-metar-table th,
.original-metar-table td,
.synthetic-metar-table th,
.synthetic-metar-table td {
  padding: 1rem 0.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

.original-metar-table th,
.synthetic-metar-table th {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
  color: #ffffff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.original-metar-table tbody tr:nth-child(even),
.synthetic-metar-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.original-metar-table tbody tr:nth-child(odd),
.synthetic-metar-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.original-metar-table tbody tr:hover,
.synthetic-metar-table tbody tr:hover {
  background: #edf2f7;
  transition: background-color 0.2s ease;
}

.original-metar-row {
  border-left: 5px solid #e53e3e;
  background: linear-gradient(
    90deg,
    rgba(229, 62, 62, 0.05) 0%,
    transparent 100%
  );
}

.synthetic-metar-row {
  border-left: 5px solid #9f7aea;
  background: linear-gradient(
    90deg,
    rgba(159, 122, 234, 0.05) 0%,
    transparent 100%
  );
}

/* Sun Times */
.sun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.sun-card {
  background: #1a1a1a;
  color: #ffffff;
  padding: 1.5rem;
  border-radius: 4px;
  text-align: center;
  border: 1px solid #2d3748;
  transition: all 0.2s ease;
}

.sun-card:hover {
  background: #2d3748;
}

.sun-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.sun-time {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-family: 'SF Mono', 'Monaco', monospace;
}

.sun-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }

  .header {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .station-code {
    font-size: 2rem;
  }

  .observation-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .conditions-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .condition-card {
    padding: 0.75rem;
  }

  .condition-value {
    font-size: 1.2rem;
  }

  .station-grid {
    grid-template-columns: 1fr;
  }

  .metar-details {
    grid-template-columns: 1fr;
  }

  section {
    padding: 1rem;
  }

  .timeline {
    gap: 0.25rem;
  }

  .timeline-item {
    min-width: 70px;
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .conditions-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sun-grid {
    grid-template-columns: 1fr;
  }

  .observation-info {
    gap: 0.25rem;
  }

  .info-item {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }

  .station-code {
    font-size: 1.8rem;
  }

  .condition-value {
    font-size: 1rem;
  }
}

/* Loading animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

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