/* === Card48 – Hourly + 3-day, Twilight Neon === */ 

.mw-card.card-48 {
  background:
    radial-gradient(circle at 0% 0%, rgba(88, 140, 255, 0.22) 0, transparent 55%),
    #050818;
  color: #f5f7ff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  text-align: center;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

/* keep everything inside sane regardless of theme */
.mw-card.card-48 *,
.mw-card.card-48 *::before,
.mw-card.card-48 *::after {
  box-sizing: border-box;
}

/* ---- Header: location, main temp, desc ---- */

.mw-card.card-48 .mw-title {
  color: #fdfdff;
  font-size: 1.7em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.mw-card.card-48 .mw-temp {
  font-size: 2em;
  font-weight: bold;
  color: #fdfdff;
}

.mw-card.card-48 .mw-desc {
  color: #c3c8ff;
  font-size: 1em;
  margin-top: 0.25rem;
  text-transform: capitalize;
}

/* ---- Stats grid ---- */

.mw-card.card-48 .mw-stats-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9em;
  justify-items: center;
  text-align: center;
}

.mw-card.card-48 .mw-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1em;
  color: #e4e7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Hourly strip ---- */

.mw-card.card-48 .mw-hourly-strip {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}

.mw-card.card-48 .mw-hourly-strip::-webkit-scrollbar {
  display: none;
}

.mw-card.card-48 .mw-hour {
  flex: 0 0 auto;
  width: 70px;
  text-align: center;
  font-size: 0.9em;
}

.mw-card.card-48 .mw-hour-temp {
  font-size: 1em;
  font-weight: 600;
  background: rgba(10, 22, 72, 0.95);
  color: #eaf6ff;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.mw-card.card-48 .mw-hour-icon {
  width: 45px;
  height: 45px;
  display: block;
  margin: 0 auto 0.25rem;
  filter: drop-shadow(0 0 4px rgba(90, 160, 255, 0.45));
}

/* ---- 3-day forecast ---- */

.mw-card.card-48 .mw-forecast-title {
  font-size: 1.1em;
  color: #fdfdff;
  margin-top: 1.5rem;
}

.mw-card.card-48 .mw-forecast-strip {
  display: flex;
  gap: 0.2rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  justify-content: center;
  scrollbar-width: none;
}

.mw-card.card-48 .mw-forecast-strip::-webkit-scrollbar {
  display: none;
}

.mw-card.card-48 .mw-forecast-item {
  background: #0c122a;
  border-radius: 8px;
  padding: 0.5rem 0.4rem;
  text-align: center;
  flex: 0 0 auto;
  min-width: 85px;
  transform: scale(0.85);
  color: #e4e7ff;
}

.mw-card.card-48 .mw-day {
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.mw-card.card-48 .mw-temps {
  font-size: 0.9em;
  font-weight: 600;
  color: #f3f5ff;
}

.mw-card.card-48 .mw-cond {
  font-size: 0.75em;
  line-height: 1.2;
  color: #b1b7ff;
}

/* ---- Freshness line ---- */

.mw-card.card-48 .mw-freshness {
  margin-top: 1rem;
  font-size: 0.75em;
  color: #c5cbff;
  font-style: italic;
  text-align: center;
}

/* ---- Small screens ---- */

@media screen and (max-width: 767px) {
  .mw-card.card-48 {
    width: 100%;
    max-width: 100%;
  }

  .mw-card.card-48 .mw-forecast-item {
    min-width: 110px;
    flex: 0 0 auto;
    padding: 0.5rem 0.4rem;
  }

  .mw-card.card-48 .mw-forecast-strip {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ---- Desktop tweaks ---- */

@media screen and (min-width: 768px) {
  .mw-card.card-48 .mw-stats-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    align-items: center;
    gap: 0.75rem 2rem;
    margin-top: 0.75rem;
  }

  .mw-card.card-48 .mw-stat {
    font-size: 1.1em;
  }

  .mw-card.card-48 .mw-hourly-strip {
    justify-content: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .mw-card.card-48 .mw-hour {
    width: 80px;
    font-size: 0.95em;
  }

  .mw-card.card-48 .mw-hour-temp {
    font-size: 1.05em;
  }

  .mw-card.card-48 .mw-hour-icon {
    width: 50px;
    height: 50px;
  }

  .mw-card.card-48 .mw-forecast-item {
    background: #101735;
    border-radius: 8px;
    padding: 0.75rem 0.6rem;
    min-width: 130px;
    min-height: 140px;
    transform: scale(1.05);
    color: #e4e7ff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  }

  .mw-card.card-48 .mw-hourly-strip::before {
    content: "";
    flex: 0 0 1rem;
  }
}

/* --- Card 48: hourly row tweaks --- */

.mw-card.card-48 .mw-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.mw-card.card-48 .mw-hour-icon {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto 0.25rem;
}

.mw-card.card-48 .mw-hour-time {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
  color: #dfe4ff;
  line-height: 1.2;
  white-space: nowrap;
}

/* === Card 48 – Animated SVG icons (Atiya Haider, MIT) === */
/* Apply the "icon" size to your SVG */
.mw-card.card-48 .mw47-anim-icon {
  width: 100px;
  height: 100px;
}

/* --- From CodePen: animation rules (kept 1:1) --- */

.longRay {
  stroke: #ffdd1a;
  stroke-width: 3;
  stroke-dasharray: 10;
  stroke-dashoffset: 10;
  -webkit-animation: longRayAnimation 4s linear infinite;
  animation: longRayAnimation 4s linear infinite;
}

@keyframes longRayAnimation {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@-webkit-keyframes longRayAnimation {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.shortRay {
  stroke: #ffdd1a;
  stroke-width: 1.5;
  stroke-dasharray: 3;
  stroke-dashoffset: 1;
  -webkit-animation: shortRayAnimation 3s linear infinite;
  animation: shortRayAnimation 3s linear infinite;
}

@-webkit-keyframes shortRayAnimation {
  from {
    stroke-dashoffset: 20;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes shortRayAnimation {
  from {
    stroke-dashoffset: 20;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.small-cloud {
  -webkit-animation: float 8s linear infinite;
  animation: float 8s linear infinite;
}

@-webkit-keyframes float {
  0% {
    -webkit-transform: translate(0px, 15px);
    opacity: 0.75;
  }
  25% {
    -webkit-transform: translate(15px, 0px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translate(30px, 0px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translate(25px, 0px);
    opacity: 1;
  }
  100% {
    -webkit-transform: translate(0px, 15px);
    opacity: 0.75;
  }
}
@keyframes float {
  0% {
    -ms-transform: translate(0px, 15px);
    transform: translate(0px, 15px);
    opacity: 0.75;
  }
  25% {
    -ms-transform: translate(15px, 0px);
    transform: translate(15px, 0px);
    opacity: 1;
  }
  50% {
    -ms-transform: translate(30px, 0px);
    transform: translate(30px, 0px);
    opacity: 1;
  }
  75% {
    -ms-transform: translate(25px, 0px);
    transform: translate(25px, 0px);
    opacity: 1;
  }
  100% {
    -ms-transform: translate(0px, 15px);
    transform: translate(0px, 15px);
    opacity: 0.75;
  }
}

.reverse-small-cloud {
  -webkit-animation: reverse-float 6s linear infinite;
  animation: reverse-float 6s linear infinite;
}

@-webkit-keyframes reverse-float {
  0% {
    -webkit-transform: translate(0px, -15px);
    opacity: 0.75;
  }
  25% {
    -webkit-transform: translate(-15px, 0px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translate(-30px, 0px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translate(-25px, 0px);
    opacity: 1;
  }
  100% {
    -webkit-transform: translate(0px, -15px);
    opacity: 0.75;
  }
}
@keyframes reverse-float {
  0% {
    -ms-transform: translate(0px, -15px);
    transform: translate(0px, -15px);
    opacity: 0.75;
  }
  25% {
    -ms-transform: translate(-15px, 0px);
    transform: translate(-15px, 0px);
    opacity: 1;
  }
  50% {
    -ms-transform: translate(-30px, 0px);
    transform: translate(-30px, 0px);
    opacity: 1;
  }
  75% {
    -ms-transform: translate(-25px, 0px);
    transform: translate(-25px, 0px);
    opacity: 1;
  }
  100% {
    -ms-transform: translate(0px, -15px);
    transform: translate(0px, -15px);
    opacity: 0.75;
  }
}

#drop1 {
  -webkit-animation: rain 1s linear infinite;
  animation: rain 1s linear infinite;
}

#drop3 {
  -webkit-animation: rain 1s linear infinite 0.5s;
  animation: rain 1s linear infinite 0.5s;
}

#drop2 {
  -webkit-animation: rain 2s linear infinite 1s;
  animation: rain 2s linear infinite 1s;
}

#drop4 {
  -webkit-animation: rain 2s linear infinite 0.8s;
  animation: rain 2s linear infinite 0.8s;
}

@-webkit-keyframes rain {
  0% {
    opacity: 1;
  }
  25% {
    -webkit-transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -webkit-transform: translateY(35px);
    opacity: 0;
  }
}
@keyframes rain {
  0% {
    opacity: 1;
  }
  25% {
    -ms-transform: translateY(5px);
    transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -ms-transform: translateY(15px);
    transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -ms-transform: translateY(25px);
    transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -ms-transform: translateY(35px);
    transform: translateY(35px);
    opacity: 0;
  }
}

#rainDrizzle {
  stroke: lightblue;
  stroke-width: 1;
  stroke-dasharray: 3;
  stroke-dashoffset: 1;
  -webkit-animation: drizzle 5s linear infinite;
  animation: drizzle 5s linear infinite;
}

@-webkit-keyframes drizzle {
  from {
    stroke-dashoffset: 40;
  }
  to {
    stroke-dashoffset: 10;
  }
}
@keyframes drizzle {
  from {
    stroke-dashoffset: 40;
  }
  to {
    stroke-dashoffset: 10;
  }
}

.lighting {
  animation-duration: 2.5s;
}

#snowFlake {
  fill: none;
  stroke: white;
  stroke-width: 0.6;
}

#snowFlake1 {
  -webkit-animation: snow 4s linear infinite;
  animation: snow 4s linear infinite;
}

#snowFlake2 {
  -webkit-animation: snow 3s linear infinite 0.8s;
  animation: snow 3s linear infinite 0.8s;
}

#snowFlake3 {
  -webkit-animation: snow 5s linear infinite 0.5s;
  animation: snow 5s linear infinite 0.5s;
}

#snowFlake4 {
  -webkit-animation: snow 6s linear infinite 1s;
  animation: snow 6s linear infinite 1s;
}

#snowFlake5 {
  -webkit-animation: snow 4s linear infinite 0.6s;
  animation: snow 4s linear infinite 0.6s;
}

@-webkit-keyframes snow {
  0% {
    -webkit-transform: translate(5px, 0px);
    opacity: 1;
  }
  25% {
    -webkit-transform: translate(0px, 10px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translate(7px, 20px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translate(0px, 30px);
    opacity: 0.75;
  }
  100% {
    -webkit-transform: translate(10px, 40px);
    opacity: 0.5;
  }
}
@keyframes snow {
  0% {
    -ms-transform: translate(5px, 0px);
    transform: translate(5px, 0px);
    opacity: 1;
  }
  25% {
    -ms-transform: translate(0px, 10px);
    transform: translate(0px, 10px);
    opacity: 1;
  }
  50% {
    -ms-transform: translate(7px, 20px);
    transform: translate(7px, 20px);
    opacity: 1;
  }
  75% {
    -ms-transform: translate(0px, 30px);
    transform: translate(0px, 30px);
    opacity: 0.75;
  }
  100% {
    -ms-transform: translate(10px, 40px);
    transform: translate(10px, 40px);
    opacity: 0.5;
  }
}

#ice1 {
  -webkit-animation: ice 1s linear infinite;
  animation: ice 1s linear infinite;
}

#ice3 {
  -webkit-animation: ice 1s linear infinite 0.5s;
  animation: ice 1s linear infinite 0.5s;
}

#ice2 {
  -webkit-animation: ice 2s linear infinite 1s;
  animation: ice 2s linear infinite 1s;
}

#ice4 {
  -webkit-animation: ice 2s linear infinite 0.8s;
  animation: ice 2s linear infinite 0.8s;
}

@-webkit-keyframes ice {
  0% {
    opacity: 1;
  }
  25% {
    -webkit-transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -webkit-transform: translateY(35px);
    opacity: 0;
  }
}
@keyframes ice {
  0% {
    opacity: 1;
  }
  25% {
    -ms-transform: translateY(5px);
    transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -ms-transform: translateY(15px);
    transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -ms-transform: translateY(25px);
    transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -ms-transform: translateY(35px);
    transform: translateY(35px);
    opacity: 0;
  }
}

#mist {
  fill: none;
  stroke: #333333;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: misty 5s linear infinite alternate;
}

@-webkit-keyframes misty {
 from {
   x: -10px;
  }
  to {
    x: 17px;
  }
}
@keyframes misty {
 from {
   x: -10px;
  }
  to {
    x: 17px;
  }
}

.stars {
  animation-duration: 3s;
}

.wind {
  fill: none;
  stroke: #333333;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

#wind1 {
  -webkit-animation: windy 2.5s linear forwards infinite 0.5s;
  animation: windy 2.5s linear forwards infinite 0.5s;
}
#wind2 {
  -webkit-animation: windy 2.8s linear forwards infinite 0.55s;
  animation: windy 2.8s linear forwards infinite 0.55s ;
}
#wind3 {
  -webkit-animation: windy 3.5s linear forwards infinite 2s;
  animation: windy 3.5s linear forwards infinite 2s;
}
#wind4 {
  -webkit-animation: windy 3.5s linear forwards infinite 0.5s;
  animation: windy 3.5s linear forwards infinite 0.5s;
}
#wind5 {
  -webkit-animation: windy 4s linear forwards infinite 0.5s;
  animation: windy 4s linear forwards infinite 0.5s;
}

@-webkit-keyframes windy {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes windy {
  to {
    stroke-dashoffset: 0;
  }
}

#tornado {
  -webkit-animation: skewX 0.85s infinite linear alternate;
  animation: skewX 0.85s infinite linear alternate;
}

@-webkit-keyframes skewX {
  0% {
    -webkit-transform: skewX(20deg);
  }
  100% {
    -webkit-transform: skewX(-20deg);
  }
}
@keyframes skewX {
  0% {
    -ms-transform: skewX(20deg);
    transform: skewX(20deg);
  }
  100% {
    -ms-transform: skewX(-20deg);
    transform: skewX(-20deg);
  }
}

/* === Animated snow for card 47 (main, hourly, 3-day) === */

.mw47-anim-icon .mw-snowflake {
  animation: mwpl-snow-fall 2.8s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

/* stagger each flake */
.mw47-anim-icon .mw-snowflake.snow1 { animation-delay: 0s; }
.mw47-anim-icon .mw-snowflake.snow2 { animation-delay: 0.3s; }
.mw47-anim-icon .mw-snowflake.snow3 { animation-delay: 0.6s; }
.mw47-anim-icon .mw-snowflake.snow4 { animation-delay: 0.9s; }
.mw47-anim-icon .mw-snowflake.snow5 { animation-delay: 1.2s; }

@keyframes mwpl-snow-fall {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.95;
  }
  50% {
    transform: translateY(6px) translateX(-2px);
    opacity: 1;
  }
  100% {
    transform: translateY(12px) translateX(2px);
    opacity: 0;
  }
}
