/* ═══════════════════════════════════════════════════
   BREZZ.IT v2.0 — style.css
   Design system completo
   Modifica qui per aggiornare TUTTO il sito
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,500;12..96,600&display=swap');

/* ── VARIABILI GLOBALI ── */
:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.4s;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
}

/* ── MODALITÀ NOTTE ── */
body.night {
  --bg: #03050a;
  --bg1: #060c18;
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.07);
  --nav-bg: rgba(3,5,10,0.92);
  --a1: #5bb8ff;
  --a2: #00e8ff;
  --a1-dim: rgba(91,184,255,0.15);
  --warm: #ffca45;
  --hot: #ff5566;
  --cold: #aad4ff;
  --green: #00e8a0;
  --purple: #b388ff;
  --text: #eaf0ff;
  --text2: #c0d0e8;
  --sub: #607890;
  --dim: #1a2d44;
  --border: rgba(255,255,255,0.07);
  --border-a: rgba(91,184,255,0.2);
  --shadow: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.3);
}

/* ── MODALITÀ GIORNO ── */
body.day {
  --bg: #e0eefa;
  --bg1: #cce0f5;
  --card: rgba(255,255,255,0.75);
  --card-hover: rgba(255,255,255,0.92);
  --nav-bg: rgba(220,238,255,0.94);
  --a1: #1478d4;
  --a2: #0090e0;
  --a1-dim: rgba(20,120,212,0.1);
  --warm: #e89000;
  --hot: #e02030;
  --cold: #1858a0;
  --green: #009870;
  --purple: #7c4dff;
  --text: #08182e;
  --text2: #1a3050;
  --sub: #3a6080;
  --dim: #88b0d0;
  --border: rgba(20,60,120,0.1);
  --border-a: rgba(20,120,212,0.25);
  --shadow: 0 8px 40px rgba(10,40,100,0.12);
  --shadow-sm: 0 4px 20px rgba(10,40,100,0.08);
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

/* ── SFONDI NOTTE ── */
.bg-night {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 75% 60% at 15% 5%, rgba(10,45,110,0.6) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 88% 88%, rgba(5,25,75,0.45) 0%, transparent 55%),
    linear-gradient(180deg, #03050a 0%, #060c18 100%);
  transition: opacity var(--dur);
}

.nebula {
  position: fixed; border-radius: 50%;
  filter: blur(120px); pointer-events: none;
  animation: nebdrift var(--d) ease-in-out infinite alternate;
}
@keyframes nebdrift {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(var(--tx),var(--ty)) scale(var(--s)); }
}

.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.star {
  position: absolute; background: #fff; border-radius: 50%;
  animation: twinkle var(--d) ease-in-out infinite var(--dl);
}
@keyframes twinkle {
  0%,100% { opacity: var(--lo); transform: scale(1); }
  50% { opacity: var(--hi); transform: scale(1.4); }
}

.meteor {
  position: fixed; top: 0; width: 1px; height: 100px;
  background: linear-gradient(180deg, rgba(91,184,255,0.9), transparent);
  border-radius: 2px; opacity: 0; z-index: 0; pointer-events: none;
  animation: meteor var(--d) linear infinite var(--dl);
}
@keyframes meteor {
  0% { transform: translateY(-120px) translateX(0) rotate(18deg); opacity: 0; }
  4% { opacity: 1; } 22% { opacity: 0; }
  100% { transform: translateY(100vh) translateX(240px) rotate(18deg); opacity: 0; }
}

/* ── SFONDI GIORNO ── */
.bg-day {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 78% -5%, rgba(255,215,60,0.45) 0%, transparent 55%),
    radial-gradient(ellipse 85% 65% at 0% 100%, rgba(80,160,255,0.2) 0%, transparent 55%),
    linear-gradient(170deg, #b5d8f5 0%, #cce6f8 35%, #e2f2ff 70%, #eef8ff 100%);
  transition: opacity var(--dur);
}

.sun-orb {
  position: fixed; top: -80px; right: -60px; z-index: 0;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,50,0.7) 20%, rgba(255,190,30,0.12) 65%, transparent 100%);
  filter: blur(14px);
  animation: sunpulse 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sunpulse {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.day-cloud {
  position: fixed; border-radius: 60px;
  background: rgba(255,255,255,0.7);
  filter: blur(12px); pointer-events: none; z-index: 0;
  animation: clouddrift linear infinite;
}
@keyframes clouddrift {
  from { transform: translateX(-400px); }
  to { transform: translateX(calc(100vw + 400px)); }
}

/* ── LAYOUT ── */
.wrap {
  position: relative; z-index: 1;
  max-width: 430px; margin: 0 auto;
  padding: 0 15px 110px;
}

/* ── LOADING ── */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #03050a;
  transition: opacity 0.6s var(--ease);
}
.loader-logo {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 52px; letter-spacing: -3px;
  background: linear-gradient(135deg, #5bb8ff, #00e8ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 8px;
}
.loader-tag { font-size: 13px; color: #607890; letter-spacing: 2px; margin-bottom: 32px; }
.loader-bar { width: 140px; height: 2px; background: #1a2d44; border-radius: 2px; overflow: hidden; }
.loader-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #5bb8ff, #00e8ff);
  animation: loadfill 1.8s var(--ease) forwards;
}
@keyframes loadfill { from { width: 0; } to { width: 100%; } }

/* ── HEADER ── */
header {
  padding: 26px 0 0;
  display: flex; align-items: center; justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-svg { width: 44px; height: 44px; flex-shrink: 0; }
.logo-wm {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 26px; letter-spacing: -1.5px; line-height: 1;
}
.lw-b { color: var(--text); transition: color var(--dur); }
.lw-rezz {
  background: linear-gradient(130deg, var(--a1), var(--a2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-tag {
  font-size: 8px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--sub); margin-top: 2px; transition: color var(--dur);
}

.hdr-right { display: flex; align-items: center; gap: 8px; }

/* Toggle integrato nell'header */
.mode-toggle {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 30px; padding: 4px;
  backdrop-filter: blur(20px);
  transition: all var(--dur);
}
.mt-btn {
  width: 30px; height: 30px; border-radius: 22px; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; background: transparent;
  transition: all 0.22s var(--spring);
}
.mt-btn.on {
  background: var(--a1);
  box-shadow: 0 2px 10px rgba(91,184,255,0.4);
}
body.day .mt-btn.on {
  background: var(--warm);
  box-shadow: 0 2px 10px rgba(232,144,0,0.4);
}

.loc-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 30px; padding: 7px 12px 7px 9px;
  cursor: pointer; transition: all var(--dur);
  backdrop-filter: blur(20px);
}
.loc-pill:hover { border-color: var(--a1); }
.live-dot {
  width: 7px; height: 7px; background: var(--a2);
  border-radius: 50%; box-shadow: 0 0 6px var(--a2);
  animation: livepulse 2.5s ease-in-out infinite;
}
@keyframes livepulse {
  0%,100% { box-shadow: 0 0 4px var(--a2); }
  50% { box-shadow: 0 0 14px var(--a2); }
}
.loc-txt { font-size: 13px; font-weight: 500; color: var(--text); transition: color var(--dur); }

/* ── DATA ── */
.date-row {
  margin: 16px 0 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.date-txt { font-size: 12px; color: var(--sub); transition: color var(--dur); }
.update-txt { font-size: 11px; color: var(--dim); transition: color var(--dur); }

/* ── RICERCA COMUNE ── */
.search-bar {
  position: relative; margin-bottom: 16px;
  z-index: 500;
}
.search-input {
  width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 13px 52px 13px 18px;
  color: var(--text); font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; outline: none;
  transition: all var(--dur); backdrop-filter: blur(24px);
}
.search-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--a1-dim); border: 1px solid var(--border-a);
  border-radius: 10px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: var(--a1);
  transition: background var(--dur), transform 0.1s;
}
.search-btn:hover { background: rgba(91,184,255,0.18); }
.search-btn:active { transform: translateY(-50%) scale(0.92); }
.search-input::placeholder { color: var(--sub); }
.search-input:focus {
  border-color: var(--border-a);
  background: var(--a1-dim);
  box-shadow: 0 0 0 3px rgba(91,184,255,0.08);
}
.search-ico {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px; color: var(--sub); pointer-events: none;
}
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  z-index: 501; display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(30px);
}
.search-result-item {
  padding: 12px 16px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background 0.15s;
  font-size: 14px;
}
.search-result-item:hover { background: var(--card-hover); }
.search-result-item .sri-ico { font-size: 16px; flex-shrink: 0; }
.search-result-item .sri-name { font-weight: 500; color: var(--text); }
.search-result-item .sri-prov { font-size: 11px; color: var(--sub); margin-left: auto; }

/* ── PROFILI SWITCH RAPIDO ── */
.profile-switch {
  display: flex; gap: 6px; margin-bottom: 16px;
  overflow-x: auto; padding: 4px 0 6px;
  scrollbar-width: none;
}
.profile-switch::-webkit-scrollbar { display: none; }
.ps-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 30px; padding: 7px 14px;
  font-size: 12px; color: var(--sub); cursor: pointer;
  transition: all 0.22s var(--spring);
  font-family: 'Bricolage Grotesque', sans-serif;
  white-space: nowrap; overflow: visible;
  min-height: 36px;
}
.ps-btn:hover { border-color: var(--a1); color: var(--text); transform: translateY(-1px); }
.ps-btn.active {
  background: var(--a1-dim); border-color: var(--a1);
  color: var(--a1); font-weight: 600;
  box-shadow: 0 4px 16px rgba(91,184,255,0.15);
}
.ps-ico { font-size: 15px; }

/* ── AI RISPOSTA ── */
.ai-card {
  display: none;
  background: linear-gradient(135deg, rgba(91,184,255,0.1), rgba(0,232,255,0.04));
  border: 1px solid var(--border-a);
  border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 14px;
  animation: popin 0.38s var(--spring);
  backdrop-filter: blur(20px);
}
body.day .ai-card {
  background: linear-gradient(135deg, rgba(20,120,212,0.08), rgba(0,144,224,0.03));
}
@keyframes popin {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.ai-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-orb {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; box-shadow: 0 0 14px rgba(91,184,255,0.5);
  animation: orbglow 3s ease-in-out infinite;
}
@keyframes orbglow {
  0%,100% { box-shadow: 0 0 10px rgba(91,184,255,0.4); }
  50% { box-shadow: 0 0 22px rgba(91,184,255,0.7); }
}
.ai-lbl { font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--a1); font-weight: 700; }
.ai-txt { font-size: 14px; line-height: 1.7; color: var(--text); font-weight: 300; }
.ai-txt strong { color: var(--warm); font-weight: 600; }

/* ── HERO CARD ── */
.hero {
  position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 24px 20px 20px;
  margin-bottom: 10px; overflow: hidden;
  backdrop-filter: blur(50px);
  box-shadow: var(--shadow);
  transition: all var(--dur);
}
.hero-glow {
  position: absolute; top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(91,184,255,0.1), transparent 70%);
  pointer-events: none; transition: all var(--dur);
}
body.day .hero-glow { background: radial-gradient(circle, rgba(255,210,50,0.2), transparent 70%); }

.hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.hero-city { font-size: 11px; color: var(--sub); margin-bottom: 5px; transition: color var(--dur); }
.hero-temp-row { display: flex; align-items: flex-start; line-height: 1; overflow: hidden; max-width: 100%; }
.hero-temp {
  font-family: 'Syne', sans-serif; font-size: 72px; font-weight: 800;
  letter-spacing: -4px; line-height: 0.9;
  background: linear-gradient(170deg, var(--text) 40%, rgba(232,242,255,0.3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  overflow: hidden;
}
body.day .hero-temp {
  background: linear-gradient(170deg, #08182e 40%, rgba(8,24,46,0.3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-deg { font-family: 'Syne', sans-serif; font-size: 18px; color: var(--sub); font-weight: 400; margin-top: 8px; }
.hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hero-ico {
  font-size: 62px; line-height: 1;
  filter: drop-shadow(0 0 18px rgba(255,210,50,0.2));
  animation: floatic 5s ease-in-out infinite;
}
@keyframes floatic {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}
.hero-badge {
  background: rgba(255,202,69,0.12); border: 1px solid rgba(255,202,69,0.2);
  border-radius: 20px; padding: 4px 10px; font-size: 11px; color: var(--warm);
}
.hero-desc { font-size: 17px; font-weight: 300; color: var(--sub); margin-bottom: 2px; transition: color var(--dur); }
.hero-feels { font-size: 11.5px; color: var(--sub); transition: color var(--dur); }
.hero-line { height: 1px; background: linear-gradient(90deg, transparent, var(--border-a), transparent); margin: 16px 0; }
.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); }
.hst { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 3px; position: relative; }
.hst:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 15%; bottom: 15%; width: 1px; background: var(--border); }
.hst-ico { font-size: 15px; }
.hst-v { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); transition: color var(--dur); }
.hst-l { font-size: 9px; color: var(--sub); letter-spacing: 0.3px; transition: color var(--dur); }

/* ── MOOD CARD ── */
.mood-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(20px); transition: all var(--dur);
}
.mood-ico { font-size: 28px; flex-shrink: 0; }
.mood-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; transition: color var(--dur); }
.mood-txt { font-size: 12px; color: var(--sub); transition: color var(--dur); }

/* ── TEMP RANGE ── */
.trange {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(20px); transition: all var(--dur);
}
.tr-lo { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700; color: var(--cold); }
.tr-hi { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700; color: var(--warm); }
.tr-bar { flex: 1; position: relative; height: 5px; background: rgba(255,255,255,0.08); border-radius: 10px; }
body.day .tr-bar { background: rgba(20,60,130,0.1); }
.tr-fill { position: absolute; left: 20%; right: 15%; top: 0; bottom: 0; background: linear-gradient(90deg, var(--cold), var(--a1), var(--warm)); border-radius: 10px; }
.tr-cursor { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 11px; height: 11px; background: white; border: 2px solid var(--a1); border-radius: 50%; box-shadow: 0 0 8px rgba(91,184,255,0.6); }
.tr-lbl { font-size: 9px; color: var(--sub); }

/* ── ALLERTA ── */
.alert-card {
  background: linear-gradient(135deg, rgba(255,85,102,0.09), rgba(255,85,102,0.03));
  border: 1px solid rgba(255,85,102,0.2); border-left: 3px solid rgba(255,85,102,0.6);
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px;
  display: flex; align-items: flex-start; gap: 9px;
}
.alert-ico { font-size: 18px; flex-shrink: 0; }
.alert-title { font-size: 12.5px; font-weight: 700; color: var(--hot); margin-bottom: 2px; }
.alert-txt { font-size: 12px; color: var(--sub); line-height: 1.5; transition: color var(--dur); }

/* ── SEZIONI ── */
.sec { margin-bottom: 10px; }
.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-ttl { font-size: 9.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--sub); font-weight: 600; transition: color var(--dur); }
.sec-lnk { font-size: 11px; color: var(--a1); cursor: pointer; text-decoration: none; }

/* ── CONSIGLIO PROFILO ── */
.advice-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
  backdrop-filter: blur(20px); transition: all var(--dur);
}
.adv-ico { font-size: 30px; flex-shrink: 0; }
.adv-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); transition: color var(--dur); }
.adv-txt { font-size: 12.5px; color: var(--sub); line-height: 1.6; transition: color var(--dur); }
.adv-tag {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 9px;
  background: rgba(255,202,69,0.1); border: 1px solid rgba(255,202,69,0.2);
  border-radius: 20px; padding: 4px 11px; font-size: 10.5px; color: var(--warm); font-weight: 500;
}

/* ── CHIPS DOMANDE ── */
.chips-wrap { margin-bottom: 14px; }
.chips-lbl { font-size: 9.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--sub); margin-bottom: 8px; transition: color var(--dur); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 13px; font-size: 12px; color: var(--sub);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  font-family: 'Bricolage Grotesque', sans-serif;
  backdrop-filter: blur(12px);
}
.chip:hover { border-color: var(--a1); color: var(--a1); transform: translateY(-1px); }
.chip:active { transform: scale(0.96); }

/* ── AI SEARCH BAR ── */
.ask-wrap { margin-bottom: 14px; }
.ask-box { position: relative; display: flex; align-items: center; }
.ask-in {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 50px 14px 18px;
  color: var(--text); font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; outline: none; transition: all var(--dur);
  backdrop-filter: blur(28px);
}
.ask-in::placeholder { color: var(--sub); }
.ask-in:focus { border-color: var(--border-a); background: var(--a1-dim); box-shadow: 0 0 0 3px rgba(91,184,255,0.08); }
.ask-btn {
  position: absolute; right: 7px;
  width: 37px; height: 37px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  border: none; border-radius: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  transition: all 0.2s; box-shadow: 0 3px 16px rgba(91,184,255,0.35);
}
.ask-btn:hover { transform: scale(1.07); }

/* ── ORARIO ── */
.hourly-sc { display: flex; gap: 7px; overflow-x: auto; padding: 3px 0 7px; scrollbar-width: none; margin-top: 10px; }
.hourly-sc::-webkit-scrollbar { display: none; }
.hour {
  flex-shrink: 0; min-width: 60px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 11px 8px; text-align: center;
  cursor: pointer; transition: all 0.2s; backdrop-filter: blur(16px);
}
.hour:hover { border-color: var(--border-a); transform: translateY(-2px); }
.hour.active {
  border-color: var(--a1) !important;
  background: var(--a1-dim) !important;
  box-shadow: 0 5px 20px rgba(91,184,255,0.2) !important;
  transform: translateY(-2px) !important;
}
body.day .hour.active {
  background: rgba(20,120,212,0.12) !important;
  border-color: var(--a1) !important;
}
.hour.now {
  background: var(--a1-dim); border-color: var(--a1);
  box-shadow: 0 5px 18px rgba(91,184,255,0.15);
}
.h-t { font-size: 10px; color: var(--sub); margin-bottom: 7px; transition: color var(--dur); }
.hour.now .h-t { color: var(--a1); font-weight: 700; }
.h-ico { font-size: 22px; margin-bottom: 7px; }
.h-tmp { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); transition: color var(--dur); }
.h-rain { font-size: 10px; color: var(--cold); margin-top: 3px; }

/* ── PIOGGIA ── */
.rain-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; margin-top: 10px;
  backdrop-filter: blur(16px); transition: all var(--dur);
}
.rain-bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin-bottom: 6px; }
.rb-w { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 3px; }
.rb { width: 100%; border-radius: 3px 3px 0 0; min-height: 3px; }
.rb.lo { background: linear-gradient(180deg, rgba(91,184,255,0.55), rgba(91,184,255,0.1)); }
body.day .rb.lo { background: linear-gradient(180deg, rgba(20,120,212,0.45), rgba(20,120,212,0.08)); }
.rb.md { background: linear-gradient(180deg, var(--a1), rgba(91,184,255,0.2)); }
.rb.hi { background: linear-gradient(180deg, var(--hot), rgba(255,85,102,0.2)); }
.rb-l { font-size: 8px; color: var(--sub); }

/* ── WIDGETS ── */
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 10px; }
.widget {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 15px;
  cursor: pointer; transition: all var(--dur); backdrop-filter: blur(16px);
}
.widget:hover { border-color: var(--border-a); transform: translateY(-1px); }
.wgt-ico { font-size: 22px; margin-bottom: 9px; }
.wgt-val { font-family: 'Syne', sans-serif; font-size: 21px; font-weight: 700; margin-bottom: 2px; color: var(--text); transition: color var(--dur); }
.wgt-lbl { font-size: 10px; color: var(--sub); transition: color var(--dur); }
.wgt-sub { font-size: 10px; color: var(--sub); margin-top: 5px; transition: color var(--dur); }
.w-sun .wgt-val { color: var(--warm); }
.w-uv .wgt-val { color: var(--green); }
.uv-bar { height: 4px; border-radius: 4px; margin-top: 8px; background: linear-gradient(90deg, var(--green), var(--warm), var(--hot)); position: relative; }
.uv-cur { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 10px; height: 10px; background: white; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 6px rgba(255,255,255,0.5); }

/* ── SETTIMANA SCORRIMENTO LATERALE ── */
.week-scroll {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 0 8px;
  scrollbar-width: none; margin-top: 10px;
  cursor: grab;
}
.week-scroll:active { cursor: grabbing; }
.week-scroll::-webkit-scrollbar { display: none; }

.wday-card {
  flex-shrink: 0; min-width: 100px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 12px;
  text-align: center; cursor: pointer;
  transition: all 0.2s; backdrop-filter: blur(16px);
}
.wday-card:hover { border-color: var(--border-a); transform: translateY(-2px); }
.wday-card.today { border-color: var(--border-a); background: var(--a1-dim); }
.wday-card.active {
  border-color: var(--a1) !important;
  background: var(--a1-dim) !important;
  box-shadow: 0 5px 20px rgba(91,184,255,0.2) !important;
  transform: translateY(-2px) !important;
}
.wday-card--extended.active {
  border-color: var(--a1) !important;
  background: var(--a1-dim) !important;
  box-shadow: 0 5px 20px rgba(91,184,255,0.2) !important;
  transform: translateY(-2px) !important;
}
body.day .wday-card.active,
body.day .wday-card--extended.active {
  background: rgba(20,120,212,0.12) !important;
  border-color: var(--a1) !important;
}
.wdc-name { font-size: 11px; font-weight: 700; color: var(--sub); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; transition: color var(--dur); }
.wday-card.today .wdc-name { color: var(--a1); }
.wdc-ico { font-size: 28px; margin-bottom: 8px; }
.wdc-hi { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: var(--text); transition: color var(--dur); }
.wdc-lo { font-family: 'Syne', sans-serif; font-size: 13px; color: var(--sub); margin-top: 2px; transition: color var(--dur); }
.wdc-rain { font-size: 10px; color: var(--cold); margin-top: 4px; }

/* ── COMUNI PIÙ CERCATI ── */
.comuni-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px;
}
.comuni-extra {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
}
.comune-btn {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  cursor: pointer; transition: all 0.2s; backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between;
}
.comune-btn:hover { border-color: var(--border-a); transform: translateY(-1px); }
.comune-name { font-size: 14px; font-weight: 600; color: var(--a1); }
.comune-prov { font-size: 11px; color: var(--sub); font-weight: 400; }

/* ── NAV BOTTOM ── */
.bnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--nav-bg); backdrop-filter: blur(40px);
  border-top: 1px solid var(--border);
  padding: 10px 4px 26px;
  display: flex; justify-content: space-around; z-index: 100;
  transition: all var(--dur);
}
.bn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; opacity: 0.35; transition: all 0.2s; padding: 0 6px;
  text-decoration: none;
}
.bn.on { opacity: 1; }
.bn-ico { font-size: 20px; transition: all 0.2s; }
.bn.on .bn-ico { filter: drop-shadow(0 0 8px var(--a1)); }
.bn-lbl { font-size: 9px; color: var(--sub); letter-spacing: 0.5px; font-weight: 600; transition: color var(--dur); }
.bn.on .bn-lbl { color: var(--a1); }

/* ── PAGINE INTERNE ── */
.page { display: none; }
.page.active { display: block; }

/* Pagina 7 Giorni */
.forecast-day {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px;
  backdrop-filter: blur(16px); cursor: pointer;
  transition: all 0.2s;
}
.forecast-day:hover { border-color: var(--border-a); }
.fd-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fd-day { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; width: 100px; color: var(--text); transition: color var(--dur); }
.fd-ico { font-size: 28px; }
.fd-desc { flex: 1; font-size: 12.5px; color: var(--sub); transition: color var(--dur); }
.fd-temps { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; }
.fd-hi { color: var(--text); }
.fd-lo { color: var(--sub); font-weight: 400; margin-left: 6px; }
.fd-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.fd-stat { text-align: center; }
.fd-stat-v { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); transition: color var(--dur); }
.fd-stat-l { font-size: 9px; color: var(--sub); margin-top: 2px; transition: color var(--dur); }

/* Pagina Allerte */
.alert-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.alert-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  backdrop-filter: blur(16px);
}
.alert-item.red { border-left: 3px solid var(--hot); border-color: rgba(255,85,102,0.25); }
.alert-item.yellow { border-left: 3px solid var(--warm); border-color: rgba(255,202,69,0.25); }
.alert-item.green { border-left: 3px solid var(--green); border-color: rgba(0,232,160,0.25); }
.alert-level { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.alert-item.red .alert-level { color: var(--hot); }
.alert-item.yellow .alert-level { color: var(--warm); }
.alert-item.green .alert-level { color: var(--green); }
.alert-name { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; transition: color var(--dur); }
.alert-desc { font-size: 12.5px; color: var(--sub); line-height: 1.5; transition: color var(--dur); }
.alert-time { font-size: 11px; color: var(--dim); margin-top: 8px; transition: color var(--dur); }

/* Pagina Mappa */
.map-placeholder {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-top: 10px; height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  backdrop-filter: blur(16px); position: relative;
}
.map-ico { font-size: 48px; margin-bottom: 12px; }
.map-txt { font-size: 14px; color: var(--sub); text-align: center; line-height: 1.6; }
.map-cities {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 14px;
}
.map-city {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  cursor: pointer; transition: all 0.2s; backdrop-filter: blur(12px);
}
.map-city:hover { border-color: var(--border-a); transform: translateY(-1px); }
.mc-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; transition: color var(--dur); }
.mc-temp { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); transition: color var(--dur); }
.mc-desc { font-size: 11px; color: var(--sub); transition: color var(--dur); }

/* Pagina Profilo */
.profile-page { padding-top: 10px; }
.profile-hero {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 20px;
  margin-bottom: 14px; text-align: center;
  backdrop-filter: blur(20px);
}
.profile-avatar { font-size: 56px; margin-bottom: 12px; }
.profile-name { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; transition: color var(--dur); }
.profile-email { font-size: 13px; color: var(--sub); margin-bottom: 16px; transition: color var(--dur); }
.profile-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--a1-dim); border: 1px solid var(--border-a);
  border-radius: 20px; padding: 6px 14px; font-size: 13px; color: var(--a1);
}

.profile-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 14px; }
.profile-opt {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 12px; text-align: center;
  cursor: pointer; transition: all 0.25s var(--spring);
  backdrop-filter: blur(16px);
}
.profile-opt:hover { transform: translateY(-2px); border-color: var(--border-a); }
.profile-opt.selected {
  border-color: var(--a1); background: var(--a1-dim);
  box-shadow: 0 6px 22px rgba(91,184,255,0.18);
  transform: translateY(-2px);
}
.po-ico { font-size: 28px; margin-bottom: 8px; }
.po-name { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; transition: color var(--dur); }
.po-desc { font-size: 10px; color: var(--sub); line-height: 1.4; transition: color var(--dur); }
.profile-opt.selected .po-name { color: var(--a1); }

.settings-list { display: flex; flex-direction: column; gap: 8px; }
.setting-item {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  backdrop-filter: blur(16px); transition: all var(--dur);
}
.setting-ico { font-size: 20px; margin-right: 12px; }
.setting-txt { flex: 1; }
.setting-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; transition: color var(--dur); }
.setting-desc { font-size: 11px; color: var(--sub); transition: color var(--dur); }
.setting-arrow { font-size: 14px; color: var(--sub); }

/* Toggle switch */
.toggle-sw { position: relative; width: 44px; height: 24px; }
.toggle-sw input { opacity: 0; width: 0; height: 0; }
.toggle-sw-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--dim); border-radius: 24px;
  transition: all 0.3s;
}
.toggle-sw-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: all 0.3s;
}
.toggle-sw input:checked + .toggle-sw-slider { background: var(--a1); }
.toggle-sw input:checked + .toggle-sw-slider::before { transform: translateX(20px); }

/* ── PAGINA LOGIN ── */
.login-page {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,5,10,0.85);
  backdrop-filter: blur(20px);
  padding: 20px;
}
.login-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px 24px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 6px; }
.login-logo-txt {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 36px; letter-spacing: -2px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-sub { text-align: center; font-size: 12px; color: var(--sub); margin-bottom: 28px; }
.login-btn {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-md);
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.login-btn-google {
  background: white; color: #333;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.login-btn-google:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.login-btn-skip {
  background: var(--card); border: 1px solid var(--border); color: var(--sub);
}
.login-btn-skip:hover { border-color: var(--border-a); color: var(--text); }
.login-divider { text-align: center; font-size: 11px; color: var(--sub); margin: 8px 0; }

/* ── PAGINA 404 ── */
.page-404 {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 80vh; text-align: center; padding: 40px 20px;
}
.page-404-ico { font-size: 72px; margin-bottom: 18px; animation: floatic 3s ease-in-out infinite; }
.page-404-title { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.page-404-txt { font-size: 15px; color: var(--sub); line-height: 1.6; margin-bottom: 26px; }
.page-404-btn {
  background: linear-gradient(135deg, var(--a1), var(--a2));
  border: none; border-radius: var(--radius-md);
  padding: 13px 28px; color: white; font-size: 15px;
  font-family: 'Bricolage Grotesque', sans-serif;
  cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block;
}

/* ── ANIMAZIONI ── */
@keyframes fu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.fu { animation: fu 0.5s var(--ease) both; }
.d1{animation-delay:.04s} .d2{animation-delay:.09s} .d3{animation-delay:.15s}
.d4{animation-delay:.21s} .d5{animation-delay:.27s} .d6{animation-delay:.34s}
.d7{animation-delay:.40s}

.wday-card--extended {
  opacity: 0.75;
}

.btn-15gg {
  background: var(--card); border: 1px solid var(--border-a);
  border-radius: 20px; padding: 9px 20px;
  color: var(--a1); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'Bricolage Grotesque', sans-serif;
  transition: all 0.2s;
}
.btn-15gg:hover { background: var(--a1-dim); transform: translateY(-1px); }

/* Skeleton loading */
.skel { background: linear-gradient(90deg, var(--dim) 25%, rgba(255,255,255,0.04) 50%, var(--dim) 75%); background-size: 200% 100%; animation: skel 1.5s infinite; border-radius: 8px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Extra 15 giorni strip */
#extra15gg {
  display: none;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 14px;
  scrollbar-width: none;
  margin-top: 4px;
  cursor: grab;
}
#extra15gg::-webkit-scrollbar { display: none; }
#extra15gg:active { cursor: grabbing; }

/* Day detail inline */
.day-detail {
  background: var(--card); border: 1px solid var(--border-a);
  border-radius: var(--radius-md); padding: 16px;
  margin-top: 8px; display: none;
  backdrop-filter: blur(16px);
  animation: fu 0.3s var(--ease);
}
.day-detail.open { display: block; }
.hour-detail {
  background: var(--card); border: 1px solid var(--border-a);
  border-radius: var(--radius-md); padding: 14px 16px;
  margin-top: 8px; display: none;
  backdrop-filter: blur(16px);
  animation: fu 0.3s var(--ease);
}
.hour-detail.open { display: block; }
.hd-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hd-time { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; color: var(--a1); }
.hd-cond { font-size: 13px; color: var(--sub); }
.hd-rows { display: flex; flex-direction: column; gap: 6px; }
.hd-row { display: flex; justify-content: space-between; font-size: 13px; }
.hd-lbl { color: var(--sub); }
.hd-val { color: var(--text); font-weight: 600; }
.wdc-date { font-size: 9px; color: var(--sub); margin-top: 2px; }

/* Day modal */
.day-modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); display: none; align-items: flex-end; justify-content: center; }
.day-modal-overlay.open { display: flex; }
.day-modal { width: 100%; max-width: 430px; background: var(--bg1); border-radius: 28px 28px 0 0; padding: 20px 16px 40px; border-top: 1px solid var(--border); animation: slideup 0.35s var(--ease); max-height: 80vh; overflow-y: auto; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.dm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dm-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: var(--text); }
.dm-close { background: var(--card); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; font-size: 14px; cursor: pointer; color: var(--sub); }
.dm-hero { text-align: center; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.dm-ico { font-size: 52px; margin-bottom: 8px; }
.dm-desc { font-size: 15px; color: var(--sub); margin-bottom: 6px; }
.dm-temps { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); }
.dm-hours { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; cursor: grab; }
.dm-hours:active { cursor: grabbing; }
.dm-hours::-webkit-scrollbar { display: none; }
.dm-hour { flex-shrink: 0; min-width: 64px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 10px 8px; text-align: center; }
.dm-h-time { font-size: 10px; color: var(--sub); margin-bottom: 6px; }
.dm-h-ico { font-size: 22px; margin-bottom: 6px; }
.dm-h-temp { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); }
