/* Reset de márgenes, relleno y modelo de caja */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif;
}

/* Estilos para el cuerpo y la etiqueta HTML */
html, body {
  display: grid;
  height: 100%;
  place-items: center;
  text-align: center;
  background: #7900b1;
}

/* Estilos para el contenedor principal */
.container {
  position: relative;
  width: 400px;
  background: #111111;
  padding: 20px 30px;
  border: 1px solid #444;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Estilos para la sección de agradecimiento */
.container .post {
  display: none;
}

/* Estilos para el texto de agradecimiento */
.container .text {
  font-size: 25px;
  color: #666;
  font-weight: 500;
}

/* Estilos para el botón de edición */
.container .edit {
  position: absolute;
  right: 10px;
  top: 5px;
  font-size: 16px;
  color: #666;
  font-weight: 500;
  cursor: pointer;
}

.container .edit:hover {
  text-decoration: underline;
}

/* Estilos para el widget de estrellas */
.container .star-widget input {
  display: none;
}

.container .star-widget label {
  font-size: 40px;
  color: #444;
  padding: 10px;
  float: right;
  transition: all 0.2s ease;
}

input:not(:checked) ~ label:hover,
input:not(:checked) ~ label:hover ~ label {
  color: #fd4;
}

input:checked ~ label {
  color: #fd4;
}

input#rate-5:checked ~ label {
  color: #fe7;
  text-shadow: 0 0 20px #952;
}

/* Estilos para las etiquetas de encabezado según la puntuación */
#rate-1:checked ~ form header:before {
  content: "Odio este producto ";
}

#rate-2:checked ~ form header:before {
  content: "No me ha gustado ";
}

#rate-3:checked ~ form header:before {
  content: "Está bien ";
}

#rate-4:checked ~ form header:before {
  content: "Me encanta ";
}

#rate-5:checked ~ form header:before {
  content: "Me enloquecen cosas así ";
}

/* Texto valoración*/
#valoracion{
  text-align: center;
  color: #fff;
  font-size: larger;
  font-weight: bold;
}

/* Estilos para ocultar y mostrar el formulario según la puntuación seleccionada */
.container form {
  display: none;
}

input:checked ~ form {
  display: block;
}

/* Estilos para el encabezado del formulario */
form header {
  width: 100%;
  font-size: 25px;
  color: #fe7;
  font-weight: 500;
  margin: 5px 0 20px 0;
  text-align: center;
  transition: all 0.2s ease;
}

/* Estilos para el área de texto del formulario */
form .textarea {
  height: 100px;
  width: 100%;
  overflow: hidden;
}

form .textarea textarea {
  height: 100%;
  width: 100%;
  outline: none;
  color: #eee;
  border: 1px solid #333;
  background: #222;
  padding: 10px;
  font-size: 17px;
  resize: none;
}

form .textarea textarea:focus {
  border-color: #444;
}

/* Estilos para el botón de enviar del formulario */
form .btn {
  height: 45px;
  width: 100%;
  margin: 15px 0;
}

form .btn button {
  height: 100%;
  width: 100%;
  border: 1px solid #444;
  outline: none;
  background: #222;
  color: #999;
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

form .btn button:hover {
  background: #1b1b1b;
}