/* General */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: darkslateblue;
  font-size: 1.3rem;
}

/* Content */
/* Contenedor principal */
.content {
  background: linear-gradient(to bottom right, #dbe9f4, #f0f4fc); /* degrade azul pastel */
  width: 768px;
  max-width: 768px;
  padding: 3rem;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
}

/* Título */
.content__title {
  margin: 1rem;
  text-align: center;
  font-size: 2rem;
  color: #0d6efd;
  font-weight: 600;
}

/* Formulario de búsqueda */
.search {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Input con efecto 3D */
.search__input {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid #b0c4de;
  border-radius: 0.5rem;
  background-color: #ffffff;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1),
              inset -2px -2px 5px rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.search__input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 8px rgba(13, 110, 253, 0.4);
  outline: none;
}

/* Botón estilo Bootstrap Primary */
.search__submit {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(13, 110, 253, 0.3);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.search__submit:hover {
  background-color: #0b5ed7;
  transform: translateY(-2px);
}

/* Animación al hacer clic */
@keyframes clickBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.search__submit.clicked {
  animation: clickBounce 0.2s ease;
}
 
/* Tarjeta de resultado con layout dividido */
.result {
  display: flex;
  gap: 2rem;
  background: linear-gradient(to bottom right, #e3f2fd, #f0f8ff); /* azul claro pastel */
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  color: #212529;
  align-items: flex-start;
  position: relative;
}

/* Imagen de la película */
.result__avatar {
  width: 180px;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Card de datos */
.result__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

/* Header con título */
.result__card-header {
  font-size: 1.6rem;
  font-weight: bold;
  color: #0d6efd;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
}

/* Secciones */
.result__card-section {
  font-size: 1rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

/* Última sección (Plot) */
.result__card-plot {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Botón de favoritos */
.result__toggle-favorite {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
  transition: background-color 0.3s, transform 0.2s;
  text-decoration: none;
}

.result__toggle-favorite:hover {
  background-color: #0b5ed7;
  transform: translateY(-2px);
}
/* Título de la película */
.result__name {
  grid-area: name;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #0d6efd;
}

/* Imagen de la película */
.result__avatar {
  grid-area: avatar;
  width: 100%;
  max-width: 180px;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Descripción */
.result__bio {
  grid-area: bio;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: #333;
}

.result__blog {
  display: inline-block;
  margin-top: 0.5rem;
  color: #0d6efd;
  text-decoration: underline;
}

.result__error {
  padding: 0.3rem;
  background-color: tomato;
  color: white;
  text-align: center;
  border: 1px solid red;
}

/* Favorites */
.favorites {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
}

.favorite {
  transition: transform 0.3s ease-out;
}

.favorite__avatar {
  height: 5rem;
  margin: 0.3rem;
}

.favorite--selected {
  transform: scale(1.3);
}

/* Transitions */
.v-enter-active,
.v-leave-active {
  transition: opacity 0.5s ease;
}

.v-enter-from,
.v-leave-to {
  opacity: 0;
}

.list-move, /* apply transition to moving elements */
.list-enter-active,
.list-leave-active {
  transition: all 0.5s ease;
}

.list-enter-from,
.list-leave-to {
  opacity: 0;
  transform: translateX(30px);
}

/* ensure leaving items are taken out of layout flow so that moving
   animations can be calculated correctly. */
.list-leave-active {
  position: absolute;
}
@media (max-width: 768px) {
  body {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .content {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 0;
  }

  .search {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search__input,
  .search__submit {
    width: 100%;
    font-size: 1rem;
  }

  .result {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .result__avatar {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }

  .result__card {
    padding: 1rem;
  }

  .result__card-header {
    font-size: 1.3rem;
    text-align: center;
  }

  .favorites {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
  }

  .favorite__avatar {
    height: 4rem;
  }
}