@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Manrope:wght@600;700;800&display=swap');

:root {
  color-scheme: dark;
  --deep: #062c38;
  --deep-2: #0a3b48;
  --ink: #f0fbf8;
  --muted: #a9c8c8;
  --aqua: #68e1cf;
  --aqua-dark: #2aa894;
  --panel: rgba(241, 255, 252, .08);
  --border: rgba(231, 255, 250, .13);
  --shadow: 0 24px 70px rgba(0, 12, 18, .28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--deep); }
body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 3%, rgba(77, 188, 174, .18), transparent 33rem),
    linear-gradient(160deg, var(--deep-2), var(--deep) 62%);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.app-shell {
  position: relative;
  z-index: 2;
  width: min(100% - 40px, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--aqua);
  font-size: 13px;
}
.live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 22, 28, .18);
  font-size: 12px;
  font-weight: 600;
}
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #e3b66c; }
.live-pill.live i { background: var(--aqua); box-shadow: 0 0 0 5px rgba(104, 225, 207, .1); }
.live-pill.offline i { background: #e89383; }

.hero { text-align: center; margin: auto 0; padding: 58px 0 34px; }
.eyebrow { color: var(--aqua); font-size: 11px; font-weight: 700; letter-spacing: .24em; }
h1 {
  margin: 8px 0 2px;
  font: 800 clamp(32px, 9vw, 48px)/1 Manrope, sans-serif;
  letter-spacing: -.055em;
}
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.temperature-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 34px 0 3px;
  font-family: Manrope, sans-serif;
  letter-spacing: -.09em;
  filter: drop-shadow(0 15px 35px rgba(0, 15, 20, .2));
}
.temperature {
  font-size: clamp(112px, 33vw, 178px);
  font-weight: 700;
  line-height: .82;
  font-variant-numeric: tabular-nums;
}
.degree { margin: 4px 0 0 10px; color: var(--aqua); font-size: clamp(27px, 8vw, 40px); font-weight: 600; letter-spacing: -.05em; }
.feeling { min-height: 24px; margin: 27px 0 22px; color: var(--muted); font-size: 14px; }
.refresh-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.refresh-button:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.24); }
.refresh-button:active { transform: scale(.97); }
.refresh-button:focus-visible, a:focus-visible, .install-button:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }
.refresh-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button.loading svg { animation: spin .8s linear infinite; }

.info-panel {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 20px;
  align-items: center;
  padding: 19px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item:last-child { text-align: right; }
.info-label { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.info-item strong { font-size: 14px; font-weight: 600; }
.divider { width: 1px; height: 30px; background: var(--border); }
.note { max-width: 430px; margin: 14px auto 25px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.55; }
footer { display: flex; align-items: center; justify-content: center; gap: 20px; font-size: 12px; }
footer a, .install-button { color: var(--muted); }
footer a:hover { color: var(--ink); }
.install-button { border: 0; padding: 8px 0; background: none; text-decoration: underline; cursor: pointer; }

.water { position: fixed; z-index: 1; inset: auto 0 0; height: 22vh; overflow: hidden; pointer-events: none; opacity: .14; }
.wave { position: absolute; left: -15%; bottom: -55%; width: 130%; aspect-ratio: 1/.22; border-radius: 50%; border-top: 2px solid var(--aqua); }
.wave-one { animation: drift 10s ease-in-out infinite alternate; }
.wave-two { bottom: -42%; left: -7%; opacity: .55; animation: drift 13s ease-in-out infinite alternate-reverse; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translateX(4%) translateY(-6px); } }
@media (max-height: 690px) {
  .hero { padding: 32px 0 22px; }
  .temperature { font-size: clamp(96px, 28vw, 140px); }
  .temperature-wrap { margin-top: 25px; }
  .feeling { margin: 20px 0 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
