* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  background: #082f5f;
  color: white;
  min-height: 100%;
  overflow-x: hidden;
}

.app {
  position: relative;
  min-height: 100vh;
  padding-bottom: 92px;
}

.hero-bg {
  position: fixed;
  inset: 0;
  background-image: url("bg/sardegna.jpg");
  background-size: cover;
  background-position: center;
  z-index: -3;
  transition: opacity .3s ease, background-image .3s ease;
}

.hero-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(60,145,230,.35), transparent 35%),
    linear-gradient(to bottom, rgba(4,45,95,.28), rgba(4,45,95,.78) 58%, #082f5f 100%);
  z-index: -2;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 66, 125, .72);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  line-height: 1.05;
}

.brand-sub {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.68);
}

.locate-btn {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .7px;
  color: white;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.content {
  padding: 18px 18px 22px;
}

.hero {
  text-align: center;
  padding: 30px 0 22px;
}

.hero h1 {
  font-size: 45px;
  line-height: 1;
  margin: 0 0 9px;
  font-weight: 800;
  letter-spacing: -1.2px;
  text-shadow: 0 3px 16px rgba(0,0,0,.45);
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: .88;
  font-size: 14px;
  font-weight: 700;
}

.dot {
  width: 9px;
  height: 9px;
  background: #34c759;
  border-radius: 50%;
  box-shadow: 0 0 10px #34c759;
}

.dot.offline {
  background: #ff3b30;
  box-shadow: 0 0 10px #ff3b30;
}

.date {
  font-size: 14px;
  opacity: .78;
  margin-top: 6px;
  font-weight: 600;
}

.temp {
  margin-top: 20px;
  font-size: 116px;
  line-height: .9;
  font-weight: 600;
  letter-spacing: -6px;
  text-shadow: 0 7px 22px rgba(0,0,0,.42);
}

.deg {
  font-size: .48em;
  vertical-align: top;
  margin-left: 2px;
}

.condition {
  font-size: 28px;
  font-weight: 800;
  margin-top: 10px;
  text-shadow: 0 3px 12px rgba(0,0,0,.4);
}

.comfort {
  display: inline-block;
  margin-top: 13px;
  padding: 8px 23px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  background: #34c759;
  box-shadow: 0 7px 18px rgba(0,0,0,.25);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.minmax {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,.82);
}

.minmax b {
  color: #fff;
  font-size: 22px;
}

.search-card,
.forecast-card,
.meteo-card {
  background: rgba(8, 50, 96, .72);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 27px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 13px 32px rgba(0,0,0,.24);
}

.search-card {
  padding: 14px;
  margin-bottom: 18px;
}

#searchInput {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255,255,255,.13);
  color: white;
  font-size: 15px;
  font-weight: 800;
}

#searchInput::placeholder {
  color: rgba(255,255,255,.58);
}

.search-results {
  margin-top: 10px;
}

.search-result {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.10);
  margin-top: 7px;
  font-weight: 800;
}

.forecast-card {
  padding: 18px;
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-subtitle {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.62);
  text-transform: uppercase;
  letter-spacing: .6px;
}

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

.day {
  text-align: center;
  padding: 11px 5px;
  border-radius: 18px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.08);
}

.day-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .9px;
  opacity: .72;
  font-weight: 800;
}

.day-icon {
  font-size: 0;
  margin: 10px auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.78);
  box-shadow: 0 0 16px rgba(255,255,255,.25);
}

.day-rain {
  color: #83ddff;
  font-weight: 800;
  font-size: 13px;
}

.day-temp {
  margin-top: 7px;
  font-size: 18px;
  font-weight: 800;
}

.day-temp span {
  opacity: .66;
  font-size: 14px;
}

.day-wind {
  margin-top: 7px;
  font-size: 12px;
  opacity: .88;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.meteo-card {
  padding: 18px;
  min-height: 132px;
}

.label {
  text-transform: uppercase;
  font-size: 12px;
  opacity: .68;
  font-weight: 800;
  letter-spacing: .7px;
}

.value {
  margin-top: 13px;
  font-size: 39px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -1.5px;
}

.value small {
  font-size: 18px;
  opacity: .82;
  letter-spacing: 0;
}

.small-value {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.desc {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 800;
}

.subdesc {
  margin-top: 4px;
  font-size: 13px;
  opacity: .72;
  font-weight: 700;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  opacity: .78;
  padding: 20px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(5, 38, 78, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.13);
  z-index: 30;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.54);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav button span {
  padding: 9px 10px;
  border-radius: 999px;
}

.bottom-nav button.active {
  color: white;
}

.bottom-nav button.active span {
  background: rgba(255,255,255,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}

@media (max-width: 390px) {
  .brand {
    font-size: 18px;
  }

  .brand-sub {
    font-size: 10px;
  }

  .locate-btn {
    padding: 9px 12px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .temp {
    font-size: 100px;
  }

  .condition {
    font-size: 24px;
  }

  .forecast-days {
    gap: 5px;
  }

  .day {
    padding: 10px 3px;
  }

  .value {
    font-size: 34px;
  }

  .bottom-nav button {
    font-size: 10px;
  }

  .bottom-nav button span {
    padding: 8px 7px;
  }
}