/* Guess what? Layout once again!!! */
:root {
  --accent: #8b46e6;
}

body {
  cursor: url(../assets/images/cursor-purple.png), default;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;

  width: 100%;
}

h1,
h2,
p {
  padding: 0;
  margin: 0;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: normal;
  color: #fffa;
}

main.box > header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  width: 100%;
}

#collections {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;

  width: 100%;
}

#collections > a {
  text-decoration: none;

  --pad: 1.5rem;
  width: calc(50% - (0.5rem * 3) - (var(--pad) * 2));
  aspect-ratio: 16/9;

  background-image: linear-gradient(to bottom, #0002, #0008), var(--bg);
  background-position: center;
  background-size: cover;

  background-color: #fff1;
  border: 2px solid #fff2;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.25rem;

  padding: var(--pad);

  transition-property: background-color, box-shadow, border;
  transition-duration: 0.25s;
}

#collections > a > span {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;

  width: 100%;
}

#collections > a > b {
  font-size: 1.5rem;
}

#collections > a > span p {
  font-size: 0.9rem;

  padding: 0.125rem 0.375rem;
  background-color: #0004;
  border: 1px solid #fff2;
  color: #fffa;

  backdrop-filter: blur(1rem);
}

#collections > a:hover {
  background-color: #fff2;
  box-shadow: 0px 0px 10px #fff8;
  border-color: #fff;

  color: #fff !important;
}

#back-view,
#image-preview button {
  padding: 0.5rem 1rem;
  text-decoration: none;
  font: inherit;

  background-color: #fff0;
  border: 2px solid #fff4;
  color: #fff;

  transition-property: background-color, border;
  transition-duration: 0.25s;
}

#back-view:hover,
#image-preview button:hover {
  background-color: #fff2;
  border-color: #fff6;
  cursor: pointer;
}

*:has(#image-preview:not(.hidden)) {
  overflow: hidden !important;
}

#image-preview {
  position: fixed;
  left: 50%;
  top: 50%;

  translate: -50% -50%;

  background-color: #0008;
  backdrop-filter: blur(1rem);
  z-index: 100;

  width: 100vw;
  height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;

  transition: opacity 0.125s;
}

#image-preview.hidden {
  opacity: 0;

  pointer-events: none;
  user-select: none;
}

#image-preview.hidden img {
  scale: 0.95;
}

#image-preview img {
  max-width: 90%;
  max-height: 80%;
  transition: scale 0.125s;
}

#image-preview footer {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  --pad: 1rem;
  width: calc(100% - var(--pad) * 2);
  padding: var(--pad);

  border: 2px solid #fff2;
}

.category > header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

  width: 100%;
}

.category > header select {
  width: 12rem;

  background-color: #000;
  border: 2px solid #fff2;
  padding: 0.5rem;
  color: #fff;

  font-family: "Iosevka Web";
  font-size: 1.25rem;
}

.category > header > a {
  text-decoration: none;
  color: inherit !important;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.category > header h1 {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;

  font-size: 1.625rem;
}

.category > header h1 > img {
  width: 2rem;
  margin-top: -2%;
  aspect-ratio: 1;
}

.category > header h1 > img.tip {
  width: 1rem;
  margin-bottom: -2%;
  aspect-ratio: 1;

  transition: transform 0.125s;
}

.category > header *[data-active="true"] img.tip {
  transform: rotateX(180deg);
}

.category > header .options {
  position: absolute;
  top: 1rem;
  left: 0;

  display: flex;
  flex-direction: column;

  list-style: none;
  opacity: 0;
  padding: 0;

  background-color: #0008;
  border: 1px solid #fff4;
  backdrop-filter: blur(1rem);

  pointer-events: none;
  z-index: 2;

  transition-property: opacity, top;
  transition-duration: 0.125s;
}

.category > header *[data-active="true"] .options {
  top: 1.5rem;
  opacity: 1;

  pointer-events: all;
}

.category > header .options li {
  width: 12rem;
  text-align: left;

  font: inherit;

  background-color: #fff0;
  color: #fff;
  border: none;

  transition: background-color 0.25s;
  padding: 0.75rem;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.category > header .options li > img {
  width: 1.25rem;
}

.category > header .options li:hover {
  background-color: #fff1;
  cursor: pointer;
}

#content-list {
  width: 100%;
  margin-top: 0.5rem;
}

.download {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 0.125rem;
  aspect-ratio: 1;

  background-color: #fff1;
  border: 1px solid #fff1;

  transition-property: background-color, border;
  transition-duration: 0.125s;
}

.download:hover {
  background-color: #fff2;
  border-color: #fff2;
}

.download img {
  width: 1.5rem;
  height: 1.5rem;
  aspect-ratio: 1;
}

#content-list[data-type="image"] {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

#content-list[data-type="image"] > button {
  width: 100%;
  padding: 0.25rem;
  aspect-ratio: 1;

  background-color: #fff1;
  border: 1px solid #fff2;
  backdrop-filter: blur(4px);

  transition-property: background-color, border;
  transition-duration: 0.25s;
}

#content-list[data-type="image"] > button:hover {
  background-color: #fff2;
  border-color: #fff4;

  cursor: pointer;
}

#content-list[data-type="image"] > button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#content-list[data-type="audio"] {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.audio-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  background-color: #fff1;
  border: 1px solid #fff2;
  padding: 1rem;

  backdrop-filter: blur(4px);
  font-size: 1.25rem;
}

.audio-wrapper span {
  display: flex;
  justify-content: space-between;

  width: 100%;
}

.audio-wrapper span i {
  opacity: 0.5;
}

#content-list[data-type="video"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.video-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  width: 100%;
  max-width: calc(100% - 2rem);

  background-color: #fff1;
  border: 1px solid #fff2;
  padding: 1rem;

  backdrop-filter: blur(4px);
  font-size: 1.25rem;
}

.video-wrapper video {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #0006;
}

.video-wrapper span {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;

  width: 100%;
}

.package-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  background-color: #fff1;
  border: 1px solid #fff2;
  padding: 1rem;

  backdrop-filter: blur(4px);
  font-size: 1.25rem;
}

.package-wrapper span {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
}

.package-wrapper span i {
  opacity: 0.5;

  margin-left: auto;
  margin-right: 1rem;

  width: max-content;
  text-align: right;
}

.package-wrapper .description {
  font-size: 1rem;
}
