/* CSS Reset & Root Styles */
* {
  list-style: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0f172a;
  --accent-color: hsl(122, 39%, 50%);
  --accent-light: hsl(122, 39%, 70%);
  --accent-dark: hsl(122, 39%, 40%);
  --text-dark: hsla(0, 0%, 20%, 0.8);
  --text-light: hsla(0, 0%, 20%, 0.5);
  --border-color: hsla(0, 0%, 20%, 0.3);
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  body {
    background-image: url(img/wp12560883-weather-4k-wallpapers.jpg);
    background-size: cover;
    background-attachment: fixed;
  }
}

.container {
  padding: 1rem !important;
  background-color: transparent;
}

/* Form Styling */
.weatherForm {
  margin-bottom: 2rem;
}

.cityInput {
  padding: 0.75rem;
  font-size: 1.25rem;
  font-weight: bold;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.cityInput::placeholder {
  font-size: 1.15rem;
  font-weight: normal;
  color: var(--text-light);
}

.cityInput:hover,
.cityInput:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(122, 201, 80, 0.3);
  outline: none;
}

.cityInput:disabled {
  background-color: hsl(0, 0%, 90%);
  cursor: not-allowed;
  opacity: 0.6;
}

@media (min-width: 576px) {
  .cityInput {
    font-size: 2rem;
    padding: 10px;
  }
}

/* Button Styling */
button[type="submit"] {
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  font-size: 1.25rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

button[type="submit"]:hover:not(:disabled) {
  background-color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(122, 201, 80, 0.3);
}

button[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 10px var(--accent-light);
}

button[type="submit"]:active:not(:disabled) {
  transform: scale(0.98);
}

button[type="submit"]:disabled {
  background-color: var(--accent-light);
  cursor: not-allowed;
  opacity: 0.7;
}

@media (min-width: 576px) {
  button[type="submit"] {
    font-size: 2rem;
  }
}

/* Weather Card */
#weatherCard {
  display: none;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#weatherCard .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

p {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.cityDisplay,
.tempDisplay {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

@media (min-width: 576px) {
  .cityDisplay,
  .tempDisplay {
    font-size: 3.5rem;
  }
}

.humidityDisplay {
  font-weight: bold;
  margin-bottom: 1rem;
}

.descDisplay {
  font-style: italic;
  font-weight: bold;
  font-size: 1.75rem;
}

.errorDisplay {
  font-size: 1.75rem;
  font-weight: bold;
  color: #d32f2f;
  text-align: center;
}

/* Map Container */
.map-hidden {
  display: none;
}

#mapContainer {
  border-radius: 0.5rem;
  overflow: hidden;
}
.card { 
    display: none;
    border-radius: 10px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, hsl(210, 100%, 75%), hsl(40, 100%, 75%));
    padding: 50px;
    box-shadow: 2px 2px 5px hsla(0, 0%, 0%, 0.5);
    min-width: 300px;
    flex-direction: column;
    align-items: center;
}

.cityDisplay,
.tempDisplay {
  font-size: 2.8rem;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
}

.weatherForm {
    margin: 20px;
}

.cityInput{
    padding: 10px;
    font-size: 2rem;
    font-weight: bold;
    border: 2px solid hsla(0, 0%, 20%, 0.3);
    border-radius: 10px;
    margin: 10px;
    width: 300px;
}

.cityInput:focus{
    outline: none;
    border-color: hsl(122, 39%, 50%);
    box-shadow: 0 0 5px hsl(122, 39%, 60%);
}

.cityInput::placeholder{
    font-size: 1.5rem;
    font-weight: normal;
    color: hsla(0, 0%, 20%, 0.5);
}

.cityInput:hover{
    border-color: hsl(122, 39%, 45%);
}

.cityInput:disabled{
    background-color: hsl(0, 0%, 90%);
    cursor: not-allowed;
}

.cityInput:disabled::placeholder{
    color: hsla(0, 0%, 20%, 0.3);
}

.cityInput:enabled:hover{
    border-color: hsl(122, 39%, 40%);
}

.cityInput:enabled:focus{
    box-shadow: 0 0 10px hsl(122, 39%, 70%);
}

.cityInput:active{
    transform: scale(0.98);

}

.cityInput:valid{
    border-color: hsl(122, 39%, 50%);

}

.cityInput:invalid{
    border-color: hsl(0, 39%, 50%);

}





button[type="submit"]{
    padding: 10px 20px;
    font-weight: bold;
    font-size: 2rem;
    background-color: hsl(122, 39%, 50%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button[type="submit"]:active{
    transform: scale(0.98);
}

button[type="submit"]:focus{
    outline: none;
    box-shadow: 0 0 5px hsl(122, 39%, 60%);
}

button[type="submit"]:disabled{
    background-color: hsl(122, 39%, 70%);
    cursor: not-allowed;
}

button[type="submit"]:enabled:hover{
    background-color: hsl(122, 39%, 45%);
}

button[type="submit"]:enabled:focus{
    box-shadow: 0 0 10px hsl(122, 39%, 70%);
}

button[type="submit"]:hover{
    background-color: hsl(122, 39%, 40%);
}

h1{
    margin-top: 0;
    margin-bottom: 25px;
}

p{
    font-size: 1.5rem;
    margin: 5px 0;
}

.cityDisplay, .tempDisplay{
    font-size: 3.5rem;
    font-weight: bold;
    color: hsla(0, 0%, 0%, 0.8);
    margin-bottom: 25px;
}

.humidityDisplay{
    font-weight: bold;
    margin-bottom: 25px;
}

.descDisplay{
    font-style: italic;
    font-weight: bold;
    font-size: 2rem;
}

.weatherEmoji{
    margin: 0;
    font-size: 7.5rem;
}

.errorDisplay{
    font-size: 2.5rem;
    font-weight: bold;
    color: hsla(0, 0%, 0%, 0.75);
}

/* Language selector styling */
.lang {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lang label {
  font-weight: 500;
  color: #333;
  margin-bottom: 0;
  white-space: nowrap;
}

.lang select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  background-color: white;
  color: #212529;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  max-width: 220px;
}

/* Hover & focus states */
.lang select:hover {
  border-color: hsl(122, 39%, 50%);
  box-shadow: 0 0 0 0.2rem rgba(122, 201, 80, 0.25);
}

.lang select:focus {
  border-color: hsl(122, 39%, 50%);
  box-shadow: 0 0 0 0.25rem rgba(122, 201, 80, 0.25);
  outline: none;
}

/* RTL support for Arabic, Persian, Pashto */
html[dir="rtl"] .lang {
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang label {
  margin-right: 0;
  margin-left: 0.75rem;
}

/* Mobile adjustments */
@media (max-width: 576px) {
  .lang {
    justify-content: center;
    width: 100%;
  }

  .lang select {
    width: 100%;
    max-width: none;
    font-size: 0.95rem;
  }
}

/* Header styling */
.d-flex.justify-content-between {
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 576px) {
  .cityDisplay,
  .tempDisplay {
    font-size: 3.5rem;
  }
}

.weatherEmoji {
    font-size: 5rem;
}

@media (min-width: 576px) {
  .weatherEmoji {
    font-size: 7.5rem;
  }
}

/* Input improvements */
.cityInput {
    font-size: 1.25rem;
}

@media (min-width: 576px) {
  .cityInput {
    font-size: 2rem;
  }
}

button[type="submit"] {
    font-size: 1.25rem;
}

@media (min-width: 576px) {
  button[type="submit"] {
    font-size: 2rem;
  }
}


@media (min-width: 576px) {
  .cityDisplay,
  .tempDisplay {
    font-size: 3.5rem;
  }
}

.weatherEmoji {
    font-size: 5rem;
}

@media (min-width: 576px) {
  .weatherEmoji {
    font-size: 7.5rem;
  }
}

/* Input improvements */
.cityInput {
    font-size: 1.25rem;
}

@media (min-width: 576px) {
  .cityInput {
    font-size: 2rem;
  }
}

button[type="submit"] {
    font-size: 1.25rem;
}

@media (min-width: 576px) {
  button[type="submit"] {
    font-size: 2rem;
  }
}