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

:root {
  --bg: #080f10;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.16);
  --text: #e7ffff;
  --muted: #9fb5b7;
  --cyan: #00f2ff;
  --purple: #b600f8;
  --danger: #ffb4ab;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  transition: background 0.6s ease;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 242, 255, 0.14), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(182, 0, 248, 0.15), transparent 32%),
    linear-gradient(135deg, #070b10, #111827 55%, #080f10);
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand h1 {
  color: var(--cyan);
  letter-spacing: 5px;
  font-size: 24px;
  text-shadow: 0 0 14px rgba(0, 242, 255, 0.7);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cyan);
  background: var(--surface);
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 2px;
  text-decoration: none;
}

.app-layout {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 24px;
}

.sidebar, .forecast-panel, .hero-card, .panel {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(22px);
  box-shadow: 0 0 28px rgba(0, 242, 255, 0.08);
}

.sidebar {
  border-radius: 28px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  border-radius: 22px;
  padding: 18px;
}

.label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  margin-bottom: 14px;
}

.cyan {
  color: var(--cyan);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 8px 10px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 4px;
}

.search-box button {
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--cyan);
}

.message {
  min-height: 22px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 14px;
}

.saved-panel {
  display: grid;
  gap: 12px;
}

.city-card {
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 14px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.city-card.active {
  border-color: rgba(0,242,255,.55);
  box-shadow: 0 0 18px rgba(0,242,255,.15);
}

.city-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.hero-card {
  min-height: 620px;
  border-radius: 34px;
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 330px;
  height: 330px;
  background: radial-gradient(circle, rgba(0,242,255,.28), transparent 65%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.hero-content h2 {
  font-size: clamp(44px, 8vw, 92px);
  line-height: 1;
  color: #ecfeff;
  text-shadow: 0 0 20px rgba(0, 242, 255, .55);
}

.description, .muted {
  color: var(--muted);
}

.weather-icon {
  font-size: clamp(70px, 10vw, 128px);
  filter: drop-shadow(0 0 18px rgba(0,242,255,.45));
  animation: floatIcon 3s ease-in-out infinite;
}

.hidden{
  display: none;
}

.loading{
  margin-top: 12px;
   color: #00ffff;
  font-weight: 700;
  animation: pulse 0.8s infinite alternate;
}

.temperature-row {
  display: flex;
  align-items: end;
  gap: 34px;
  margin: 42px 0;
}

.temperature {
  font-size: clamp(72px, 12vw, 150px);
  font-weight: 800;
  line-height: .85;
}

.big-value {
  font-size: 34px;
  font-weight: 700;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-card {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  border-radius: 22px;
  padding: 20px;
}

.metric-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric-card strong {
  font-size: 24px;
}

.forecast-panel {
  border-radius: 28px;
  padding: 24px;
}

.forecast-list {
  display: grid;
  gap: 14px;
}

.forecast-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 14px 0;
}

.loading {
  opacity: .72;
}

.sunny {
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.12), transparent 32%),
    linear-gradient(135deg, #070b10, #1f2937, #78350f);
}

.rainy {
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.18), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(30, 64, 175, 0.24), transparent 32%),
    linear-gradient(135deg, #020617, #111827, #1e3a8a);
}

.cloudy {
  background:
    radial-gradient(circle at 20% 20%, rgba(148, 163, 184, 0.18), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.08), transparent 32%),
    linear-gradient(135deg, #070b10, #111827, #374151);
}

.snowy {
  background:
    radial-gradient(circle at 20% 20%, rgba(103, 232, 249, 0.20), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(186, 230, 253, 0.14), transparent 32%),
    linear-gradient(135deg, #020617, #0f172a, #164e63);
}

.stormy {
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.24), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.08), transparent 32%),
    linear-gradient(135deg, #020617, #111827, #4c1d95);
}

@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
  }

  .hero-card {
    order: 2;
    min-height: auto;
  }

  .forecast-panel {
    order: 3;
  }

  .saved-panel {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 14px 16px;
  }

  nav {
    display: none;
  }

  .brand h1 {
    font-size: 18px;
    letter-spacing: 3px;
  }

  .app-layout {
    padding: 14px;
    gap: 14px;
  }

  .hero-card, .sidebar, .forecast-panel {
    border-radius: 22px;
    padding: 16px;
  }

  .hero-content, .temperature-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .metrics-grid, .saved-panel {
    grid-template-columns: 1fr;
  }
}

@keyframes pulse {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 1;
  }
}

@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0);
  }
}

.location-btn {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(0, 242, 255, 0.35);
  border-radius: 14px;
  padding: 12px;
  color: var(--cyan);
  background: rgba(0, 242, 255, 0.08);
  transition: 0.3s ease;
}

.location-btn:hover {
  background: rgba(0, 242, 255, 0.16);
  box-shadow: 0 0 18px rgba(0, 242, 255, 0.18);
}

.metric-card,
.city-card,
.forecast-row {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover,
.city-card:hover,
.forecast-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.16);
}

.hero-card {
  animation: fadeUp 0.8s ease both;
}

.sidebar {
  animation: fadeUp 0.8s ease both;
}

.forecast-panel {
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.local-time {
  margin-top: 12px;
  color: var(--cyan);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}


.weather-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.topbar,
.app-layout {
  position: relative;
  z-index: 1;
}

.particle {
  position: absolute;
  top: -20px;
  opacity: 0.7;
  animation: fall linear infinite;
}


.particle.rain{
  width: 2px;
  height: 22px;
  background: rgba(0, 242, 255, 0.55);
  border-radius: 999px;
}

.particle.snow{
  width: 8px;
  height: 8px;
  background: rgba(231, 255, 255, 0.8);
  border-radius: 50%;
}

.particle.star {
  width: 3px;
  height: 3px;
  background: rgba(0, 242, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.9);
}

@keyframes fall {
  from {
    transform: translateY(-40px);
  }

  to {
    transform: translateY(110vh);
  }
}

.footer {
  margin-top: 40px;
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(12px);
}

.footer p {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 8px;
}

.footer span {
  color: var(--cyan);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0,242,255,.45);
}

.footer small {
  color: var(--muted);
  letter-spacing: 1px;
}