:root {
  --page-bg: #eef8f4;
  --page-accent: #ffd4c2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --text: #18201d;
  --muted: #64716c;
  --accent: #0b7f73;
  --accent-strong: #075f55;
  --danger: #b3261e;
  --success: #1f7a42;
  --border: rgba(24, 32, 29, 0.14);
  --shadow: 0 24px 70px rgba(24, 32, 29, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 212, 194, 0.7), rgba(238, 248, 244, 0.4) 38%, rgba(198, 236, 226, 0.72)),
    var(--page-bg);
  transition: background 350ms ease;
}

body.theme-clear {
  --page-bg: #fff4d6;
  --page-accent: #f6b255;
  --accent: #b55d16;
  --accent-strong: #86410d;
}

body.theme-clouds {
  --page-bg: #edf2ef;
  --page-accent: #c9d4ce;
  --accent: #587266;
  --accent-strong: #385248;
}

body.theme-rain,
body.theme-storm {
  --page-bg: #e7f0ed;
  --page-accent: #9fc6bf;
  --accent: #136d74;
  --accent-strong: #0d4f55;
}

body.theme-snow {
  --page-bg: #f6fbfa;
  --page-accent: #c7e6e2;
  --accent: #3f7f87;
  --accent-strong: #2a5e66;
}

body.theme-mist {
  --page-bg: #f1f3ed;
  --page-accent: #d6d2c2;
  --accent: #6f7654;
  --accent-strong: #4f5539;
}

button,
input {
  font: inherit;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(24, 32, 29, 0.16);
  background: var(--accent-strong);
}

button:disabled,
input:disabled {
  cursor: wait;
  opacity: 0.65;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.app-header {
  max-width: 620px;
  margin-bottom: 24px;
}

.app-header h1 {
  margin: 4px 0 10px;
  font-size: 2.75rem;
  line-height: 1.05;
}

.app-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-strong);
  outline: none;
}

.search-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 127, 115, 0.18);
}

.search-panel button {
  padding: 0 18px;
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--accent-strong);
}

.secondary-button:hover:not(:disabled) {
  color: #ffffff;
}

.status-message {
  min-height: 24px;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 700;
}

.status-message[data-type="error"] {
  color: var(--danger);
}

.status-message[data-type="success"] {
  color: var(--success);
}

.status-message[data-type="loading"] {
  color: var(--accent-strong);
}

.loader {
  display: none;
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border: 5px solid rgba(24, 32, 29, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.weather-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.weather-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.weather-summary img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.weather-summary h2 {
  margin: 0 0 6px;
  font-size: 2rem;
  line-height: 1.15;
}

.weather-summary p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.temperature-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 24px 0;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.temperature {
  margin: 0;
  font-size: 4rem;
  font-weight: 800;
  line-height: 0.95;
}

.temperature-row p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.detail-grid div {
  min-height: 82px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.detail-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-grid strong {
  font-size: 1.2rem;
}

.forecast-section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

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

.forecast-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(24, 32, 29, 0.1);
}

.forecast-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.forecast-card img {
  width: 62px;
  height: 62px;
  margin: 10px 0;
}

.forecast-card strong {
  font-size: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 24px, 560px);
    padding: 28px 0;
  }

  .app-header h1 {
    font-size: 2.15rem;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .search-panel button {
    width: 100%;
  }

  .weather-summary {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .weather-summary img {
    width: 72px;
    height: 72px;
  }

  .weather-summary h2 {
    font-size: 1.45rem;
  }

  .temperature-row {
    display: block;
  }

  .temperature {
    margin-bottom: 8px;
    font-size: 3rem;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 6px;
  }

  .forecast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .weather-panel {
    padding: 18px;
  }

  .weather-summary {
    grid-template-columns: 1fr;
  }

  .detail-grid,
 .forecast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.visitor-box {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.visitor-box img {
  border-radius: 6px;
  opacity: 0.8;
}

.visitor-box img:hover {
  opacity: 1;
  transition: 0.3s;
}

footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 13px;
  color: #666;
  border-top: 1px solid #eee;
  opacity: 0.8;
}
footer:hover {
  opacity: 1;
  transition: 0.3s;
}
