:root {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --accent: #38bdf8;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 640px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--accent);
}

.search-form {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 260px;
  justify-content: flex-end;
}

.search-form input {
  flex: 1;
  max-width: 220px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: var(--card-bg);
  color: var(--text);
}

.search-form button {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
}

.search-form button:hover {
  opacity: 0.9;
}

#locate-btn {
  background: var(--card-bg);
  color: var(--text);
}

.unit-toggle {
  display: flex;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.unit-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.unit-btn.active {
  background: var(--accent);
  color: #0f172a;
}

.status {
  min-height: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.status.error {
  color: #f87171;
}

.hidden {
  display: none !important;
}

.current-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.current-card h2 {
  margin: 0 0 0.5rem;
  font-weight: 500;
  color: var(--text-muted);
}

.current-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.current-temp {
  font-size: 3rem;
  font-weight: 700;
}

.description {
  text-transform: capitalize;
  color: var(--text-muted);
  margin: 0.25rem 0 1rem;
}

.current-details {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.forecast-section {
  margin-bottom: 1.5rem;
}

.forecast-section h3 {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
}

.hourly-list {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.hourly-item {
  flex: 0 0 auto;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-align: center;
  min-width: 70px;
}

.hourly-item img {
  width: 36px;
  height: 36px;
}

.hourly-item .time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.daily-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.daily-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0.6rem 1rem;
}

.daily-item .day {
  flex: 1;
  color: var(--text-muted);
}

.daily-item img {
  width: 32px;
  height: 32px;
}

.daily-item .temps {
  min-width: 90px;
  text-align: right;
}

.daily-item .temps .max {
  font-weight: 600;
}

.daily-item .temps .min {
  color: var(--text-muted);
}
