@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-width: 100vw;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  font-family: 'Poppins', Arial, sans-serif;
  background: linear-gradient(130deg, #0f2027 0%, #2c5364 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.background-circles {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
}

.circle1 {
  width: 600px; height: 600px; left: -200px; top: -200px;
  background: radial-gradient(circle, #31d2f2 0%, #1e3c72 100%);
}

.circle2 {
  width: 400px; height: 400px; right: -150px; bottom: -150px;
  background: radial-gradient(circle, #f7971e 0%, #ffd200 100%);
}

.container {
  z-index: 1;
  width: 98vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.glass-card {
  background: rgba(44, 83, 100, 0.55);
  border: 2.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(24px) saturate(160%);
  border-radius: 24px;
  box-shadow: 0 8px 32px 4px rgba(16, 28, 54, 0.37);
  padding: 2em 2em 1em 2em;
  margin: 1em 0;
  width: 90vw;
  max-width: 720px; /* wider max width */
  color: #fff;
  text-align: center;
  position: relative;
  transition: box-shadow 0.4s;
}

.glass-card:hover {
  box-shadow: 0 12px 36px 8px #31d2f222, 0 2px 8px 0 #0004;
}

h1 {
  margin-top: 0;
  font-weight: 700;
  font-size: 2em;
  letter-spacing: 2px;
  color: #31d2f2;
  text-shadow: 0 2px 12px #0004;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em 1em;
  margin-bottom: 1.5em;
  justify-content: center;
  align-items: center;
}

input[type="text"] {
  flex: 1 1 250px;
  min-width: 140px;
  padding: 0.6em 1em;
  font-size: 1em;
  border-radius: 8px;
  border: none;
  background: rgba(26,36,50,0.62);
  color: #eee;
  outline: none;
  border-bottom: 2px solid #31d2f2;
  box-sizing: border-box;
  max-width: 350px;
}

input[type="date"] {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 0.6em 0.8em;
  font-size: 1em;
  border-radius: 8px;
  border: none;
  background: rgba(26,36,50,0.62);
  color: #eee;
  outline: none;
  border-bottom: 2px solid #31d2f2;
  box-sizing: border-box;
  max-width: 180px;
}

button {
  flex: 0 0 auto;
  background: #31d2f2;
  border: none;
  color: #232334;
  padding: 0.6em 1.4em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  box-shadow: 0 2px 8px #31d2f266;
  transition: background 0.2s, color 0.2s;
  min-width: 120px;
  max-height: 44px;
  align-self: stretch;
  margin-left: 0.5em;
}

button:hover {
  background: #1e3c72;
  color: #ffd200;
}

.card {
  background: rgba(36,36,56,0.65);
  border-radius: 20px;
  box-shadow: 0 6px 40px #31d2f224;
  margin: 1em auto 0 auto;
  padding: 2em 1.5em 1.5em 1.5em;
  border: 1.5px solid rgba(49,210,242,0.15);
  max-width: 720px;
  color: #fff;
  position: relative;
  word-wrap: break-word;
  text-align: center;
}

.card.clear { background: rgba(49,210,242,0.12); }
.card.rain { background: rgba(30,60,114,0.18); }
.card.clouds { background: rgba(255,255,255,0.10); color: #ececec; }
.card.snow { background: rgba(229,245,255,0.17); color: #222; }

.info {
  margin-top: 1em;
  font-size: 1.5em;
}

.temp {
  font-size: 3em;
  font-weight: 700;
  color: #ffd200;
  text-shadow: 0 4px 16px #fff6a650;
  display: block;
}

.details {
  display: block;
  margin-top: 0.6em;
  font-size: 1.1em;
  color: #60e6ff;
}

.error {
  background: #800014cc;
  color: #fff;
  border-radius: 8px;
  margin: 1em 0;
  padding: 0.9em 1em;
  font-weight: bold;
  border-left: 4px solid #ffd200;
  letter-spacing: 1px;
}

.footer {
  margin-top: 2em;
  font-size: 1em;
  opacity: 0.6;
  color: #fff;
}

a { color: #ffd200; text-decoration: none; }
a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  form {
    flex-direction: column;
    gap: 0.8em 0;
  }
  input[type="text"],
  input[type="date"],
  button {
    flex: none;
    width: 100%;
    max-width: unset;
    margin-left: 0;
  }
}
