@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto+Condensed:wght@700&family=Roboto:wght@400;700&display=swap");

/* ---- RESET BASE STYLES ---- */
* {
  padding: 0px;
  margin: 0px;
  border: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

header,
main {
  display: block;
}

h1,
p {
  font-size: inherit;
  font-weight: inherit;
}

img {
  vertical-align: top;
  max-width: 100%;
  height: auto;
}

/* ---- STYLES ---- */
html,
body {
  height: 100%;
  font-family: "Roboto", sans-serif;
  line-height: 160%;
  font-size: 16px;
  color: #ffffff;
  background-color: #202020;
}

.wrapper {
  display: grid;
  min-height: 100%;
  grid-template: minmax(80px, auto) 1fr / minmax(24px, 1fr) minmax(auto, 1200px) minmax(
      24px,
      1fr
    );
}

.header {
  grid-column: 1/4;
  background: linear-gradient(45deg, #ed1d24e3, #ed1f69e3);
  box-shadow: 2px 4px #2020203b;
  padding: 40px 24px 12px;
}

.header__title {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 42px;
  color: #ffffff;
  line-height: 120%;
  text-align: center;
  text-shadow: 2px 2px #2020203b;
}

.main {
  grid-column: 2;
}

.characters__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: 30px;
  row-gap: 64px;
  margin: 30px 0;
  justify-items: center;
}

.character__item {
  display: flex;
  flex-direction: column;
  max-width: 375px;
}

.character__image {
  width: 100%;
  max-width: 375px;
  max-height: 375px;
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow: 0 2px 4px #3131403b;
}

.character__name {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 34px;
  margin: -50px 0px 18px 18px;
  text-shadow: 2px 2px #20202093;
}

.character__info {
  font-weight: normal;
  font-size: 16px;
}

.character__info span {
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  color: #f34463;
}

.character__info div:not(:last-of-type) {
  margin: 0px 0px 14px;
}

/* ---- RATING ---- */
.rating {
  display: flex;
  align-items: flex-end;
  font-size: 40px;
  line-height: 0.75;
  transition: opacity 0.3s ease 0s;
  margin: 34px 0px 24px 0px;
}

.rating.rating_set .rating__active,
.rating.rating_set .rating__item {
  cursor: pointer;
}

.rating__body {
  position: relative;
}

.rating__body::before {
  content: "★★★★★★★★★★";
  display: block;
  font-size: 32px;
  letter-spacing: 3px;
}

.rating__active {
  position: absolute;
  width: 0%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
}

.rating__active::before {
  content: "★★★★★★★★★★";
  position: absolute;
  font-size: 32px;
  letter-spacing: 3px;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  color: #fddc48;
}

.rating__items {
  display: flex;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.rating__item {
  flex: 0 0 10%;
  height: 100%;
  opacity: 0;
}

.rating__value {
  font-size: 50%;
  line-height: 1;
  padding: 0px 0px 0px 10px;
}

/* ---- MEDIA QUERIES ---- */
@media screen and (max-width: 767px) {
  .header {
    padding-top: 24px;
    padding-bottom: 8px;
  }

  .header__title {
    font-size: 32px;
  }

  .characters__container {
    column-gap: 20px;
    row-gap: 44px;
    margin: 20px 0;
  }
}
