* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

h1 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: #e0e0ff;
}

h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.8rem;
  color: #e0e0ff;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
}

.card {
  background: #16213e;
  border-radius: 12px;
  padding: 1rem 0.6rem;
  text-align: center;
}

.card .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.3rem;
}

.card .value {
  font-size: 1.6rem;
  font-weight: 700;
}

.card .unit {
  font-size: 0.7rem;
  color: #888;
}

.current .value { color: #4fc3f7; }
.forecast .value { color: #81c784; }
.trend .value { font-size: 1.3rem; }

.range-buttons {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.range-buttons button {
  flex: 1;
  padding: 0.45rem 0;
  background: #16213e;
  color: #aaa;
  border: 1px solid #333;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.range-buttons button:hover {
  background: #1a3a5c;
  color: #eee;
}

.range-buttons button.active {
  background: #0f3460;
  color: #4fc3f7;
  border-color: #4fc3f7;
}

canvas { width: 100% !important; }

/* Location picker */
#location-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.location-edit-icon {
  cursor: pointer;
  font-size: 0.9rem;
  color: #888;
  transition: color 0.15s;
}

.location-edit-icon:hover {
  color: #4fc3f7;
}

.location-search {
  position: relative;
  max-width: 350px;
  margin: 0 auto 1rem;
}

.location-search.hidden {
  display: none;
}

#location-input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: #16213e;
  border: 1px solid #333;
  border-radius: 20px;
  color: #eee;
  font-size: 0.9rem;
  outline: none;
}

#location-input:focus {
  border-color: #4fc3f7;
}

#location-results {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #16213e;
  border: 1px solid #333;
  border-radius: 8px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

#location-results:empty {
  display: none;
}

#location-results li {
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid #222;
}

#location-results li:hover {
  background: #0f3460;
}

#location-results li small {
  color: #888;
  margin-left: 0.3rem;
}
