:root {
  --bg: #f3f7ff;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --text: #132338;
  --muted: #5f7288;
  --accent: #0059d6;
  --accent-soft: #e6f0ff;
  --danger: #c52a2a;
  --border: #d7e1ef;
  --shadow: 0 18px 46px rgba(17, 36, 62, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Exo 2", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 5% -10%, rgba(0, 117, 255, 0.24), transparent 52%),
    radial-gradient(1200px 700px at 100% 0%, rgba(0, 192, 212, 0.16), transparent 48%),
    var(--bg);
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.45;
}

.bg-shape-1 {
  width: 320px;
  height: 320px;
  background: #6db6ff;
  top: 8%;
  left: 7%;
}

.bg-shape-2 {
  width: 280px;
  height: 280px;
  background: #65d1de;
  bottom: 8%;
  right: 6%;
}

.app {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 18px 36px;
}

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

.app-kicker {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 12px;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 4vw, 36px);
}

h2 {
  font-size: clamp(21px, 3vw, 30px);
}

h3 {
  font-size: 18px;
}

.button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-refresh {
  background: #0d1f37;
  color: #fff;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(13, 31, 55, 0.25);
}

.button-primary {
  margin-top: 10px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  gap: 16px;
}

.panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(215, 225, 239, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.panel-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.panel-main {
  padding: 20px;
  min-height: 470px;
}

.panel-block {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--muted);
}

.input-wrap {
  position: relative;
}

.input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
}

.input:focus {
  outline: 2px solid rgba(0, 89, 214, 0.28);
  outline-offset: 1px;
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 36, 62, 0.16);
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
}

.suggestion-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #edf2fb;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f2f8ff;
}

.suggestion-item.is-info {
  color: var(--muted);
  cursor: default;
}

.field-error {
  color: var(--danger);
  margin-top: 8px;
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.list-title {
  margin-bottom: 10px;
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 48px;
}

.location-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.location-main {
  text-align: left;
  border: none;
  background: transparent;
  font-family: inherit;
  width: 100%;
  cursor: pointer;
}

.location-main strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.location-main span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.location-item.is-active {
  border-color: #79aef8;
  background: var(--accent-soft);
}

.location-remove {
  border: none;
  border-radius: 8px;
  background: #ffe6e6;
  color: #8d1f1f;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-weight: 700;
}

.panel-main-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.global-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.forecast-state {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
}

.forecast-state.is-error {
  color: var(--danger);
  background: #ffefef;
  border-color: #ffcccc;
}

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

.forecast-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.forecast-card .day-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.forecast-card .day-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.weather-desc {
  font-size: 15px;
  margin-bottom: 10px;
}

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

.details {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .panel-main {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 18px 12px 24px;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .button-refresh {
    width: 100%;
  }

  .panel-main-header {
    flex-direction: column;
    gap: 6px;
  }

  .global-status {
    text-align: left;
  }

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