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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #1a3a5c 0%, #0f1f3d 40%, #0a1628 100%);
  color: #fff;
  min-height: 100vh;
  padding: 1.5rem 1rem;
  position: relative;
  overflow-x: hidden;
}

.sun-flare {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
  display: none;
}

.sun-flare.active {
  display: block;
}

.flare-core {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 240, 0.6) 25%,
    rgba(255, 250, 220, 0.2) 50%,
    transparent 75%
  );
}

.flare-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 450px;
  height: 450px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 250, 0.25) 0%,
    rgba(255, 250, 230, 0.1) 25%,
    rgba(200, 220, 255, 0.04) 50%,
    transparent 70%
  );
}

.flare-rays {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.06) 5deg,
    transparent 10deg,
    transparent 30deg,
    rgba(255, 255, 255, 0.04) 35deg,
    transparent 40deg,
    transparent 60deg,
    rgba(255, 255, 255, 0.05) 65deg,
    transparent 70deg,
    transparent 90deg,
    rgba(255, 255, 255, 0.03) 95deg,
    transparent 100deg,
    transparent 120deg,
    rgba(255, 255, 255, 0.06) 125deg,
    transparent 130deg,
    transparent 150deg,
    rgba(255, 255, 255, 0.04) 155deg,
    transparent 160deg,
    transparent 180deg,
    rgba(255, 255, 255, 0.05) 185deg,
    transparent 190deg,
    transparent 210deg,
    rgba(255, 255, 255, 0.03) 215deg,
    transparent 220deg,
    transparent 240deg,
    rgba(255, 255, 255, 0.04) 245deg,
    transparent 250deg,
    transparent 270deg,
    rgba(255, 255, 255, 0.06) 275deg,
    transparent 280deg,
    transparent 300deg,
    rgba(255, 255, 255, 0.04) 305deg,
    transparent 310deg,
    transparent 330deg,
    rgba(255, 255, 255, 0.05) 335deg,
    transparent 340deg,
    transparent 360deg
  );
  border-radius: 50%;
  filter: blur(2px);
}

.flare-streak {
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 3px;
  transform-origin: 0 50%;
  transform: rotate(35deg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(200, 230, 255, 0.15) 20%,
    rgba(180, 200, 255, 0.06) 40%,
    rgba(220, 180, 255, 0.04) 60%,
    transparent 80%
  );
  filter: blur(3px);
}

.flare-streak2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 350px;
  height: 2px;
  transform-origin: 0 50%;
  transform: rotate(55deg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(180, 220, 255, 0.1) 30%,
    transparent 70%
  );
  filter: blur(2px);
}

.flare-orb {
  position: absolute;
  top: 180px;
  left: 250px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 210, 255, 0.12) 0%, transparent 70%);
}

.flare-orb2 {
  position: absolute;
  top: 280px;
  left: 380px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 180, 255, 0.08) 0%, transparent 70%);
}

.container {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.search-bar input {
  width: 260px;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 1.05rem;
  text-align: center;
  outline: none;
}

.search-wrap {
  position: relative;
  display: inline-block;
}

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  z-index: 10;
  display: none;
}

.suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

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

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sug-city {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.sug-region {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.locate-btn {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.locate-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-bar input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.search-bar button {
  padding: 0.7rem 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.search-bar button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-bar button:disabled {
  opacity: 0.4;
  cursor: wait;
}

/* Hero */
.hero-section {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.hero-city {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.hero-temp {
  font-size: 6rem;
  font-weight: 100;
  line-height: 1;
  margin: 0.25rem 0;
}

.hero-condition {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.9;
}

.hero-feels {
  font-size: 0.95rem;
  opacity: 0.7;
}

.hero-hilo {
  font-size: 1rem;
  opacity: 0.7;
  margin-top: 0.15rem;
}

/* Glass card */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

/* Hourly */
.hourly-card {
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.hourly-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hourly-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.hourly-scroll::-webkit-scrollbar {
  display: none;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 48px;
}

.hourly-time {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
}

.hourly-icon {
  font-size: 1.25rem;
}

.hourly-temp {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Daily forecast */
.daily-card {
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.daily-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.daily-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.daily-row:last-child {
  border-bottom: none;
}

.daily-name {
  width: 55px;
  font-size: 0.85rem;
  font-weight: 500;
}

.daily-icon {
  width: 30px;
  font-size: 1.1rem;
  text-align: center;
}

.daily-low {
  width: 35px;
  text-align: right;
  font-size: 0.85rem;
  opacity: 0.5;
}

.daily-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 0 0.5rem;
  position: relative;
}

.daily-bar {
  position: absolute;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #5ac8fa, #ffcc00, #ff9500);
}

.daily-high {
  width: 35px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Dashboard grid */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-card {
  padding: 1rem;
}

.dash-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.dash-value {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.2;
}

.dash-unit {
  font-size: 1rem;
  opacity: 0.6;
}

.dash-detail {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 0.35rem;
  line-height: 1.3;
}

.sun-arc-wrap {
  position: relative;
  cursor: pointer;
}

.sun-arc {
  width: 100%;
  height: auto;
  margin: 0.5rem 0 0.25rem;
}

.sun-dot {
  cursor: pointer;
}

.sun-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
  z-index: 5;
  pointer-events: none;
}

.sun-arc-wrap:hover .sun-tooltip {
  display: block;
}

.sun-time {
  font-size: 1.75rem;
}

.wind-compass {
  width: 140px;
  height: 140px;
  margin: 0.25rem auto 0;
}

/* Error & Loading */
.error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 14px;
  padding: 1rem;
  color: #fca5a5;
  text-align: center;
}

.loading {
  text-align: center;
  opacity: 0.6;
  padding: 3rem 0;
  font-size: 1rem;
}

.powered-by {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  font-size: 0.7rem;
  opacity: 0.4;
}

.powered-by a {
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
}

.powered-by a:hover {
  opacity: 1;
}

@media (max-width: 700px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  body {
    padding: 1rem 0.75rem;
  }
  .hero-city {
    font-size: 1.5rem;
  }
  .hero-temp {
    font-size: 4.5rem;
  }
  .hourly-scroll {
    gap: 0.75rem;
  }
  .hourly-item {
    min-width: 40px;
  }
  .daily-name {
    width: 45px;
    font-size: 0.8rem;
  }
  .dash-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 380px) {
  .hero-temp {
    font-size: 3.5rem;
  }
  .dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .dash-card {
    padding: 0.75rem;
  }
}
