/* Modern CSS Reset - Removes default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Custom Properties (Variables) for consistent theming */
:root {
  --primary: #2c7a7b;      /* Main brand color */
  --primary-light: #38b2ac; /* Lighter shade of primary */
  --primary-dark: #234e52;  /* Darker shade of primary */
  --secondary: #f6e05e;     /* Accent color */
  --text: #2d3748;         /* Main text color */
  --background: #ebf8ff;    /* Background color */
  --white: #ffffff;         /* White color */
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Standard shadow */
}

/* Body styles with centered content and gradient background */
body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(135deg, var(--background), var(--white));
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Main container styles with hover effect */
.container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Container hover animation */
.container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

/* Form spacing */
form {
  margin-bottom: 2rem;
}

/* Location input field styles */
#location {
  width: 70%;
  height: 3rem;
  padding: 0 1.5rem;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 1rem;
  background-color: var(--background);
  transition: all 0.3s ease;
}

/* Input focus state */
#location:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(44, 122, 123, 0.2);
}

/* Button styles */
button {
  height: 3rem;
  padding: 0 1.5rem;
  margin-left: 1rem;
  border: none;
  border-radius: 10px;
  background-color: var(--primary);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Button hover state */
button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Weather information container */
.informations {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.5s ease forwards;
  padding: 2rem;
  background-color: var(--background);
  border-radius: 15px;
}

/* Weather information typography */
.informations h1 {
  color: var(--primary-dark);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.informations h2 {
  color: var(--text);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.informations h3 {
  color: var(--primary);
  font-size: 1.2rem;
}

/* Weather emoji specific styling */
.weather-emoji {
  font-size: 6rem;
  margin-top: 1.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  animation: floatEmoji 3s ease-in-out infinite;
  /* Reset inherited styles to show original emoji colors */
  color: initial;
  -webkit-text-fill-color: initial;
  /* Emoji font stack for cross-platform compatibility */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", 
               "Noto Color Emoji", "Android Emoji", "EmojiSymbols";
  font-style: normal;
  font-weight: normal;
  background: none;
  border: none;
  filter: none;
}

/* Floating animation for emoji */
@keyframes floatEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Fade in animation for weather information */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design for mobile devices */
@media screen and (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #location {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  button {
    width: 100%;
    margin-left: 0;
  }

  .informations h1 {
    font-size: 2rem;
  }

  .informations h2 {
    font-size: 1.5rem;
  }

  .weather-emoji {
    font-size: 4.5rem;
  }
}

/* Loading animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.loading {
  animation: pulse 1.5s infinite;
}
