* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  color: #1e293b;
}

button,
input {
  font: inherit;
}

.app {
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.title {
  margin: 0 0 8px;
  font-size: 32px;
}

.subtitle {
  margin: 0;
  color: #475569;
}

.main {
  display: grid;
  gap: 20px;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 22px;
}

.search-panel .section-title,
.saved-cities .section-title,
.current-weather .section-title {
  margin-bottom: 0;
}

.refresh-btn,
.primary-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.refresh-btn {
  background: #2563eb;
  color: white;
}

.primary-btn {
  background: #0f172a;
  color: white;
}

.refresh-btn:hover,
.primary-btn:hover {
  opacity: 0.9;
}

.city-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-label {
  font-weight: 700;
}

.input-wrap {
  display: flex;
  gap: 12px;
}

.city-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  background: white;
}

.suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-error {
  margin: 0;
  min-height: 20px;
  color: #dc2626;
  font-size: 14px;
}

.status,
.cities-note {
  color: #475569;
  font-size: 14px;
}

.weather-card,
.city-card {
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.weather-location {
  margin: 0 0 8px;
  font-size: 20px;
}

.weather-description {
  margin: 0 0 16px;
  color: #475569;
}

.forecast-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.forecast-day {
  background: white;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.placeholder {
  color: #64748b;
}

.cities-list {
  display: grid;
  gap: 12px;
}

.empty-card {
  text-align: center;
  color: #64748b;
}

@media (max-width: 768px) {
  .header,
  .section-head,
  .input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .forecast-list {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: 26px;
  }
}

.forecast-label {
  margin: 0 0 8px;
  font-weight: 700;
  color: #0f172a;
}

.forecast-temp {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
}

.forecast-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.city-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.city-name {
  margin: 0;
  font-size: 20px;
}

.remove-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: #e2e8f0;
  color: #0f172a;
  cursor: pointer;
  transition: 0.2s ease;
}

.remove-btn:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .city-card__head {
    flex-direction: column;
    align-items: stretch;
  }
}

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

.suggestion-btn {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.suggestion-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.refresh-btn:disabled,
.primary-btn:disabled,
.remove-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.forecast-date {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 13px;
}

.city-source {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.empty-card__hint {
  margin: 8px 0 0;
  font-size: 14px;
  color: #94a3b8;
}

.weather-card__top {
  margin-bottom: 16px;
}

.forecast-day {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}