@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

:root {
  --dhw-bg: #0b1220;
  --dhw-bg-soft: #111a2e;
  --dhw-card: rgba(255, 255, 255, 0.06);
  --dhw-card-border: rgba(255, 255, 255, 0.1);
  --dhw-text: #eef3ff;
  --dhw-muted: #9fb0d0;
  --dhw-accent: #5eb3ff;
  --dhw-accent-2: #7c5cff;
  --dhw-warm: #ffb347;
  --dhw-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --dhw-radius: 18px;
}

html.dnh-weather-route body {
  margin: 0;
  background: var(--dhw-bg);
}

html.dnh-weather-route #root {
  display: none !important;
}

html.dnh-app-route #dotnethub-weather-banner {
  display: none !important;
}

html.dnh-app-route body {
  margin: 0;
  background: #f5f5f5;
}

html.dnh-app-route.dnh-auth #root {
  margin-left: 220px;
}

html.dnh-weather-route.dnh-auth #dotnethub-weather-banner .dhw-page,
html.dnh-weather-route.dnh-auth #dotnethub-weather-banner {
  padding-left: 220px;
}

html.dnh-auth #dotnethub-login-bar {
  display: none !important;
}

#dotnethub-nav-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  z-index: 10001;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0.85rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: "DM Sans", Roboto, system-ui, sans-serif;
}

#dotnethub-nav-sidebar.dhw-hidden {
  display: none;
}

.dnh-nav-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  padding: 0.25rem 0.65rem 1rem;
  letter-spacing: -0.02em;
}

.dnh-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.dnh-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.dnh-nav-item.dnh-nav-active {
  background: rgba(94, 179, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(94, 179, 255, 0.25);
}

.dnh-nav-icon {
  width: 1.25rem;
  text-align: center;
}

.dnh-nav-logout {
  margin-top: auto;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.dnh-nav-logout:hover {
  background: rgba(239, 68, 68, 0.18);
}

#dotnethub-app-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0f172a;
  font-family: "DM Sans", Roboto, system-ui, sans-serif;
  color: #e2e8f0;
}

#dotnethub-app-gate.dhw-hidden {
  display: none;
}

.dnh-app-gate-inner {
  text-align: center;
  max-width: 420px;
  padding: 2rem;
}

.dnh-app-gate-inner h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
}

.dnh-app-gate-inner p {
  color: #94a3b8;
  line-height: 1.6;
}

.dnh-app-gate-back {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.dnh-app-gate-back a {
  color: #5eb3ff;
  text-decoration: none;
}

@media (max-width: 768px) {
  html.dnh-app-route.dnh-auth #root,
  html.dnh-weather-route.dnh-auth #dotnethub-weather-banner,
  html.dnh-weather-route.dnh-auth #dotnethub-weather-banner .dhw-page {
    padding-left: 0;
    margin-left: 0;
  }

  #dotnethub-nav-sidebar {
    width: 100%;
    height: auto;
    bottom: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.65rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dnh-nav-brand {
    width: 100%;
    padding-bottom: 0.35rem;
  }

  .dnh-nav-logout {
    margin-top: 0;
    margin-left: auto;
  }

  html.dnh-app-route.dnh-auth #root {
    padding-top: 4.5rem;
  }

  html.dnh-weather-route.dnh-auth #dotnethub-weather-banner {
    padding-top: 4.5rem;
  }
}

#dotnethub-weather-banner {
  font-family: "DM Sans", Roboto, system-ui, sans-serif;
  color: var(--dhw-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 179, 255, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(124, 92, 255, 0.18), transparent 50%),
    linear-gradient(180deg, #0b1220 0%, #101828 40%, #0f172a 100%);
  min-height: 100vh;
  box-sizing: border-box;
}

#dotnethub-weather-banner.dhw-hidden {
  display: none;
}

.dhw-page {
  padding: 1.25rem 1rem 2.5rem;
}

.dhw-shell {
  max-width: 1080px;
  margin: 0 auto;
}

.dhw-hero {
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.25rem;
  border-radius: calc(var(--dhw-radius) + 4px);
  background: linear-gradient(135deg, rgba(94, 179, 255, 0.12), rgba(124, 92, 255, 0.1));
  border: 1px solid var(--dhw-card-border);
  box-shadow: var(--dhw-shadow);
}

.dhw-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.dhw-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #dbeafe;
  background: rgba(94, 179, 255, 0.18);
  border: 1px solid rgba(94, 179, 255, 0.35);
}

.dhw-updated {
  font-size: 0.875rem;
  color: var(--dhw-muted);
}

.dhw-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dhw-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #d7e3ff;
  max-width: 70ch;
}

.dhw-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.dhw-stat {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dhw-stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dhw-muted);
  margin-bottom: 0.25rem;
}

.dhw-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.dhw-stat-detail {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--dhw-muted);
}

.dhw-card {
  background: var(--dhw-card);
  border: 1px solid var(--dhw-card-border);
  border-radius: var(--dhw-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.dhw-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.dhw-day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--dhw-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dhw-card-border);
}

.dhw-day-btn {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dhw-accent);
  background: rgba(94, 179, 255, 0.12);
  border: 1px solid rgba(94, 179, 255, 0.25);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.dhw-day-btn:hover:not(:disabled) {
  background: rgba(94, 179, 255, 0.22);
}

.dhw-day-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dhw-day-current {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.dhw-day-rel {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dhw-accent);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.dhw-day-current strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.dhw-chart-day-label {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--dhw-muted);
  text-align: center;
}

.dhw-meteorogram summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--dhw-text);
  list-style: none;
}

.dhw-meteorogram summary::-webkit-details-marker {
  display: none;
}

.dhw-meteorogram[open] summary {
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .dhw-day-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .dhw-day-current {
    order: -1;
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .dhw-day-btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.45rem 0.5rem;
  }
}

.dhw-card-sub {
  margin: 0 0 1rem;
  color: var(--dhw-muted);
  font-size: 0.92rem;
}

.dhw-chart-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.5rem;
}

.dhw-chart {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.dhw-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.dhw-axis-y,
.dhw-axis-x {
  fill: var(--dhw-muted);
  font-size: 11px;
  font-family: "DM Sans", sans-serif;
}

.dhw-area {
  fill: rgba(94, 179, 255, 0.18);
}

.dhw-line {
  fill: none;
  stroke: url(#dhwLineGrad);
  stroke: #5eb3ff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dhw-dot {
  fill: #fff;
  stroke: #5eb3ff;
  stroke-width: 2;
}

.dhw-chart-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--dhw-muted);
  font-size: 0.95rem;
}

.dhw-periods {
  display: grid;
  gap: 0.85rem;
}

.dhw-period {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dhw-period-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(94, 179, 255, 0.25), rgba(124, 92, 255, 0.22));
  color: #fff;
}

.dhw-period-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dhw-period-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.dhw-period-body p {
  margin: 0;
  color: #d2dcf5;
  line-height: 1.6;
  font-size: 0.96rem;
}

.dhw-meteorogram .dhw-image-wrap {
  overflow-x: auto;
  border-radius: 12px;
  background: #fff;
  padding: 0.5rem;
}

.dhw-meteorogram img {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.dhw-legend-link {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
}

.dhw-legend-link a {
  color: var(--dhw-accent);
  text-decoration: none;
}

.dhw-legend-link a:hover {
  text-decoration: underline;
}

.dhw-footer {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--dhw-muted);
}

.dhw-loading-text,
.dhw-error {
  text-align: center;
  color: var(--dhw-muted);
  padding: 1rem;
}

.dhw-error {
  color: #ffb4b4;
}

.dhw-skeleton {
  position: relative;
  overflow: hidden;
}

.dhw-skel-line {
  height: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 0.65rem;
  width: 60%;
}

.dhw-skel-wide {
  width: 85%;
  height: 28px;
}

.dhw-skel-chart {
  height: 220px;
}

#dotnethub-login-bar {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 10000;
}

#dotnethub-login-bar.dhw-hidden {
  display: none;
}

.dhw-login-btn {
  font-family: "DM Sans", Roboto, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0b1220;
  background: linear-gradient(135deg, #7dd3fc, #5eb3ff);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(94, 179, 255, 0.35);
}

.dhw-login-btn:hover {
  filter: brightness(1.05);
}

.dhw-login-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .dhw-page {
    padding: 2rem 1.5rem 3rem;
  }

  .dhw-hero {
    padding: 2rem 1.75rem;
  }

  .dhw-card {
    padding: 1.5rem 1.75rem;
  }
}
