:root {
  --bg: #0b1220;
  --panel: #131c2e;
  --panel-2: #19253b;
  --text: #e5eefc;
  --muted: #9fb0cf;
  --accent: #4da3ff;
  --danger: #ff6b6b;
  --border: #263552;
  --success: #3ecf8e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #08101c 0%, #0b1220 100%);
  color: var(--text);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  padding: 2rem 0 1rem;
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
}

.subtitle {
  color: var(--muted);
  margin-top: 0.5rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin: 1rem 0;
}

.search-form,
.save-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1;
  min-width: 240px;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
}

button {
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.forecast-card,
.favourite-item {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.favourites-list {
  display: grid;
  gap: 0.75rem;
}

.favourite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffd6d6;
}

@media (max-width: 640px) {
  .favourite-item {
    flex-direction: column;
    align-items: flex-start;
  }

  button {
    width: 100%;
  }
}
