/* ===== Base ===== */
:root{
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0,0,0,.18);
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

/* Theme variables get set per theme class */
body.theme-1{
  --bgA:#6f53ff;
  --bgB:#3f53ff;
  --glass: rgba(255,255,255,.14);
  --stroke: rgba(255,255,255,.22);
  --text:#eef2ff;
  --muted: rgba(238,242,255,.85);
  --accent:#44f2ff;
  --accent2:#ff3ecf;
  --panel: rgba(0,0,0,.12);
}
body.theme-2{
  --bgA:#070a14;
  --bgB:#090f1f;
  --glass: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.10);
  --text:#eaf2ff;
  --muted:#a9b6d6;
  --accent:#44f2ff;
  --accent2:#6b5cff;
  --panel: rgba(7,10,20,.55);
}
body.theme-3{
  --bgA:#071026;
  --bgB:#060a18;
  --glass: rgba(255,255,255,.07);
  --stroke: rgba(255,255,255,.12);
  --text:#eaf2ff;
  --muted:#b0c2ea;
  --accent:#2b7bff;
  --accent2:#47f3ff;
  --panel: rgba(7,11,24,.60);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 20% -10%, rgba(71,243,255,.18), transparent 60%),
    radial-gradient(900px 700px at 95% 0%, rgba(107,92,255,.18), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(43,123,255,.14), transparent 55%),
    linear-gradient(135deg, var(--bgA), var(--bgB));
}
a{ color:inherit; text-decoration:none; }
code{ background: rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.14); padding:3px 8px; border-radius:10px; }

/* ===== Topbar ===== */
.topbar{
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel);
  backdrop-filter: blur(12px);
}
.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:46px;height:46px;border-radius:16px;
  display:grid;place-items:center;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.bname{ font-weight:950; letter-spacing:-.2px; }
.bsub{ font-size:12px; color: var(--muted); margin-top:2px; }
.nav{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.chip{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 900;
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  transition: .18s ease;
}
.chip:hover{ transform: translateY(-1px); background: rgba(255,255,255,.09); }
.chip.is-active{
  border-color: rgba(71,243,255,.30);
  background: linear-gradient(135deg, rgba(71,243,255,.14), rgba(43,123,255,.14));
}

/* ===== Layout wrapper ===== */
.wrap{ max-width: 1200px; margin: 18px auto 40px; padding: 0 18px; }

.view{ display:none; }
.view.is-active{ display:block; }

.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  font-weight: 900;
}
.h1{
  margin: 14px 0 10px;
  font-size: 46px;
  letter-spacing: -1px;
}
.h2{
  margin: 10px 0 6px;
  font-size: 34px;
  letter-spacing: -0.8px;
}
.lead{ margin:0; color: var(--muted); line-height:1.65; max-width: 680px; }
.lead2{ margin:0; color: var(--muted); line-height:1.55; max-width: 820px; }

/* ===== Landing Hero ===== */
.hero{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 16px;
  align-items: start;
}
.heroCopy{
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--glass);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(14px);
}
.row{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }

.btn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 950;
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  transition: .18s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.09); }

.btn.primary{
  border-color: rgba(71,243,255,.22);
  background: linear-gradient(135deg, rgba(71,243,255,.14), rgba(43,123,255,.14));
}
.btn.glass{
  border-color: rgba(255,255,255,.16);
  background: rgba(0,0,0,.12);
}
.miniFacts{
  margin-top: 16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.mf{
  padding: 10px 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
  font-weight: 900;
  display:flex;
  align-items:center;
  gap:10px;
}

.heroCard{
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow:hidden;
  backdrop-filter: blur(14px);
}
.cardTop{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.dots{ display:flex; gap:7px; }
.dots span{ width:10px;height:10px;border-radius:999px;background: rgba(255,255,255,.18); }
.dots span:nth-child(1){ background: rgba(71,243,255,.35); }
.dots span:nth-child(2){ background: rgba(43,123,255,.35); }
.dots span:nth-child(3){ background: rgba(107,92,255,.35); }
.cardTitle{ font-weight: 950; color: rgba(234,242,255,.88); }
.cardRight{ margin-left:auto; }
.badge{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
  font-weight: 950;
  font-size: 12px;
}
.cardBody{
  position: relative;
  height: 420px;
  padding: 14px;
}
.fakeMap{
  height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(700px 420px at 20% 10%, rgba(71,243,255,.14), transparent 60%),
    radial-gradient(700px 420px at 90% 40%, rgba(107,92,255,.16), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,0));
}
.fakeWidget{
  position:absolute;
  right: 18px;
  top: 110px;
  width: 260px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  padding: 14px;
}
.fakeTemp{ font-size: 46px; font-weight: 950; letter-spacing:-1px; }
.fakeSub{ color: rgba(234,242,255,.78); font-weight: 800; margin-top: 4px; }
.fakeGrid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fakeGrid div{
  border:1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.06);
}
.fakeGrid i{ color: rgba(71,243,255,.95); }
.fakeGrid b{ display:block; margin-top:6px; font-weight:950; }
.fakeGrid span{ display:block; margin-top:2px; font-size:12px; color: rgba(234,242,255,.76); font-weight: 800; }

.cardFoot{
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(234,242,255,.82);
  font-weight: 800;
  font-size: 12px;
}
.note{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
  color: rgba(234,242,255,.86);
}
.kbd{
  display:inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  font-weight: 950;
}

/* ===== Forecast header ===== */
.forecastHead{
  display:flex;
  gap: 14px;
  align-items:flex-end;
  justify-content: space-between;
  flex-wrap:wrap;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 16px;
}
#cityTitle{ color: var(--accent2); font-weight: 950; }

.switchers{
  display:flex;
  gap: 12px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.seg{
  display:flex;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  overflow:hidden;
  background: rgba(0,0,0,.12);
}
.segBtn{
  border:none;
  background: transparent;
  color: rgba(234,242,255,.86);
  padding: 10px 12px;
  font-weight: 950;
  cursor:pointer;
}
.segBtn.is-active{
  background: linear-gradient(135deg, rgba(71,243,255,.14), rgba(43,123,255,.14));
  color: #fff;
}
.search{
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(0,0,0,.12);
  padding: 10px 12px;
}
.search input{
  width: 280px;
  max-width: 52vw;
  border:none;
  outline:none;
  background: transparent;
  color: #fff;
  font-weight: 900;
}
.search button{
  border:none;
  cursor:pointer;
  width: 38px; height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color:#fff;
}
.search button:hover{ background: rgba(255,255,255,.16); }

/* ===== Messages ===== */
.msg{
  margin-top: 12px;
  font-weight: 900;
  color: rgba(234,242,255,.86);
}
.msg.ok{ color: rgba(71,243,255,.92); }
.msg.bad{ color: #ff8a8a; }

/* ===== UI Renders (Forecast UIs) ===== */
.ui{
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* UI1 (Light + green button style inside) */
.ui1{
  background: #f6f8fb;
  color: #0f172a;
  border-color: rgba(15,23,42,.10);
}
.ui1 .uiTop{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(15,23,42,.10);
}
.ui1 .uiTop .title{
  font-weight: 950;
  color:#0f172a;
}
.ui1 .uiTop .sub{
  font-size:12px;
  color:#64748b;
  font-weight:800;
}
.ui1 .uiBody{
  padding: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ui1 .card{
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
}
.ui1 .nowRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.ui1 .temp{
  font-size: 54px;
  font-weight: 950;
  letter-spacing:-1px;
}
.ui1 .desc{ color:#64748b; font-weight:900; margin-top:6px; text-transform: capitalize; }
.ui1 .icon{ width:70px;height:70px; }
.ui1 .meta{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ui1 .meta div{
  border:1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  padding: 10px;
  background: #fafafa;
}
.ui1 .meta span{ display:block; font-size:12px; color:#64748b; font-weight:900; }
.ui1 .meta b{ display:block; margin-top:4px; font-weight:950; }
.ui1 .forecastGrid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ui1 .fCard{
  border:1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  padding: 10px;
  background:#fafafa;
  text-align:center;
}
.ui1 .fCard img{ width:46px;height:46px; }
.ui1 .fCard .t{ font-weight:950; }
.ui1 .fCard .v{ font-weight:950; margin-top:4px; }
.ui1 .fCard .m{ font-size:12px; color:#64748b; font-weight:900; }

.ui1 .mapCard iframe{
  width:100%;
  height: 260px;
  border:0;
  border-radius: 16px;
}
.ui1 .greenBtn{
  border:none;
  background:#16a34a;
  color:#fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 950;
}
.ui1 .greenBtn:hover{ filter: brightness(.95); }

/* UI2 (Dark dashboard / widget feel) */
.ui2{
  background: rgba(7,10,20,.55);
  color: var(--text);
}
.ui2 .uiBody{
  display:grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 12px;
  padding: 14px;
}
.ui2 .mapWrap{
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
  min-height: 520px;
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(71,243,255,.14), transparent 60%),
    radial-gradient(900px 520px at 85% 30%, rgba(107,92,255,.16), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,0));
}
.ui2 .mapWrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  filter: contrast(1.05) saturate(1.05);
  opacity: .85;
}
.ui2 .overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(7,10,20,.20), rgba(7,10,20,.55));
}
.ui2 .widget{
  pointer-events:auto;
  position:absolute;
  right: 16px;
  top: 90px;
  width: 280px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  padding: 14px;
}
.ui2 .bigTemp{ font-size: 56px; font-weight: 950; letter-spacing:-1px; }
.ui2 .descRow{
  display:flex; gap:10px; align-items:center; margin-top: 10px;
}
.ui2 .descRow img{ width:58px;height:58px; }
.ui2 .descRow .d{ text-transform: capitalize; font-weight: 950; }
.ui2 .descRow .s{ color: rgba(234,242,255,.78); font-weight: 800; font-size:12px; }

.ui2 .wGrid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ui2 .wGrid div{
  border:1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.06);
}
.ui2 .wGrid span{ display:block; font-size:12px; color: rgba(234,242,255,.75); font-weight: 900; }
.ui2 .wGrid b{ display:block; margin-top:4px; font-weight: 950; }

.ui2 .panel{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  padding: 14px;
}
.ui2 .panelTop{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 10px;
}
.ui2 .panelTop b{ font-weight: 950; }
.ui2 .panelTop .date{ color: rgba(234,242,255,.78); font-weight: 900; font-size:12px; }
.ui2 .list{
  display:grid;
  gap: 10px;
}
.ui2 .item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
.ui2 .item .time{ font-weight: 950; width: 60px; }
.ui2 .item .mid{ display:flex; gap:10px; align-items:center; flex:1; }
.ui2 .item img{ width:38px; height:38px; }
.ui2 .item .main{ font-weight: 950; }
.ui2 .item .sub{ color: rgba(234,242,255,.76); font-weight: 850; font-size:12px; text-transform: capitalize;}
.ui2 .item .val{ font-weight: 950; }

/* UI3 (Blue mobile-first card layout) */
.ui3{
  background:
    radial-gradient(900px 520px at 25% 10%, rgba(71,243,255,.16), transparent 60%),
    radial-gradient(900px 520px at 85% 30%, rgba(43,123,255,.16), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,0));
}
.ui3 .uiBody{
  padding: 14px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.ui3 .topCard{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
  padding: 14px;
}
.ui3 .topRow{
  display:flex; justify-content:space-between; align-items:center; gap:12px;
}
.ui3 .temp{
  font-size: 56px;
  font-weight: 950;
  letter-spacing:-1px;
}
.ui3 .desc{ margin-top:6px; color: rgba(234,242,255,.78); font-weight: 900; text-transform: capitalize; }
.ui3 .topRow img{ width:72px;height:72px; }

.ui3 .chips{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.ui3 .chipCard{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-weight: 950;
  display:flex;
  gap:10px;
  align-items:center;
}
.ui3 .chipCard i{ color: rgba(71,243,255,.95); }
.ui3 .grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ui3 .fCard{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
  padding: 12px;
  text-align:center;
}
.ui3 .fCard img{ width:46px;height:46px; }
.ui3 .fCard .t{ font-weight: 950; }
.ui3 .fCard .v{ font-weight: 950; margin-top:4px; }
.ui3 .fCard .m{ color: rgba(234,242,255,.76); font-weight: 850; font-size:12px; }
.ui3 .mapMini iframe{
  width:100%;
  height: 220px;
  border:0;
  border-radius: 18px;
  opacity: .9;
}

/* ===== Modal ===== */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.55);
}
.modal.is-open{ display:flex; }
.modalCard{
  width: min(720px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7,10,20,.75);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  padding: 14px;
}
.modalTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.modalTitle{ font-weight: 950; }
.x{
  width:40px;height:40px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor:pointer;
}
.modalText{ margin: 12px 0; color: rgba(234,242,255,.82); font-weight: 800; }
.modalRow{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
}
.keyInput{
  flex:1;
  min-width: 240px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 12px 12px;
  font-weight: 900;
  outline:none;
}
.btn.save{
  border-color: rgba(71,243,255,.22);
  background: linear-gradient(135deg, rgba(71,243,255,.14), rgba(43,123,255,.14));
}
.modalHint{
  margin-top: 10px;
  color: rgba(234,242,255,.78);
  font-weight: 800;
  font-size: 12px;
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .h1{ font-size: 38px; }
  .search input{ width: 220px; }
  .ui2 .uiBody{ grid-template-columns: 1fr; }
  .ui2 .mapWrap{ min-height: 460px; }
}
@media (max-width: 560px){
  .h1{ font-size: 32px; }
  .ui1 .uiBody{ grid-template-columns: 1fr; }
  .ui1 .forecastGrid{ grid-template-columns: repeat(2, 1fr); }
  .ui3 .grid{ grid-template-columns: repeat(2, 1fr); }
}
