* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
}

body {
  background: linear-gradient(
    90deg,
    rgba(173, 216, 230, 1) 0%,
    rgba(255, 255, 224, 1) 100%
  );
  font-size: 1.2rem;
  color: rgba(50, 50, 50, 0.9);
  line-height: 1.6;
  padding: 2rem;
}

h1,
h2 {
  font-size: 2rem;
}

p {
  font-size: 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  background-color: rgba(255, 235, 240, 1);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

header h1 {
  font-size: 2.5rem;
  color: rgba(130, 30, 30, 1);
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

header p {
  font-size: 1.2rem;
  color: rgba(80, 80, 80, 1);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 1.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.slider-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  background-color: rgba(235, 235, 255, 1);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.slider-container label {
  font-size: 1.2rem;
  color: rgba(60, 60, 60, 1);
  font-weight: 500;
  transition: color 0.3s ease;
}

.slider-container input[type="range"] {
  width: 100%;
  appearance: none;
  background: rgba(210, 210, 210, 1);
  height: 0.5rem;
  border-radius: 0.5rem;
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-color: rgba(130, 30, 30, 1);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slider-container span {
  font-size: 1rem;
  color: rgba(100, 100, 100, 1);
  font-weight: bold;
  transition: color 0.3s ease;
}

#result-section {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background-color: rgba(255, 245, 235, 1);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

#result-section h2 {
  font-size: 1.8rem;
  color: rgba(130, 30, 30, 1);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

#universe-description {
  font-size: 1.4rem;
  color: rgba(70, 70, 70, 1);
  margin-top: 1rem;
  font-style: italic;
  transition: color 0.3s ease;
}

#stress-section {
  text-align: center;
  margin-top: 2rem;
}

#stress-section h2 {
  font-size: 2rem;
  color: rgba(255, 69, 58, 1);
  transition: color 0.3s ease;
}

#stress-bar-container {
  width: 100%;
  height: 2rem;
  background-color: rgba(230, 230, 230, 1);
  border-radius: 1rem;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

#stress-bar {
  height: 100%;
  background-color: rgba(50, 205, 50, 1);
  width: 0;
  border-radius: 1rem 0 0 1rem;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

#life-expectancy {
  font-size: 1.5rem;
  color: rgba(80, 80, 80, 0.9);
  font-weight: 600;
  margin-top: 1rem;
  transition: color 0.3s ease;
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background-color: rgba(240, 240, 255, 1);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

footer a {
  font-size: 1.2rem;
  color: rgba(30, 144, 255, 1);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

footer a:hover {
  color: rgba(255, 69, 58, 1);
  text-decoration: underline;
}

@media only screen and (max-width: 768px) {
  body {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  main {
    padding: 1rem;
  }

  .slider-container {
    flex-direction: column;
    gap: 1rem;
  }

  #result-section h2 {
    font-size: 1.6rem;
  }

  #stress-section h2 {
    font-size: 1.6rem;
  }

  footer a {
    font-size: 1rem;
  }
}

@media only screen and (max-width: 480px) {
  body {
    padding: 0.5rem;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 0.9rem;
  }

  main {
    padding: 0.5rem;
  }

  .slider-container {
    padding: 1rem;
  }

  #result-section h2 {
    font-size: 1.4rem;
  }

  #stress-section h2 {
    font-size: 1.4rem;
  }

  footer a {
    font-size: 0.9rem;
  }
}
