:root {
  --ribbon-color-orange: #ce8d31;
  --ribbon-color-blue: #34707b;
  --ribbon-color-purple: #602f4c;
}

article {
  color: black;
}

.rankings {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  list-style-type: none;
}

.rank-1 *,
.rank-2 *,
.rank-3 *,
.rank-4 *,
.rank-5 * {
  animation: 1.5s ease-in 0s 1 ribbonFadeIn;
}

.rank-1 {
  width: 100%;
  animation: 0.75s ease-in 0s 1 ribbonSlideLeft;
}

.ribbon.rank-1::before {
  background-color: var(--ribbon-color-blue);
}

.album-title {
  font-size: 1.4em;
}

.rank-2 {
  width: 95%;
  animation: 0.8s ease-in 0s 1 ribbonSlideLeft;
}

.ribbon.rank-2::before {
  background-color: var(--ribbon-color-purple);
}

.rank-3 {
  width: 90%;
  animation: 0.85s ease-in 0s 1 ribbonSlideLeft;
}

.ribbon.rank-3::before {
  background-color: var(--ribbon-color-orange);
}

.rank-4 {
  width: 85%;
  background-color: var(--ribbon-color-blue);
  animation: 0.9s ease-in 0s 1 ribbonSlideLeft;
}

.ribbon.rank-4::before {
  background-color: var(--ribbon-color-blue);
}

.rank-5 {
  width: 80%;
  background-color: var(--ribbon-color-purple);
  animation: 0.95s ease-in 0s 1 ribbonSlideLeft;
}

.ribbon.rank-5::before {
  background-color: var(--ribbon-color-purple);
}

.ribbon {
  height: 60px;
  margin: 0.75em 0;
  margin-left: auto;
  transition: transform .4s ease-in-out;

  background-color: var(--bg-color);
  position: relative;
  z-index: 0;
}

.ribbon::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: -1;
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
}

.ribbon:hover {
  transform: scale(1.04);
}

.ribbon-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-height: 100%;
  /* padding-left: 6em; */
  /* padding-right: 1em; */
  /* transform: translateY(-64px); */
}

.listens {
  font-size: 1.1em;
  color: var(--bg-color);
  line-height: 1.4;
}

.artist-info {
  flex-direction: column;
  align-items: center;
  color: var(--bg-color);
  line-height: 1.4em;
}

.artist {
  justify-content: flex-end;
  margin: 0;
}

.album-art {
  max-width: 60px;
  aspect-ratio: 1;
}

.week-calendar {
  display: flex;
  flex-flow: row wrap;
}

.year-calendar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.week-calendar,
.year-calendar {
  list-style-type: none;
  gap: 0.75em;
  padding: 0;
}

.week-calendar-day,
.year-calendar-month {
  flex: 1;
  height: 100px;
  box-sizing: border-box;
}

.week-calendar-day {
  border: 2px solid var(--ribbon-color-blue);
}

.year-calendar-month {
  border: 2px solid var(--ribbon-color-orange);
  margin: 0;
}

.week-calendar-day h3,
.year-calendar-month h3 {
  display: block;
  width: 50%;
  font-size: small;
  color: var(--bg-color);
  padding: 0.2em;
  margin: 0;
}

.week-calendar-day h3 {
  background-color: var(--ribbon-color-blue);
}

.week-calendar-day.top-day {
  color: var(--bg-color);
}

.week-calendar-day-listens {
  text-align: center;
}

.year-calendar-month h3 {
  background-color: var(--ribbon-color-orange);
}

.year-calendar-month p {
  font-size: small;
  text-align: center;
}

.top-day {
  border: 4px solid var(--ribbon-color-purple);
  background-color: var(--ribbon-color-purple);
}

.top-day h3 {
  background-color: var(--ribbon-color-purple);
}

.top-album-container {
  display: flex;
  flex-direction: column;
}

.top-album-header-container.in-view {
  display: flex;
  align-items: center;
  background-color: var(--ribbon-color-blue);
  white-space: nowrap;
  height: 60px;
  width: 60%;
  margin: 1em;
  clip-path: polygon(0 0, 0% 100%, 100% 100%, 85% 0);
  animation: 0.8s ease-in 0s 1 ribbonSlideRight;
}

.top-album-header.in-view {
  margin: 0;
  padding: 0 1em;
  animation: 1s ease-in 0s 1 ribbonFadeIn;
  color: var(--bg-color);
}

.top-album-figure {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

.top-album,
.favorite-album {
  max-width: 55%;
  margin: auto;
}

.favorite-album-container {
  display: flex;
  flex-direction: column;
}

.favorite-album-header-container.in-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--ribbon-color-blue);
  text-align: right;
  white-space: nowrap;
  width: 60%;
  height: 60px;
  margin: 1em;
  margin-left: auto;
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
  animation: 0.8s ease-in 0s 1 ribbonSlideLeft;
}

.favorite-album-header.in-view {
  margin: 0.5em;
  animation: 1s ease-in 0s 1 ribbonFadeIn;
  color: var(--bg-color);
}

.favorite-album-figure {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

#favorite-album-art {
  max-width: 55%;
  margin: auto;
}

.top-tracks-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2em;
  list-style-type: none;
}

.top-tracks-list-item.in-view {
  display: flex;
  flex-direction: column;
  margin: 0.2em;
  padding: 0.5em;
  max-width: fit-content;
  box-shadow:
    0 0 0 1px var(--ribbon-color-purple),
    0 0 0 4px var(--bg-color),
    0 0 0 8px var(--ribbon-color-purple);
  position: relative;
  animation: 1s ease-in 0s 1 ribbonFadeIn;
}

.top-tracks-list-item:not(:last-child)::after {
  content: "\2193";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateY(125%);
  color: black;
}

.new-artists-list-container {
  display: flex;
  flex-direction: column;
}

.new-artists-list {
  list-style-type: none;

  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  gap: 1.2em;
}

.new-artists-list-item {
  padding: 0.25rem;
  box-shadow:
    0 0 0 1px var(--ribbon-color-blue),
    0 0 0 4px var(--bg-color),
    0 0 0 8px var(--ribbon-color-blue);
}

@keyframes ribbonSlideLeft {
  0% {
    width: 0%;
    margin-left: auto;
  }

  100% {
    margin-left: auto;
  }
}

@keyframes ribbonSlideRight {
  0% {
    width: 0%;
    margin-right: auto;
  }

  100% {
    margin-right: auto;
  }
}

@keyframes ribbonFadeIn {
  0% {
    opacity: 0%;
  }

  100% {
    opacity: 100%;
  }
}

@media screen and (max-width: 850px) {
  .rankings {
    font-size: x-small;
  }

  .ranking {
    min-width: fit-content;
  }

  .ribbon-content {
    gap: 1.2em;
  }

  .top-album-figure,
  .favorite-album-figure {
    flex-direction: column;
  }

  .top-album-header-container.in-view,
  .favorite-album-header-container.in-view {
    width: 100%;
  }

  .favorite-album-figure {
    flex-direction: column-reverse;
  }

  .week-calendar {
    display: block;
    max-width: 50%;
    margin: auto;
  }

  .week-calendar-day {
    width: 100%;
    aspect-ratio: 1;
  }

  .year-calendar {
    display: block;
    max-width: 50%;
    margin: auto;
    gap: 0.75em;
  }

  .year-calendar-month {
    margin-bottom: 0.4em;
  }
}