:root {
  --bg_main: #0a1f44;
  --text_light: #fff;
  --text_med: #53627c;
  --text_dark: #1e2432;
  --red: #ff1e42;
  --darkred: #c3112d;
  --orange: #ff8c00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font: 1rem/1.3 "Roboto", sans-serif;
  background: var(--bg_main);
  color: var(--text_dark);
  padding: 70px 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* HEADER / FORM */
.top-banner {
  color: var(--text_light);
}

.heading {
  font-size: 4rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 30px;
}

.top-banner form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.top-banner input {
  font-size: 1.5rem;
  padding: 12px 15px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  min-width: 240px;
}

.top-banner input::placeholder {
  color: #bbb;
}

.top-banner input:focus {
  outline: 2px solid var(--orange);
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.6);
}

.top-banner button {
  background: var(--red);
  color: #fff;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.top-banner button:hover {
  background: var(--darkred);
  transform: translateY(-2px);
}

.msg {
  text-align: center;
  color: var(--red);
  margin-top: 10px;
}

/* RESULTS GRID */
.ajax-section {
  margin: 50px 0 20px;
}

.ajax-section .cities {
  display: grid;
  gap: 32px 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* CITY CARD */
.city {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  animation: fadeInUp 0.6s ease forwards;
  transition: all 0.3s ease;
}

.city:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}


.city-name {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--text_dark);
}

/* TEMPERATURE COLORS */
.city-temp {
  font-size: 4rem;
  font-weight: bold;
  margin: 10px 0;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.city.hot .city-temp {
  background: linear-gradient(135deg, #ff5722, #ff1744);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.city.warm .city-temp {
  background: linear-gradient(135deg, #ffb74d, #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.city.cool .city-temp {
  background: linear-gradient(135deg, #2196f3, #00bcd4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.city.cold .city-temp {
  background: linear-gradient(135deg, #90caf9, #bbdefb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.city:hover .city-temp {
  transform: scale(1.1);
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.city sup {
  font-size: 0.5em;
}

/* ICON */
.city-icon {
  width: 80px;
  height: 80px;
  margin: 10px auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media screen and (max-width: 700px) {
  .heading { font-size: 3rem; }
  .top-banner form { flex-direction: column; }
  .top-banner input, .top-banner button { width: 100%; }
}
