/* Reset and global settings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(145deg, #d3e4f3, #f7f9fc);
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 0.5s ease;
}

/* Header and navigation */
header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  animation: fadeInSlide 0.6s ease-out;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #004c59;
  letter-spacing: -0.5px;
}

nav.menu {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 1rem;
}

nav.menu a,
nav.menu #langToggle {
  text-decoration: none;
  color: #004c59;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  margin-left: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  outline: none;
}

nav.menu a::after,
nav.menu #langToggle::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: #000000;
  bottom: -4px;
  left: 0;
  transition: width 0.3s ease;
}

nav.menu a:hover::after,
nav.menu #langToggle:hover::after {
  width: 100%;
}

nav.menu a:hover,
nav.menu #langToggle:hover {
  color: #000000;
}

nav .divider {
  width: 2px;
  height: 1em;
  background-color: #004c59;
  opacity: 1;
  display: inline-block;
  align-self: center;
  margin-left: 15px;
}

/* Main content and forms */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 2rem;
}

form {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  padding: 2rem 2.5rem;
  border-radius: 25px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: cardPop 0.7s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 1.1rem;
  color: #333;
}

form p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-weight: 500;
}

form input {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border: none;
  border-radius: 14px;
  background-color: #f1f5f9;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

form input:focus {
  outline: none;
  background-color: #e2e8f0;
}

form button {
  width: 100%;
  padding: 0.8rem;
  font-size: 1.1rem;
  background: linear-gradient(to right, #004c59, #004c59);
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 600;
}

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

/* Weather box styling */
.weather-box {
  position: relative;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  padding: 2rem 2.5rem;
  border-radius: 25px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: cardPop 0.7s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.weather-box.show {
  opacity: 1;
  visibility: visible;
}

.weather-box h2 {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.5;
}

.weather-box p {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 1rem;
}

/* Info box styling */
.info-box {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  padding: 2rem 2.5rem;
  border-radius: 25px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: cardPop 0.7s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-box h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.info-box p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.info-box a {
  color: #007aff;
  text-decoration: underline;
}

#inputBox {
  display: flex;
  justify-content: center;
}

#tempCompareForm {
  width: 100%;
  max-width: 420px;
}

/* Animations */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardPop {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive and hamburger menu */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #004c59;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

@media (max-width: 600px) {
  .menu-toggle {
    display: block;
  }

  nav.menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 99;
  }

  nav.menu.show {
    display: flex;
  }

  nav.menu a,
  nav.menu #langToggle {
    margin: 0.3rem 0;
    font-weight: 600;
    color: #004c59;
    align-self: flex-start;
  }

  nav .divider {
    display: none;
  }

  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
}

