@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 5px;
  height: 9px;
 
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
}
:root {
  --primary-color: #5598fd;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-light: #f0f0f0;
  --text-dark: #333;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #1a1919;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  transition: background-image 1s ease-in-out;
}

.wrapper {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  border-radius: 5px;
  overflow: hidden;
  flex-wrap: wrap;
}

.sidebar {
  flex: 1;
  min-width: 280px;
  background: #1a1919;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 5px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.search {
  display: flex;
  margin-bottom: 20px;
  position: relative;
}

.search input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  background-color: #fff;
  color: #333;
}

.search input:focus {
  outline: none;
  border: 2px solid var(--primary-color);
}

.search button {
  padding: 10px 15px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}

/* Autocomplete dropdown */
.search ul#suggestions {
  position: absolute;
  top: 105%;
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 99;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #333;
}

.search ul#suggestions li {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
}

.search ul#suggestions li:last-child {
  border-bottom: none;
}

.search ul#suggestions li:hover,
.search ul#suggestions li.active {
  background-color: #e6f0ff;
  color: var(--primary-color);
}

.weather-icon img {
  width: 80%;
  margin: 20px auto;
  display: block;
}

.temperature h1 {
  font-size: 48px;
  font-weight: 600;
}

.date-time {
  font-size: 14px;
  opacity: 0.8;
}

.divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 20px 0;
}

.condition-rain {
  font-size: 14px;
  margin-bottom: 10px;
}

.location {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.main {
  flex: 2;
  background: #1a1919;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 5px;
  padding: 20px;
  box-shadow: var(--shadow);
}

nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

nav button {
  padding: 8px 14px;
  border-radius: 5px;
  border: none;
  background: #fff;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

nav button.active,
nav button:hover {
  background: var(--primary-color);
  color: #fff;
}

.cards,
.highlights .cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card,
.card2 {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  padding: 15px;
  width: 120px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.card:hover,
.card2:hover {
  transform: translateY(-5px);
}

.card h2,
.card2 h4 {
  font-size: 14px;
  font-weight: 600;
}

.card .day-temp {
  font-size: 12px;
  margin-top: 8px;
}

.card .day-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 10px auto;
}

.card2 .content p:first-child {
  font-size: 20px;
  font-weight: bold;
}

.card2 .content p:nth-child(2) {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 5px;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .wrapper {
    flex-direction: column;
  }

  .sidebar, .main {
    width: 100%;
  }

  .card, .card2 {
    width: 100%;
    max-width: 48%;
  }
}

@media (max-width: 576px) {
  nav {
    flex-direction: column;
    gap: 10px;
  }

  .card, .card2 {
    max-width: 100%;
  }

  .temperature h1 {
    font-size: 36px;
  }

  .sidebar h1 {
    font-size: 20px;
  }

  .card .day-icon {
    width: 30px;
    height: 30px;
  }
}
