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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.app {
  width: 100%;
  max-width: 680px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

#btn-location {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

#btn-location:hover { background: rgba(255,255,255,0.2); }

#search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#city-input {
  flex: 1;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#city-input::placeholder { color: rgba(255,255,255,0.5); }
#city-input:focus { border-color: rgba(255,255,255,0.5); }

#btn-search {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: #e94560;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#btn-search:hover { background: #c73652; }

#error-msg {
  background: rgba(233,69,96,0.2);
  border: 1px solid rgba(233,69,96,0.4);
  color: #ff8099;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

#loading {
  text-align: center;
  padding: 2rem;
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.hidden { display: none !important; }

/* Current weather card */
#current {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.current-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.current-icon { font-size: 5rem; line-height: 1; }

.current-temp {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1;
}

.current-info .location {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.current-info .condition {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.details {
  display: flex;
  gap: 1.5rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* Forecast */
#forecast h2 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

#days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

@media (max-width: 560px) {
  #days-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 380px) {
  #days-grid { grid-template-columns: repeat(3, 1fr); }
}

.day-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  cursor: default;
  transition: background 0.2s, transform 0.15s;
}

.day-card:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.day-card.today {
  background: rgba(233,69,96,0.25);
  border-color: rgba(233,69,96,0.4);
}

.day-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.day-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }

.day-max {
  font-size: 1rem;
  font-weight: 700;
}

.day-min {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.1rem;
}
