* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.8s ease;
  background: linear-gradient(135deg, #cfd9df, #e2ebf0);
}


/* ===== ФОН ПОГОДЫ ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  transition: background 0.8s ease;
}

body.sunny::before {
  background: linear-gradient(135deg, #fde047, #fb923c);
}

body.cloudy::before {
  background: linear-gradient(135deg, #cbd5e1, #64748b);
}

body.rainy::before {
  background: linear-gradient(135deg, #38bdf8, #1e3a8a);
}

body.snowy::before {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
}

body.storm::before {
  background: linear-gradient(135deg, #020617, #1e293b);
}

/* ===== СМЕНА ЯЗЫКА ===== */

.lang-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.lang-switch button {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.7rem;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  opacity: 0.6;
  transition: .25s;
}

.lang-switch button.active {
  background: rgba(255,255,255,0.9);
  opacity: 1;
  font-weight: 700;
}



/* ===== КАРТОЧКА ===== */
.app {
  width: 360px;
  min-height: 540px;

  display: flex;
  flex-direction: column;

  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(28px);
  border-radius: 34px;
  padding: 26px 22px 18px;

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);

  position: relative;
  overflow: hidden;
}

/* iOS glass glare */
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0.45),
      rgba(255, 255, 255, 0.08) 45%,
      rgba(255, 255, 255, 0.02));
  opacity: 0.6;
  pointer-events: none;
}


/* ===== ТЕКСТ ===== */
h1 {
  font-size: 1.7rem;
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.clock {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 14px;
}


/* ===== ПОИСК ===== */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 16px;
  border: none;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.75);
  color: #020617;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all .25s ease;
}

input:focus {
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.08),
    0 10px 25px rgba(0, 0, 0, 0.25);
}

button {
  padding: 12px 16px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: #020617;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.25);
  transition: all .25s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 14px 35px rgba(0, 0, 0, 0.35);
}

button:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.25);
}

#geoBtn {
  width: 100%;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff, #dbeafe);
}

.icon-svg {
  width: 140px;
  height: 140px;
  margin: -16px auto -8px;
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.icon-svg.clear {
  background-image: url("https://raw.githubusercontent.com/basmilius/weather-icons/dev/production/fill/svg/clear-day.svg");
}

.icon-svg.clouds {
  background-image: url("https://raw.githubusercontent.com/basmilius/weather-icons/dev/production/fill/svg/cloudy.svg");
}

.icon-svg.rain,
.icon-svg.drizzle {
  background-image: url("https://raw.githubusercontent.com/basmilius/weather-icons/dev/production/fill/svg/rain.svg");
}

.icon-svg.snow {
  background-image: url("https://raw.githubusercontent.com/basmilius/weather-icons/dev/production/fill/svg/snow.svg");
}

.icon-svg.thunderstorm {
  background-image: url("https://raw.githubusercontent.com/basmilius/weather-icons/dev/production/fill/svg/thunderstorms.svg");
}


/* ===== РЕЗУЛЬТАТ ===== */
.result {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  flex: 1;
  padding: 22px 18px;
  text-align: center;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.weather {
  text-align: center;
}

.temp {
  font-size: 4.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-top: 6px;
  background: linear-gradient(180deg, #0f172a, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.icon {
  width: 150px;
  margin: -18px auto -8px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}


.city {
  font-size: 1.45rem;
  font-weight: 700;
}

.desc {
  opacity: 0.65;
  margin-bottom: 16px;
  text-transform: capitalize;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  color: black;
}

.meta div {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 12px 10px;
  font-size: 0.85rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.25);
}

.meta span {
  display: block;
  font-weight: 700;
  margin-top: 4px;
}


.footer {
  margin-top: 20px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);

  text-align: center;
  font-size: 0.75rem;
  color: #0f172a;
  opacity: 0.7;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}


.footer .socials {
  display: flex;
  gap: 16px;
}

.footer .socials a {
  color: #0f172a;
  text-decoration: none;
  opacity: 0.7;
  transition: all 0.25s ease;
}

.footer .socials a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.fade-in {
  animation: fade .45s cubic-bezier(.2, .8, .2, 1);
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* subtle float */
.result {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

body.night {
  background: linear-gradient(135deg, #020617, #1e293b);
}

body.night .app {
  background: rgba(15, 23, 42, 0.45);
  color: #e5e7eb;
}

body.night .temp {
  background: linear-gradient(180deg, #e5e7eb, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.forecast {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.day {
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);

  padding: 10px 6px;
  text-align: center;
  /* color: white; */
}

.day-name {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.day img {
  width: 36px;
}

.day-temp {
  font-weight: 700;
  margin-top: 4px;
}