/* ── Reset & Base ─────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  padding: 16px; /* prevents overflow on small screens */
}

/* ── Main Card ────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 40px 36px;
  width: 380px;
  max-width: 100%; /* responsive */
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.app-title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 24px;
  color: #e0e0ff;
}

/* ── Search Bar ───────────────────────────────── */
.search-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  gap: 10px;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.search-bar button {
  padding: 12px 18px;
  background: #4f8ef7;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ── Weather Card ─────────────────────────────── */
.weather-card {
  margin-top: 10px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.temp {
  font-size: 2.4rem;
  font-weight: 700;
}

.details {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Suggestion Dropdown ──────────────────────── */
.suggestion-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1e2a45;
  border-radius: 12px;
  overflow: hidden;
  z-index: 100;
}

.suggestion-item {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ── Utility ──────────────────────────────────── */
.hidden {
  display: none;
}

/* ── Responsive Design ────────────────────────── */

/* Tablets */
@media (max-width: 768px) {
  .card {
    padding: 30px 24px;
  }

  .app-title {
    font-size: 1.4rem;
  }

  .temp {
    font-size: 2rem;
  }

  .details {
    gap: 16px;
  }
}

/* Mobile Devices */
@media (max-width: 480px) {
  .card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .app-title {
    font-size: 1.2rem;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar button {
    width: 100%;
  }

  .weather-card img {
    width: 60px;
    height: 60px;
  }

  .temp {
    font-size: 1.8rem;
  }

  .details {
    flex-direction: column;
    gap: 8px;
  }
}

/* Very Small Screens */
@media (max-width: 320px) {
  .card {
    padding: 18px 12px;
  }

  .app-title {
    font-size: 1rem;
  }

  .search-bar input {
    font-size: 0.85rem;
  }

  .temp {
    font-size: 1.5rem;
  }
}