/* IMPORT FONT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');


/* GLOBAL BODY */
body {
  font-family: "Poppins", sans-serif;
  background:lightgray;         /* default background */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

/* MAIN CONTAINER */
.container {
  background: white;
  margin: 2rem;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px gray;
  text-align: center;
}


/* INPUT & FORM BUTTON */
input {
  padding: 10px;
  width: 60%;
  margin-bottom: 10px;
}

form button {
  padding: 10px 20px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


/* WEATHER RESULT BOX */
#weatherResult {
  margin-top: 20px;
}


/* TAB BUTTONS (AQI / FACTS) */
.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.tab-buttons button {
  padding: 10px 20px;
  border: none;
  background: #e5e7eb;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.25s;
}

.tab-buttons button.active {
  background: #2563eb;
  color: white;
  transform: scale(1.05);
  transition: 0.2s;
}

.tab-buttons button {
  position: relative;
  overflow: hidden;
}

.tab-buttons button:active::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.4s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* TOGGLE BUTTON STYLE (IF USED ANYWHERE ELSE) */
.toggle-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.toggle-buttons button {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  background: #ddd;
  color: #333;
  transition: 0.25s;
}

.toggle-buttons button.active {
  background: #4a90e2;
  color: white;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}


/* BACKGROUND IMAGES FOR WEATHER CONDITIONS */
body.sunny {
  background-image: url('/static/images/sunny.jpg');
  background-size: cover;
  background-position: center;
}

body.rainy {
  background-image: url('/static/images/rainy.jpg');
  background-size: cover;
  background-position: center;
}

body.haze {
  background-image: url('/static/images/haze.jpg');
  background-size: cover;
  background-position: center;
}

body.cloudy {
  background-image: url('/static/images/cloudy.jpg');
  background-size: cover;
  background-position: center;
}

body.default {
  background-color:lightgray;
}
#weatherResult img {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* FOOTER */
footer {
  text-align: center;
  margin-top: auto;               /* sticks footer to bottom */
  padding: 10px 0;
  width: 100%;
}

footer p {
  background: white;
  color: black;
  margin: auto 2rem;
  margin-bottom: 0px !important;
  padding: 8px 12px;
  border-radius: 5px;
}


/* HIDE ELEMENTS */
.hidden {
  display: none;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
#extraContent {
  animation: fadeContent 0.4s ease;
}

@keyframes fadeContent {
  from { opacity: 0; }
  to { opacity: 1; }
}