:root {
  color-scheme: dark;
  --bg: #06111b;
  --bg-deep: #030910;
  --panel: rgba(18, 31, 43, 0.74);
  --panel-raised: rgba(25, 40, 53, 0.86);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(194, 221, 240, 0.16);
  --border-strong: rgba(218, 237, 248, 0.26);
  --text: #edf7fb;
  --soft: #d6e5ed;
  --muted: #9eb5c2;
  --dim: #738895;
  --green: #8edb85;
  --teal: #65d7cf;
  --rain: #5bbcff;
  --amber: #f6c768;
  --blue: #8eb8ff;
  --pressure: #d5b6ff;
  --danger: #ff8b8b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(180deg, rgba(7, 17, 27, 0.98) 0%, rgba(5, 12, 20, 0.98) 46%, rgba(8, 18, 26, 1) 100%),
    linear-gradient(115deg, #09202d 0%, #07111c 52%, #13221d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 28px),
    linear-gradient(180deg, rgba(101, 215, 207, 0.035), transparent 38%);
}

a {
  color: var(--teal);
}

.weather-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.dashboard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  padding: 4px 0 14px;
}

.dashboard-nav a,
.dashboard-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #7df0e5;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dashboard-nav a:hover,
.dashboard-footer a:hover {
  border-color: rgba(125, 240, 229, 0.44);
  background: rgba(125, 240, 229, 0.08);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 392px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  align-items: end;
  gap: 26px;
  padding: 52px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow), var(--inner-light);
  background:
    linear-gradient(135deg, rgba(18, 42, 55, 0.93) 0%, rgba(9, 22, 34, 0.96) 48%, rgba(10, 32, 27, 0.94) 100%),
    linear-gradient(90deg, rgba(91, 188, 255, 0.08), rgba(142, 219, 133, 0.12));
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(102deg, transparent 0, transparent 54px, rgba(142, 219, 133, 0.055) 55px, transparent 58px),
    linear-gradient(180deg, transparent 0%, rgba(125, 240, 229, 0.04) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: 42px;
  bottom: 34px;
  left: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 219, 133, 0.5), rgba(91, 188, 255, 0.28), transparent);
}

.kicker,
.section-heading p {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  font-size: 5.25rem;
  line-height: 0.96;
  margin: 0;
  max-width: 820px;
  letter-spacing: 0;
}

.hero-subtitle {
  color: var(--soft);
  font-size: 2rem;
  margin: 18px 0 0;
  font-weight: 780;
}

.hero-phrase {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 1.04rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-meta span,
.section-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--soft);
  font-size: 0.84rem;
}

.hero-reading {
  position: relative;
  justify-self: stretch;
  padding: 24px;
  border: 1px solid rgba(218, 237, 248, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.04)),
    rgba(22, 35, 47, 0.78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22), var(--inner-light);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.hero-reading::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 34%, rgba(101, 215, 207, 0.07));
  opacity: 0.5;
}

.hero-reading > * {
  position: relative;
  z-index: 1;
}

.status-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(142, 219, 133, 0.42);
  background: rgba(142, 219, 133, 0.15);
  color: var(--green);
  font-weight: 850;
  font-size: 0.83rem;
}

.status-badge strong,
.status-badge span {
  position: relative;
  z-index: 1;
}

.status-badge strong {
  color: inherit;
  font-size: inherit;
}

.status-badge span {
  color: var(--soft);
  font-weight: 750;
  opacity: 0.82;
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(142, 219, 133, 0.12);
}

.status-stale {
  color: var(--amber);
  border-color: rgba(246, 199, 104, 0.46);
  background: rgba(246, 199, 104, 0.14);
}

.status-stale::before {
  box-shadow: 0 0 0 5px rgba(246, 199, 104, 0.12);
}

.status-offline {
  color: var(--danger);
  border-color: rgba(255, 139, 139, 0.46);
  background: rgba(255, 139, 139, 0.12);
}

.status-offline::before {
  box-shadow: 0 0 0 5px rgba(255, 139, 139, 0.12);
}

.hero-temp {
  margin-top: 28px;
  font-size: 8.75rem;
  line-height: 0.84;
  font-weight: 900;
}

.hero-temp span {
  font-size: 0.34em;
  margin-left: 5px;
  color: #bfd0db;
  vertical-align: super;
}

.hero-feels {
  color: var(--soft);
  margin-top: 16px;
  font-size: 1.1rem;
  font-weight: 650;
}

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

.dashboard-note {
  margin: 14px 0 0;
  border: 1px solid rgba(246, 199, 104, 0.34);
  background: linear-gradient(90deg, rgba(246, 199, 104, 0.14), rgba(246, 199, 104, 0.07));
  color: #ffe5ad;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--inner-light);
}

.dashboard-note-warning {
  border-color: rgba(255, 139, 139, 0.34);
  background: linear-gradient(90deg, rgba(255, 139, 139, 0.14), rgba(246, 199, 104, 0.06));
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric-card,
.data-card,
.forecast-card,
.hour-card,
.chart-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), var(--inner-light);
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.metric-card:hover,
.data-card:hover,
.forecast-card:hover,
.hour-card:hover,
.chart-card:hover {
  border-color: rgba(218, 237, 248, 0.3);
  transform: translateY(-1px);
}

.metric-card {
  min-height: 124px;
  padding: 17px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top-width: 4px;
}

.metric-card span,
.data-card span,
.forecast-card span,
.hour-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.data-card span::before,
.metric-card span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  margin: 0 7px 3px 0;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.52;
}

.metric-card strong {
  display: block;
  margin-top: 13px;
  font-size: 1.85rem;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.accent-temp {
  border-top-color: var(--green);
}

.accent-feels {
  border-top-color: var(--amber);
}

.accent-wind {
  border-top-color: var(--teal);
}

.accent-rain {
  border-top-color: var(--rain);
}

.accent-pressure {
  border-top-color: var(--pressure);
}

.accent-humidity {
  border-top-color: var(--blue);
}

.dashboard-section {
  margin-top: 46px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-top: 2px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.42rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.section-chip {
  color: var(--muted);
  white-space: nowrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rain-grid,
.temp-grid,
.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.data-card {
  min-height: 154px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 13px;
  overflow: hidden;
}

.data-card strong {
  font-size: 2rem;
  line-height: 1.03;
  overflow-wrap: anywhere;
}

.data-card small,
.forecast-card small,
.hour-card small,
.hour-card em {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.36;
  font-style: normal;
}

.section-rain .section-heading p,
.section-rain .section-chip {
  color: #8ed6ff;
}

.section-rain .data-card {
  border-color: rgba(91, 188, 255, 0.2);
}

.section-rain .data-card:nth-child(1),
.section-rain .data-card:nth-child(2) {
  grid-column: span 2;
  min-height: 184px;
  background:
    linear-gradient(135deg, rgba(91, 188, 255, 0.18), rgba(12, 31, 45, 0.72)),
    var(--panel-raised);
  border-color: rgba(91, 188, 255, 0.42);
}

.section-rain .data-card:nth-child(1)::after,
.section-rain .data-card:nth-child(2)::after {
  content: "";
  position: absolute;
  inset: auto 16px 14px 16px;
  height: 1px;
  background: linear-gradient(90deg, rgba(91, 188, 255, 0.6), transparent);
}

.section-rain .data-card:nth-child(1) strong,
.section-rain .data-card:nth-child(2) strong {
  font-size: 3rem;
}

.section-wind .section-heading p,
.section-wind .section-chip {
  color: var(--teal);
}

.section-wind .data-card {
  border-color: rgba(101, 215, 207, 0.2);
}

.section-wind .data-card:nth-child(3),
.section-wind .data-card:nth-child(6) {
  background:
    linear-gradient(135deg, rgba(101, 215, 207, 0.16), rgba(13, 24, 36, 0.84)),
    var(--panel-raised);
  border-color: rgba(101, 215, 207, 0.4);
}

.section-wind .data-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0, transparent 18px, rgba(101, 215, 207, 0.035) 19px, transparent 21px);
}

.section-temp .data-card:nth-child(-n + 4) {
  background:
    linear-gradient(180deg, rgba(246, 199, 104, 0.11), rgba(255, 255, 255, 0.03)),
    var(--panel);
  border-color: rgba(246, 199, 104, 0.22);
}

.section-temp .data-card small {
  color: #c9b27a;
}

.section-pressure .data-card {
  border-color: rgba(213, 182, 255, 0.22);
}

.section-status .data-card strong {
  font-size: 1.55rem;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.forecast-card {
  min-height: 226px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  border-color: rgba(142, 184, 255, 0.24);
}

.forecast-card strong {
  display: block;
  margin: 13px 0 7px;
  font-size: 1.62rem;
}

.forecast-card p {
  color: var(--soft);
  margin: auto 0 0;
  padding-top: 12px;
  font-size: 0.92rem;
  line-height: 1.42;
}

.hourly-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-color: rgba(125, 240, 229, 0.5) rgba(255, 255, 255, 0.08);
}

.hour-card {
  min-height: 136px;
  padding: 13px;
  border-color: rgba(142, 184, 255, 0.18);
}

.hour-card strong {
  display: block;
  font-size: 1.58rem;
  margin: 10px 0 6px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chart-card {
  height: 330px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(10, 21, 31, 0.82);
}

.chart-card:nth-child(1) {
  border-top: 3px solid var(--green);
}

.chart-card:nth-child(2) {
  border-top: 3px solid var(--teal);
}

.chart-card:nth-child(3) {
  border-top: 3px solid var(--rain);
}

.chart-card:nth-child(4) {
  border-top: 3px solid var(--pressure);
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  color: var(--soft);
}

.chart-frame {
  flex: 1;
  min-height: 0;
  height: 252px;
}

.chart-frame canvas {
  width: 100%;
  height: 100% !important;
}

.dashboard-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.footer-status,
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.footer-status strong {
  color: var(--green);
}

.footer-meta {
  justify-content: center;
}

.footer-meta span {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(194, 221, 240, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--dim);
  font-size: 0.86rem;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px;
  }

  .hero h1 {
    font-size: 4.35rem;
  }

  .hero-reading {
    max-width: 520px;
  }

  .top-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid,
  .rain-grid,
  .temp-grid,
  .status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-rain .data-card:nth-child(1),
  .section-rain .data-card:nth-child(2) {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .weather-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 10px;
  }

  .dashboard-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding: 24px;
    gap: 22px;
  }

  .hero::after {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-subtitle {
    font-size: 1.42rem;
  }

  .hero-temp {
    font-size: 6.25rem;
  }

  .top-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid,
  .rain-grid,
  .temp-grid,
  .status-grid,
  .forecast-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading h2 {
    font-size: 2.02rem;
  }

  .section-rain .data-card:nth-child(1),
  .section-rain .data-card:nth-child(2) {
    min-height: 158px;
  }

  .section-rain .data-card:nth-child(1) strong,
  .section-rain .data-card:nth-child(2) strong {
    font-size: 2.4rem;
  }
}

@media (max-width: 500px) {
  .weather-shell {
    width: min(100% - 18px, 1180px);
  }

  .hero {
    padding: 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-reading {
    padding: 20px;
  }

  .hero-temp {
    font-size: 5.25rem;
  }

  .metric-card {
    min-height: 108px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 1.45rem;
  }

  .data-card {
    min-height: 132px;
    padding: 15px;
  }

  .data-card strong {
    font-size: 1.72rem;
  }

  .dashboard-section {
    margin-top: 34px;
  }

  .chart-card {
    height: 300px;
  }

  .dashboard-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .footer-meta {
    justify-content: flex-start;
  }
}
