@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --white-transparent-bg: rgba(255, 255, 255, 0.15);
  --white-transparent-border: rgba(255, 255, 255, 0.3);
  --white-text: rgba(255, 255, 255, 0.87);
  --white-shadow-glow: rgba(255, 255, 255, 0.3);
  --input-bg: rgba(255, 255, 255, 0.18);
  --input-focus-bg: rgba(255, 255, 255, 0.32);
  --button-bg: rgba(255, 255, 255, 0.25);
  --button-hover-bg: rgba(255, 255, 255, 0.4);
  --blur-amount: 12px;
}

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

html, body {
  height: 100%;
  font-family: "Jost", sans-serif;
  background: #1a2a6c;
  color: var(--white-text);
  overflow-x: hidden;
}

.video-bg-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

#bg-video {
  position: absolute;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  top: 0;
  left: 0;
  z-index: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--white-transparent-bg), rgba(255, 255, 255, 0.05));
  mix-blend-mode: soft-light;
  z-index: 2;
  pointer-events: none;
}

.container {
  position: relative;
  max-width: 350px;
  width: 90vw;
  background: var(--white-transparent-bg);
  border-radius: 18px;
  padding: 1.5rem 2rem;
  box-shadow: 0 0 25px var(--white-shadow-glow);
  backdrop-filter: blur(var(--blur-amount));
  border: 1.8px solid var(--white-transparent-border);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  z-index: 3;
  text-align: center;
  margin: 4rem auto;
}

h1 {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--white-text);
  text-shadow: 0 0 10px var(--white-shadow-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

#theme-toggle {
  cursor: pointer;
  border: none;
  background: none;
  color: var(--white-text);
  font-size: 1.3rem;
  align-self: flex-end;
  transition: color 0.3s ease;
}

#theme-toggle:hover {
  color: var(--button-hover-bg);
}

.search-box {
  display: flex;
  width: 100%;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

#city-input {
  flex: 2 1 140px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-radius: 25px;
  border: none;
  background-color: var(--input-bg);
  color: var(--white-text);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
  outline: none;
  transition: background-color 0.3s ease;
  box-shadow: none;
}

#city-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#city-input:focus {
  background-color: var(--input-focus-bg);
}



#detect-btn {
  min-width: 45px;
  font-size: 1.4rem;
  padding: 0;
}

#alerts {
  color: #f9d342;
  font-weight: 600;
  font-size: 1rem;
  min-height: 22px;
}

.weather-info,
.forecast-container > div,
.extra-info > div,
.chart-section,
.share-section {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 18px 24px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  margin-bottom: 1.4rem;
  color: var(--white-text);
  text-align: center;
}

.weather-info.visible,
.forecast-container > div.visible,
.extra-info > div.visible,
.chart-section.visible,
.share-section.visible {
  display: block;
}

.weather-info .title,
.forecast-day .date,
.hour-block .time {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.weather-info .temp,
.forecast-day .temp,
.hour-block .temp {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--button-hover-bg);
}

.forecast-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.daily-forecast {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 4px;
}

.forecast-day {
  flex: 0 0 80px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  padding: 10px 8px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.24);
}

.forecast-day img {
  width: 48px;
  height: 48px;
}

.hourly-forecast {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 4px;
}

.hour-block {
  flex: 0 0 72px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 6px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.24);
}

.hour-block img {
  width: 36px;
  height: 36px;
}

.extra-info {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 0;
}

.extra-info > div {
  min-height: 90px;
}

#sun-info, #aqi-info, #uv-humidity, #wind-info {
  font-size: 1.05rem;
}

#wind-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wind-arrow {
  width: 40px;
  height: 40px;
  margin-top: 6px;
  transform-origin: center;
  transition: transform 0.5s ease;
}

.chart-section {
  margin-top: 0;
}

.share-section {
  display: flex;
  justify-content: center;
}

#share-btn {
  padding: 0.9rem 1.7rem;
  font-weight: 700;
  border-radius: 25px;
  background: var(--button-bg);
  color: var(--white-text);
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 14px var(--white-shadow-glow);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#share-btn:hover {
  background-color: var(--button-hover-bg);
  box-shadow: 0 6px 25px var(--white-shadow-glow);
}

/* Responsive */

@media (max-width: 640px) {
  .container {
    max-width: 92vw;
    padding: 1.4rem 1.7rem 1.9rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  

  .forecast-day, .hour-block {
    flex: 0 0 72px;
  }

  #share-btn {
    font-size: 0.9rem;
    padding: 0.95rem 1.3rem;
  }
}
.search-box {
  display: flex;
  width: 100%;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden; /* prevent overflow */
}

#city-input {
  flex: 1 1 auto;
  min-width: 0; /* allow shrink */
}


.weather-info,
.forecast-container > div,
.extra-info > div,
.chart-section{
    display: none;
}

#wind-info,
.share-section {
  display: none;
}

.share-section.visible {
  display: flex;
  justify-content: center;
}
#search-btn, #detect-btn {
  flex: 1 0 75px;
  padding: 0.85rem 0;
  border-radius: 25px;
  border: none;
  background: var(--button-bg);
  color: var(--white-text);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: none; /* Remove shadow */
  margin: 0 5px; /* Small margin to separate buttons */
  transition: background-color 0.25s ease;
}

#search-btn:hover, #detect-btn:hover {
  background-color: var(--button-hover-bg);
  /* light shadow only on hover */
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

#theme-toggle {
  cursor: pointer;
  border: none;
  background: none;
  color: var(--white-text);
  font-size: 1.3rem;
  transition: color 0.3s ease;
  box-shadow: none; /* Remove shadow */
  margin-left: 10px;
}

#theme-toggle:hover {
  color: var(--button-hover-bg);
  /* Optionally very light glow on hover */
  text-shadow: 0 0 8px var(--button-hover-bg);
}