* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-nav {
  width: 100%;
  background-color: #1e1e1e;
  display: flex;
  border-bottom: 1px solid #333;
}

.nav-btn {
  flex: 1;
  text-align: center;
  padding: 16px 0;
  color: #a0a0a0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s, color 0.2s;
}

.nav-btn:hover {
  background-color: #2a2a2a;
  color: #ffffff;
}

.nav-btn.active {
  color: #3b82f6;
  background-color: #181818;
  border-bottom: 3px solid #3b82f6;
}

.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 30px;
  width: 100%;
}

.content-container-2 {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 30px;
  width: 100%;
}

.obs-section {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.control-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #1e1e1e;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #333;
}

.control-panel label {
  font-size: 0.95rem;
  color: #b0b0b0;
}

#obs-select {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

#obs-select:focus {
  border-color: #3b82f6;
}

.image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#obs-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
}

.sat-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.sat-controls select {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background-color: #0f172a;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.sat-controls select:focus {
  border-color: #38bdf8;
}

.sat-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#sat-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #334155;
}

.search-box {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

#metar-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background-color: #0f172a;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

#metar-input:focus {
  border-color: #38bdf8;
}

#metar-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  background-color: #0284c7;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

#metar-btn:hover {
  background-color: #0369a1;
}

#metar-btn:disabled {
  background-color: #475569;
  cursor: not-allowed;
}

.metar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.metar-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.25rem;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.metar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.metar-title h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #38bdf8;
}

.metar-title span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.flt-cat {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.8rem;
}
.flt-vfr { background: #15803d; color: #fff; }
.flt-mvfr { background: #0369a1; color: #fff; }
.flt-ifr { background: #b91c1c; color: #fff; }
.flt-lifr { background: #6b21a8; color: #fff; }

.metar-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.metar-main-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: #0f172a;
  padding: 0.75rem;
  border-radius: 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

.stat-value {
  font-size: 1rem;
  font-weight: 600;
}

.wind-compass-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #0f172a;
  padding: 0.75rem;
  border-radius: 8px;
}

.compass-circle {
  width: 44px;
  height: 44px;
  border: 2px solid #38bdf8;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-arrow {
  width: 2px;
  height: 20px;
  background: #ef4444;
  position: absolute;
  transform-origin: center bottom;
  top: 4px;
}

.cloud-layers {
  background: #0f172a;
  padding: 0.75rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cloud-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.raw-ob {
  font-family: monospace;
  font-size: 0.8rem;
  background: #090d16;
  padding: 0.6rem;
  border-radius: 6px;
  color: #a7f3d0;
  word-break: break-all;
}

.main-footer {
  text-align: center;
  padding: 16px;
  background-color: #1e1e1e;
  border-top: 1px solid #333;
  color: #888;
  font-size: 0.85rem;
}

.main-footer a {
  color: #3b82f6;
  text-decoration: none;
}

.main-footer a:hover {
  text-decoration: underline;
}

.radar-container {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #334155;
  overflow: hidden;
  background-color: #0f172a;
}

.radar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: #1e293b;
  border-bottom: 1px solid #334155;
}

.radar-title {
  font-weight: 600;
  color: #f8fafc;
  font-size: 0.95rem;
}

#radar-timestamp {
  font-size: 0.95rem;
  font-weight: 600;
  color: #38bdf8;
  font-family: monospace;
}

.radar-buttons {
  display: flex;
  gap: 0.5rem;
}

.radar-buttons button {
  width: 34px;
  height: 34px;
  border: 1px solid #334155;
  border-radius: 6px;
  background-color: #0f172a;
  color: #f8fafc;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.radar-buttons button:hover {
  background-color: #334155;
  border-color: #38bdf8;
}

#radar-map {
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 400px;
  z-index: 1;
}

.base-tiles img {
  filter: grayscale(100%) invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%) !important;
}

.clouds-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.clouds-toggle input {
  cursor: pointer;
  accent-color: #38bdf8;
}

@media (orientation: portrait) {
  .content-container-2 {
    grid-template-columns: 1fr;
  }
}
