/* =================== FONTS =================== */
@font-face {
  font-family: "CircularStd";
  src: url("/fonts/CircularStd-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CircularStd";
  src: url("/fonts/CircularStd-Book.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CircularStd";
  src: url("/fonts/CircularStd-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CircularStd";
  src: url("/fonts/CircularStd-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CircularStd";
  src: url("/fonts/CircularStd-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* =================== RESET =================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: "CircularStd", system-ui, sans-serif;
  background: #000;
  margin: 10px;
}

/* =================== LAYOUT =================== */
.layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "menu       main main"
    "biblioteca main main";
  gap: 8px;
  height: 100vh;
}

.menu,
.biblioteca,
.main {
  border-radius: 10px;
  background: #121212;
}

/* =================== MENÚ =================== */
.menu {
  grid-area: menu;
  padding: 10px 0 10px;
}

.menu nav ul {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1em;
  justify-content: center;
  align-items: center;
}

.menu nav ul li {
  width: 90%;
  display: flex;
  padding: 5px;
}

.menu nav ul li a {
  display: flex;
  gap: 1em;
  text-decoration: none;
  color: #b3b3b3;
  font-weight: bold;
  align-items: end;
  transition: 0.3s ease-in-out;
}

.menu nav ul li a:hover,
.biblioteca a:hover {
  color: #fff;
}

/* =================== BIBLIOTECA =================== */
.biblioteca {
  grid-area: biblioteca;
  padding: 5px;
}

.biblioteca a {
  width: fit-content;
  padding: 10px 5px 5px 5px;
  color: #b3b3b3;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  justify-content: flex-start;
  align-items: end;
  gap: 1em;
  margin: 0 0 0 12px;
}

/* =================== CONTENEDOR DE PLAYLIST =================== */
.container {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px;
}

.card-playlist {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.1s ease-in-out;
}

.card-playlist:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.card-playlist img {
  width: 70px;
  height: 70px;
  border-radius: 15px;
  padding: 10px;
}

.card-playlist .info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-playlist .info h3 {
  font-size: 0.9em;
  color: #f9f9f9;
}

.card-playlist .info p {
  color: #6f6f6f;
  font-size: 0.8em;
  font-weight: 600;
}

/* =================== SECCIÓN PRINCIPAL =================== */
.main {
  grid-area: main;
  background: linear-gradient(to bottom, #0f3f3a 0%, #121212 60%, #000000 100%);
}

.main h2 {
  color: #fff;
  padding: 30px;
}

.playlist-container {
  display: flex;
  padding: 0 35px;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.playlist-card {
  width: 150px;
  padding: 6px 6px 20px;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease-in-out;
}

.play-button {
  display: none;
  width: 30px;
  border-radius: 50%;
  background-color: #1ed760;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out,
    transform 0.2s ease-in-out;
}

.playlist-card:hover {
  background-color: rgba(255, 255, 255, 0.1);
  .play-button {
    display: block;
    position: absolute;
    right: 10px;
    bottom: 70px;
  }
}

.play-button:hover {
  background-color: #1aba4a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}

.playlist-card img {
  width: 100%;
  height: 130px;
  border-radius: 5px;
}

.playlist-card .info {
  padding: 2px;
  position: relative;
}

.playlist-card h3 {
  color: #fff;
  font-size: 0.9em;
  font-weight: 500;
}

.playlist-card p {
  color: #6f6f6f;
  font-weight: 600;
  font-size: 0.8em;
}

/* =================== REPRODUCTOR =================== */
.reproductor {
  width: 100%;
  background: #000;
  position: fixed;
  padding: 20px;
  bottom: 0;
  color: #fff;
}

.reproductor-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.reproductor-container > svg {
  position: relative;
  color: #000;
  background: #fff;
  border-radius: 50%;
  width: 30px;
  cursor: pointer;
}

.reproductor .timeline {
  width: 30%;
  background-color: #535353;
  border-radius: 50px;
  border: none;
  padding: 1.5px;
}

@media (min-width: 1200px) {
  .playlist-container {
    justify-content: flex-start;
  }
}

/* Tablets */
@media (max-width: 1023px) and (min-width: 768px) {
  .layout {
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "main main"
      "biblioteca biblioteca"
      "menu menu";
    height: auto;
  }

  .main {
    order: 1;
  }

  .biblioteca {
    order: 2;
    padding-right: 10px;
  }

  .menu {
    order: 3;
  }

  .reproductor {
    display: none;
  }
}

/* Móviles */
@media (max-width: 767px) {
  .layout {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .main {
    order: 1;
  }

  .biblioteca {
    order: 2;
    padding-right: 10px;
  }

  .menu {
    order: 3;
  }

  .reproductor {
    display: none;
  }
}

html,
body {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
}
