* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  background: #f4f0e8;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Sky background */
body {
  background: linear-gradient(to bottom, #3a7bb8, #87ceeb);
}

/* Location input */
.location-ui {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  opacity: 0.85;
  transition: opacity 0.3s;
  z-index: 100;
}

.location-ui:hover,
.location-ui:focus-within {
  opacity: 1;
}

.location-input {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 20px;
  padding: 12px 18px;
  font-size: 14px;
  font-family: monospace;
  color: white;
  outline: none;
  width: 200px;
  backdrop-filter: blur(15px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.location-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.location-input:focus {
  background: rgba(0, 0, 0, 0.4);
}

.location-search {
  position: relative;
}

.location-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  list-style: none;
  overflow: hidden;
  display: none;
}

.location-suggestions.active {
  display: block;
}

.location-suggestions li {
  padding: 10px 16px;
  color: white;
  font-size: 13px;
  font-family: monospace;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.location-suggestions li:last-child {
  border-bottom: none;
}

.location-suggestions li:hover {
  background: rgba(255, 255, 255, 0.15);
}

.location-suggestions .suggestion-country {
  opacity: 0.5;
  font-size: 11px;
  margin-left: 6px;
}

.location-btn {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: white;
  font-size: 18px;
  backdrop-filter: blur(15px);
  transition: background 0.2s;
}

.location-btn:hover {
  background: rgba(0, 0, 0, 0.45);
}

.weather-info {
  position: fixed;
  top: 20px;
  right: 20px;
  font-family: monospace;
  font-size: 13px;
  color: white;
  text-align: right;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-time {
  font-size: 14px;
  font-weight: bold;
}

.weather-forecast {
  font-size: 11px;
  opacity: 0.75;
  font-style: italic;
}

/* Favorite button */
.favorite-btn {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: white;
  font-size: 20px;
  backdrop-filter: blur(15px);
  transition: background 0.2s, transform 0.15s, color 0.2s;
}

.favorite-btn:hover {
  background: rgba(0, 0, 0, 0.45);
}

.favorite-btn:active {
  transform: scale(0.92);
}

.favorite-btn.active {
  color: #fbbf24;
}

.favorite-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Favorites bar */
.favorites-bar {
  position: fixed;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 8px;
  z-index: 100;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.favorites-bar.active {
  display: flex;
}

.favorites-bar:hover {
  opacity: 1;
}

.favorite-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  border-radius: 16px;
  padding: 8px 10px 8px 14px;
  font-size: 12px;
  font-family: monospace;
  color: white;
  backdrop-filter: blur(15px);
  transition: background 0.2s;
  white-space: nowrap;
}

.favorite-item:hover {
  background: rgba(0, 0, 0, 0.5);
}

.favorite-name {
  cursor: pointer;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorite-remove {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.favorite-remove:hover {
  background: rgba(255, 100, 100, 0.5);
  color: white;
}
