:root {
  --bg: #0b1220;
  --bg-alt: #111a2b;
  --panel: #172235;
  --panel-alt: #1c2a40;
  --border: #2c3b56;
  --text: #e7edf7;
  --muted: #aab7cc;
  --accent: #67b7ff;
  --accent-soft: rgba(103, 183, 255, 0.15);
  --success: #58d68d;
  --warning: #f5b041;
  --danger: #ec7063;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #09111d 0%, #0b1220 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
}

.site-wrapper {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #14213a 0%, #172235 60%, #1c2a40 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1rem;
}

.updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-right {
  text-align: right;
  min-width: 220px;
}

.hero-temp {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.temp-unit {
  font-size: 0.6em;
  vertical-align: top;
}

.hero-condition {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.panel-body {
  padding: 20px 22px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.weather-card {
  background: linear-gradient(180deg, var(--panel-alt) 0%, #162234 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.weather-card .label {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.weather-card .value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.weather-card .secondary {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== WIND CARD ===== */
.wind-card .value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.wind-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.wind-main {
  font-size: 1.6rem;
  font-weight: 700;
}

.wind-sub {
  color: var(--muted);
  font-size: 0.95rem;
}

#wind-calm {
  color: var(--accent);
}

/* ===== COMPASS ===== */
.wind-compass {
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
}

.compass-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at center, rgba(103, 183, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #14213a 0%, #101a2a 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.compass-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.08);
}

.compass-label {
  position: absolute;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  z-index: 2;
}

.compass-label.n {
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-label.e {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-label.s {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-label.w {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-center {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  box-shadow: 0 0 10px rgba(103, 183, 255, 0.45);
}

.compass-arrow {
  position: absolute;
  width: 3px;
  height: 34px;
  background: linear-gradient(180deg, var(--accent) 0%, #d9ecff 100%);
  top: 50%;
  left: 50%;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 10px;
  z-index: 2;
  box-shadow: 0 0 10px rgba(103, 183, 255, 0.35);
  transition: transform 0.8s ease;
}

.compass-arrow::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--accent);
}

.radar-panel {
  padding: 22px;
}

.radar-embed-wrap {
  position: relative;
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(103, 183, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #122034 0%, #101a2a 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.radar-frame {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
  background: transparent;
}

.radar-note {
  max-width: 560px;
  font-size: 0.95rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.placeholder-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.placeholder-item {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--muted);
}

.alerts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert {
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
}

.alert.none {
  color: var(--muted);
}

.alert.warning {
  border-color: rgba(245, 176, 65, 0.35);
  background: rgba(245, 176, 65, 0.12);
}

.alert.danger {
  border-color: rgba(236, 112, 99, 0.35);
  background: rgba(236, 112, 99, 0.12);
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
}

.forecast-card {
  background: linear-gradient(180deg, var(--panel-alt) 0%, #162234 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.forecast-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.forecast-card img {
  width: 72px;
  height: 72px;
}

.forecast-updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.forecast-high {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 8px;
}

.forecast-low {
  color: var(--muted);
  margin-top: 4px;
}

.forecast-short {
  color: var(--text);
  margin-top: 12px;
  min-height: 40px;
  font-size: 0.9rem;
}

.forecast-rain {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}

.graphs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.graph-card {
  background: linear-gradient(180deg, var(--panel-alt) 0%, #162234 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.graph-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
}

.graph-placeholder {
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 59px,
      rgba(255,255,255,0.03) 60px
    );
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

/* ===== ASTRONOMY ICONS ===== */

.astronomy-label {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* Sun */
.sun-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffd166;
  display: inline-block;
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.7);
}


/* Moon */
.moon-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d9ecff;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.moon-icon::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--panel-alt);
  border-radius: 50%;
  left: 8px;
  top: -3px;
}

.site-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .site-wrapper {
    width: min(100% - 20px, 1400px);
    padding-top: 16px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }

  .hero-right {
    text-align: left;
    min-width: 0;
  }

  .card-grid,
  .graphs-grid {
    grid-template-columns: 1fr;
  }

  .weather-card .value {
    font-size: 1.35rem;
  }

  .wind-card .value {
    flex-direction: column;
    align-items: flex-start;
  }

  .radar-embed-wrap,
  .radar-frame {
    min-height: 360px;
    height: 360px;
  }
}