:root {
  --dark-bg: #050b18;
  --navy: #0a192f;
  --deep-blue: #112d4e;
  --electric-blue: #3f8efc;
  --cyan: #6fd3ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --white: #f4f8fc;
  --light-text: #b9c9dc;
  --danger: #ff5f6d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(63, 142, 252, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(111, 211, 255, 0.12), transparent 30%),
    linear-gradient(135deg, #020611, #07111f, #0a192f, #040814);
  background-size: 200% 200%;
  animation: backgroundShift 12s ease infinite;
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* WEATHER APP CONTAINER */
.weather-app {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 30px;
}

/* MAIN CARD */
.weather-card {
  width: 100%;
  max-width: 680px;
  padding: 40px;
  border-radius: 32px;
  background: rgba(8, 18, 38, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 20px rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.weather-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: translateX(-100%);
  animation: shimmerSweep 6s ease-in-out infinite;
}

/* HEADER */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.app-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--electric-blue);
  font-size: 0.75rem;
  font-weight: 700;
}

.app-header h1 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(
    90deg,
    var(--white),
    var(--cyan),
    var(--electric-blue),
    var(--white)
  );
  background-size: 250%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleShimmer 4s linear infinite;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 30px;
  background: rgba(63, 142, 252, 0.12);
  border: 1px solid rgba(63, 142, 252, 0.25);
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pill span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

/* SEARCH */
.search-box {
  display: flex;
  margin-bottom: 35px;
  position: relative;
  z-index: 2;
}

.search-box input {
  flex: 1;
  padding: 16px 20px;
  border-radius: 18px 0 0 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.45);
}

.search-box button {
  width: 65px;
  border: none;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(135deg, var(--electric-blue), var(--cyan));
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.search-box button:hover {
  transform: scale(1.03);
}

/* MAIN WEATHER */
.weather-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

.location {
  font-size: 2rem;
  font-weight: 700;
}

.date {
  color: var(--light-text);
  margin-top: 6px;
}

.weather-icon {
  font-size: 4rem;
  color: var(--cyan);
  filter: drop-shadow(0 0 15px rgba(111, 211, 255, 0.35));
  animation: pulseGlow 3s ease-in-out infinite;
}

/* TEMPERATURE */
.temperature-box {
  margin-bottom: 35px;
  position: relative;
  z-index: 2;
}

.temperature-box h2 {
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
}

.temperature-box p {
  font-size: 1.15rem;
  color: var(--light-text);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* DETAILS GRID */
.weather-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  position: relative;
  z-index: 2;
}

.detail-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-5px);
  border-color: rgba(111, 211, 255, 0.35);
}

.detail-card i {
  font-size: 1.5rem;
  color: var(--electric-blue);
}

.detail-card p {
  font-size: 0.85rem;
  color: var(--light-text);
  margin-bottom: 4px;
}

.detail-card h4 {
  font-size: 1.1rem;
  color: var(--white);
}

/* ERROR */
.error-message {
  text-align: center;
  color: var(--danger);
  margin-top: 18px;
  font-weight: 600;
  min-height: 24px;
  position: relative;
  z-index: 2;
}

/* ANIMATIONS */
@keyframes backgroundShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes titleShimmer {
  0% {
    background-position: 0%;
  }

  100% {
    background-position: 250%;
  }
}

@keyframes shimmerSweep {
  0% {
    transform: translateX(-100%);
  }

  50%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .weather-card {
    padding: 28px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .weather-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }

  .temperature-box h2 {
    font-size: 4.5rem;
  }
}