:root{
  --bg: #070c18;
  --card: rgba(10, 16, 28, 0.62);
  --card2: rgba(10, 16, 28, 0.36);
  --stroke: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.95);
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.55);
  --shadow: 0 30px 80px rgba(0,0,0,0.55);
  --radius: 1.6rem;
  --pad: 1.25rem;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html, body{
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

#scene{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background-image:
    linear-gradient(180deg, rgba(3, 8, 18, 0.28), rgba(3, 8, 18, 0.62)),
    url("images/wallpaper.avif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hud{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
}

.card{
  pointer-events: auto;
  width: min(46rem, 92vw);
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  padding: var(--pad);
}

.row{
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.row.top{
  align-items: center;
  margin-bottom: 0.5rem;
}

.time{
  display: grid;
  gap: 0.15rem;
}

.clock{
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.date{
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.95rem;
}

.right{
  display:flex;
  gap: 0.5rem;
  align-items:center;
}

.btn{
  appearance: none;
  border: 1px solid var(--stroke);
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:hover{ background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.18); }
.btn:active{ transform: translateY(1px); }

.kv{
  min-width: 12rem;
  flex: 1 1 12rem;
}

.k{
  font-size: 0.8rem;
  color: var(--muted2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v{
  margin-top: 0.25rem;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.25;
}

.row.mini{
  margin-top: 0.75rem;
  gap: 0.85rem;
}

.row.mini .kv{
  min-width: 9rem;
  flex: 1 1 9rem;
}

.divider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 1rem 0;
}

.sectionTitle{
  font-size: 0.85rem;
  color: var(--muted2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.forecastGrid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 46rem){
  .forecastGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 24rem){
  .forecastGrid{ grid-template-columns: 1fr; }
}

.day{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius: 1.05rem;
  padding: 0.8rem 0.8rem 0.7rem;
  display: grid;
  gap: 0.25rem;
}

.day .dow{
  font-weight: 700;
  font-size: 0.95rem;
}

.day .meta{
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.day .temps{
  margin-top: 0.2rem;
  display:flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap: 0.35rem;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.16);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.badge-temp{
  flex-wrap: wrap;
}

.badge-temp .tempPart{
  white-space: nowrap;
}

.badge-temp .tempSep{
  white-space: normal;
}

.footer{
  margin-top: 0.85rem;
  color: var(--muted2);
  font-size: 0.9rem;
}

.noscript{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  text-align: center;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-family: var(--sans);
}
