:root {
  --primary-color: #3373a7;
  --secondary-color: #8b5cf6;
  --accent-color: #06d6a0;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.1);
}

::selection {
  background-color: var(--primary-color);
}

body {
  font-family: "Instrument Sans", sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--light-color);
  transition: background-image 1.5s ease-in-out;
}

.background-image {
  background-size: cover;
  background-position: center;
}

.navbar {
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(6, 214, 160, 0.25);
  color: white;
}

.search-container {
  max-width: 800px;
  margin: 2rem auto;
}

.search-box {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.weather-card {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border-radius: 24px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: rotate(-1deg);
}

.weather-card:hover {
  transform: rotate(0deg) translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.weather-card:nth-child(even) {
  transform: rotate(1deg);
}

.weather-card:nth-child(even):hover {
  transform: rotate(0deg) translateY(-8px);
}

.temp-display {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 1rem 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.weather-details {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.detail-item {
  text-align: center;
  flex: 1;
}

.detail-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.detail-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.day-label {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.city-name {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.date-display {
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.search-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(51, 115, 167, 0.4);
}

.footer {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding: 3rem 0 1.5rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  margin: 0 0.5rem;
  transition: all 0.3s;
}

.social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.subscribe-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(51, 115, 167, 0.4);
}

@media (max-width: 768px) {
  .weather-card {
    transform: none;
  }

  .weather-card:hover {
    transform: translateY(-5px);
  }

  .temp-display {
    font-size: 2.8rem;
  }

  .city-name {
    font-size: 1.8rem;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}
