@import url("https://fonts.googleapis.com/css2?family=Reem+Kufi+Fun:wght@400..700&display=swap");

:root {
  --pink: hsl(338, 70%, 55%);
  --teal: hsl(183, 70%, 62%);
  --white: hsl(334, 7%, 95%);
}

html {
  font-size: 62.5%;
}

body {
  background: hsl(224, 32%, 12%);
  background-image: conic-gradient(from 0deg at 50% 50%,
      blue,
      purple,
      purple,
      blue);
  background-blend-mode: multiply;

  font-family: "Reem Kufi Fun", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 1.6rem;

  color: var(--white);
}

.container {
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 80rem;
  margin: 0 auto;
  max-width: calc(80rem - 2rem);
  margin: 0 auto;
  padding: 0 1rem;
}

h1 {
  text-align: center;
  font-size: 3rem;
  font-family: serif;
}

h2 {
  text-align: center;
  font-size: 2rem;
}

.text {
  text-align: center;
  font-size: 1.6rem;
}

.pre {
  --selector: var(--pink);
  --property: var(--teal);
  --punctuation: var(--white);
  --undefined: var(--white);

  color: var(--undefined);
  background: hsl(222, 45%, 7%);
  max-width: 50rem;

  position: relative;

  transform-style: preserve-3d;
  transform: perspective(5000px) rotateY(var(--rotateX)) rotateX(var(--rotateY));
  margin-bottom: 5rem;
}

.pre>* {
  box-shadow: 0 0 0.3em currentColor;
}

.pre>img {
  max-width: 100%;
}

.pre::before,
.pre::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

/* shadow */
.pre::before {
  inset: 0.75rem;
  border-radius: inherit;
  background: black;
  z-index: -1;
  transform: translateZ(-50px);
  filter: blur(15px);
  opacity: 0.5;
}

/* gradient thingy */
.pre::after {
  z-index: -2;
  inset: -1rem;
  background: linear-gradient(-45deg, rgb(255, 251, 243), rgb(255, 255, 255));
  transform: translateZ(-50px);
}

.selector {
  color: var(--selector);
}

.property {
  color: var(--property);
}

.punctuation {
  color: var(--punctuation);
}

.property+.punctuation {
  color: var(--property);
}

.pre-container {
  position: relative;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
}

.yt {
  position: fixed;
  bottom: 1.5rem;
  color: #bcbcbc;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
}

/* stars.gif gif on background hover */
li:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 260%;
  transform: translateY(-50%);
  background-image: url("public/stars.gif");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

li:hover a {
  color: #ffd700;
  cursor: pointer;
}

li:hover:after {
  opacity: 1;
  transform: translateY(-50%) scale(1.2);
}


a {
  color: var(--white);
}

footer {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 10rem;
}