/* ===== Global Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

/* ===== Light Mode (Default) ===== */
body {
  background: #f4f6f8;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ===== Dark Mode ===== */
body.dark {
  background: #121212;
  color: #f5f5f5;
}

/* ===== Header ===== */
header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* ===== Buttons ===== */
button {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(45deg, #6a5af9, #f06595);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ===== Weather Dashboard Card ===== */
.card {
  background: #ffffff;
  color: inherit;
  border-radius: 18px;
  padding: 30px;
  margin-top: 60px;
  width: 380px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.12);
  transition: all 0.3s ease;
}

body.dark .card {
  background: #1e1e1e;
}

/* ===== Headings & Text ===== */
h1, h2, h3 {
  font-weight: 700;
  margin-bottom: 15px;
  text-align: center;
  letter-spacing: 1px;
}

#cityName {
  font-size: 1.6rem;
}

#temp {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 5px 0;
}

#desc,
#humidity,
#wind {
  font-size: 1rem;
  margin: 3px 0;
}

p {
  line-height: 1.6;
}

/* ===== Search Box / Inputs ===== */
input,
textarea {
  width: 100%;
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid #ccc;
  outline: none;
  background: #ffffff;
  color: #222;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
  border-color: #6a5af9;
  box-shadow: 0 0 10px rgba(106, 90, 249, 0.3);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
h1,
p,
button {
  animation: fadeInUp 0.5s ease forwards;
}

/* ===== Weather Graph Styling ===== */
.weather-graph {
  margin-top: 20px;
  width: 100%;
}

/* ===== Error Message ===== */
.error {
  color: red;
  text-align: center;
  margin-top: 10px;
  font-weight: 600;
}

/* ===== Hidden Class ===== */
.hidden {
  display: none;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .card {
    width: 90%;
    margin-top: 40px;
  }

  header {
    flex-direction: column;
    gap: 15px;
  }
}
/* Full-page initial background */
#homeBackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('weather.png') no-repeat center center/cover;
  z-index: -1;
  transition: opacity 0.5s ease;
}

#homeBackground.hidden {
  opacity: 0;
  pointer-events: none;
}
