/* General layout */
body {
  font-family: Helvetica, Arial, sans-serif;
  background-color: #d9ecff; /* soft blue */
  color: #222;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 960px;
  margin: 2em auto;
  padding: 1.5em;
}

/* Header */
h1 {
  text-align: center;
  color: #004a8f;
  margin-bottom: 1.5em;
}

/* Form */
.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  margin-bottom: 2em;
}

.search-form input[type="text"] {
  width: 250px;
  padding: 0.6em;
  font-size: 1em;
  border: 1px solid #bbb;
  border-radius: 4px;
}

.search-form button {
  padding: 0.6em 1.2em;
  background-color: #004a8f;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}

.search-form button:hover {
  background-color: #006cd8;
}

/* Error message */
p.error {
  text-align: center;
  color: #b00;
  font-weight: bold;
}

/* Two-column layout */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
}

/* Card styling */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 1.5em;
}

.card h2, .card h3 {
  margin-top: 0;
  color: #003366;
}

/* Current weather */
.current-weather ul {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  line-height: 1.6em;
}

.current-weather li span {
  font-weight: bold;
  color: #004a8f;
}

.rain-alert {
  background-color: #eef6ff;
  border-left: 4px solid #004a8f;
  padding: 0.6em 1em;
  margin-top: 1em;
  border-radius: 4px;
}

/* Rain probability table */
.rain-prob table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.rain-prob th, .rain-prob td {
  padding: 0.5em;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

.rain-prob th {
  background-color: #f0f6ff;
  color: #004a8f;
  font-weight: bold;
}

.rain-prob tr:nth-child(even) {
  background-color: #f9fbff;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .search-form {
    flex-direction: column;
    gap: 0.5em;
  }

  .search-form input {
    width: 100%;
  }
}
