:root {
  --accent: #5ee7df;
  --accent-2: #b490ca;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.18);
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: #fff;
  min-height: 100vh;
  background: #1e3c72;
  overflow-x: hidden;
}

/* Fixed sky layer, its gradient comes from the theme class on body */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--sky);
}

/* Sky themes, switched from JS based on the weather */
.sky-clear-day    { --sky: linear-gradient(180deg, #2b7fd6 0%, #6ab7ff 60%, #ffd194 100%); }
.sky-clear-night  { --sky: linear-gradient(180deg, #0b1026 0%, #1b2450 60%, #3a2f5b 100%); }
.sky-cloudy       { --sky: linear-gradient(180deg, #4b5d73 0%, #7d8ea3 60%, #a7b3c2 100%); }
.sky-cloudy-night { --sky: linear-gradient(180deg, #1a2130 0%, #2d3a4f 60%, #44506a 100%); }
.sky-rain         { --sky: linear-gradient(180deg, #232f3e 0%, #3e5068 60%, #59708a 100%); }
.sky-snow         { --sky: linear-gradient(180deg, #6f86a6 0%, #a9bcd6 60%, #dfe8f3 100%); }
.sky-storm        { --sky: linear-gradient(180deg, #0f1218 0%, #252a36 60%, #3a3150 100%); }
.sky-fog          { --sky: linear-gradient(180deg, #78828c 0%, #a2abb3 60%, #c9ced3 100%); }

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.text-accent { color: var(--accent); }
.ls-wide { letter-spacing: 0.12em; }

/* Glass cards */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.glass-danger {
  background: rgba(220, 53, 69, 0.25);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #fff;
  backdrop-filter: blur(10px);
  border-radius: 1rem;
}
.card-pad { padding: 1.75rem; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #10202b;
  font-weight: 600;
  border: none;
}
.btn-accent:hover { filter: brightness(1.1); color: #10202b; }

.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #fff;
}
.btn-check:checked + .btn-glass {
  background: #fff;
  color: #10202b;
}

/* Navbar */
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
.nav-shell {
  border-radius: 50rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  transition: background 0.3s, box-shadow 0.3s;
}
#topNav.scrolled .nav-shell {
  background: rgba(15, 25, 45, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.brand-logo {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #10202b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.brand-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(1.6); opacity: 0; }
}
.brand-tagline { font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); letter-spacing: 0.04em; }

.nav-pills-glass .nav-link {
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50rem;
  padding: 0.45rem 1rem !important;
  font-weight: 500;
  transition: background 0.25s, color 0.25s;
}
.nav-pills-glass .nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.nav-pills-glass .nav-link.active {
  color: #10202b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px rgba(94, 231, 223, 0.35);
}

@media (max-width: 991px) {
  .nav-shell { border-radius: 1.5rem; }
  .navbar-collapse { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .brand-tagline { display: none; }
  .brand-logo { width: 40px; height: 40px; font-size: 1.2rem; }
  .navbar-toggler { padding: 0 0.25rem; }
}

/* Search */
.search-wrap { max-width: 640px; position: relative; }
#searchInput::placeholder { color: rgba(255, 255, 255, 0.55); }
.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  overflow: hidden;
  background: rgba(20, 30, 50, 0.85);
}
.suggestions .list-group-item {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.suggestions .list-group-item:hover,
.suggestions .list-group-item.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: transparent;
}

.recent-chip {
  border-radius: 50rem;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
}

/* Hero */
.main-icon {
  font-size: 6rem;
  line-height: 1;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
  animation: float 4s ease-in-out infinite;
}
.big-temp {
  font-size: clamp(4rem, 12vw, 6.5rem);
  font-weight: 300;
  line-height: 1;
}
.big-temp sup { font-size: 0.35em; top: -1.4em; }
.outfit {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sun arc */
#sunDot { filter: drop-shadow(0 0 10px #ffe066); transition: cx 1s, cy 1s; }

/* Tiles */
.tile { padding: 1.1rem; height: 100%; }
.tile-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.4rem;
}
.tile-value { font-size: 1.7rem; font-weight: 500; }
.tile-value small { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }
.tile-bar { height: 6px; background: rgba(255, 255, 255, 0.15); margin-top: 0.5rem; }

.compass {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}
#windArrow { display: inline-block; transition: transform 1s ease; }

.uv-scale {
  position: relative;
  height: 6px;
  border-radius: 3px;
  margin: 0.5rem 0 0.35rem;
  background: linear-gradient(90deg, #3ddc84, #ffe066, #ff9f43, #ff4d4d, #b04dff);
}
#uvMarker {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #10202b;
  transform: translate(-50%, -50%);
  transition: left 1s;
}

/* Hourly */
.hourly-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.hourly-scroll::-webkit-scrollbar { height: 6px; }
.hourly-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
.hourly-inner { min-width: 1100px; position: relative; }
.hourly-chart { width: 100%; height: 90px; display: block; }
.hourly-list { display: grid; grid-template-columns: repeat(24, 1fr); text-align: center; }
.hour-cell { font-size: 0.85rem; padding-top: 0.4rem; }
.hour-cell i { font-size: 1.3rem; display: block; margin: 0.25rem 0; }
.hour-cell .rain { color: #8fd3ff; font-size: 0.75rem; }
.hour-cell.now { color: var(--accent); font-weight: 700; }

/* Daily range bars */
.day-row {
  display: grid;
  grid-template-columns: 90px 40px 50px 1fr 50px;
  align-items: center;
  gap: 0.75rem;
  min-height: 60px;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.day-row:last-child { border-bottom: none; }
.day-row i { font-size: 1.4rem; }
.range-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}
.range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #6ec6ff, #ffe066, #ff7e5f);
}
.range-now {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
}
.day-rain { font-size: 0.7rem; color: #d6efff; font-weight: 700; display: block; }

/* Footer */
.footer-card { position: relative; overflow: hidden; }
.footer-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 231, 223, 0.35), transparent 70%);
  pointer-events: none;
}
#subscribeEmail::placeholder { color: rgba(255, 255, 255, 0.55); }
.subscribe-form .input-group:focus-within { border-color: var(--accent); }
.subscribe-form.invalid .input-group { border-color: #ff6b6b; }
.social-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s, background 0.25s, color 0.25s;
}
.social-btn:hover {
  transform: translateY(-4px) rotate(-8deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #10202b;
}
.footer-line { border-color: rgba(255, 255, 255, 0.25); opacity: 1; }
.msg-error { color: #ffc2c2; }

@media (max-width: 575px) {
  .subscribe-form .btn { padding-left: 1rem !important; padding-right: 1rem !important; }
  .card-pad { padding: 1.25rem; }
  .main-icon { font-size: 4.5rem; }
  .day-row { grid-template-columns: 60px 32px 40px 1fr 40px; gap: 0.5rem; font-size: 0.9rem; }
}
