* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #171313;
  color: #f4eee7;
}

header {
  padding: 40px;
  background-color: #251b1b;
  border-bottom: 1px solid #6f4e37;
  text-align: center;
}

header h1 {
  margin: 50px;
  font-size: 48px;
  letter-spacing: 2px;
  color: #f7d9a8;
}

header p {
  margin: 10 px;
  color: #d8c7b4;
}

nav {
  margin-top: 20px;
}

nav a {
  color: #f4eee7;
  text-decoration: none;
  margin-right: 20px;
  padding: 8px 14px;
  border: 1px solid #6f4e37;
  border-radius: 20px;
}

nav a:hover {
  background-color: #6f4e37;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

section {
  margin-bottom: 50px;
}

h2 {
  color: #f7d9a8;
  font-size: 32px;
  margin-bottom: 20px;
}

h3 {
  color: #ffffff;
}

p {
  line-height: 1.5;
}

footer {
  padding: 25px 40px;
  background-color: #251b1b;
  color: #d8c7b4;
  text-align: center;
  border-top: 1px solid #6f4e37;
}

/* estilo de catalogo.js  */

#contenedor-catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.card-album {
  background-color: #241d1d;
  border: 2px solid #6f4e37;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.vinilo-mini {
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #d8a45f 0 12%, #111 13% 24%, #222 25% 45%, #111 46% 60%, #222 61% 100%);
  border: 4px solid #050505;
}

.info-album h3 {
  margin-top: 0;
  color: #f7d9a8;
}

.info-album p {
  margin: 8px 0;
  color: #e5d7c7;
}

.boton {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  background-color: #a86f3c;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
}

.boton:hover {
  background-color: #c2864a;
}

/* estilo de destacado en index.html */

.card-destacado {
  display: flex;
  align-items: center;
  gap: 35px;
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 28px;
  padding: 35px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.vinilo-grande {
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #d8a45f 0 11%, #111 12% 24%, #222 25% 42%, #111 43% 58%, #242424 59% 100%);
  border: 6px solid #050505;
}

.info-destacado h3 {
  font-size: 34px;
  margin: 8px 0 15px;
  color: #f7d9a8;
}

.info-destacado p {
  color: #e5d7c7;
}

.etiqueta {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: #6f4e37;
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* hacerlo responsive */

@media (max-width: 700px) {
  .card-destacado {
    flex-direction: column;
    text-align: center;
  }

  .vinilo-grande {
    width: 170px;
    height: 170px;
  }

  header h1 {
    font-size: 36px;
  }

  .detalle-album {
    flex-direction: column;
    text-align: center;
  }

  .vinilo-detalle {
    width: 190px;
    height: 190px;
  }
}

/* estilo de detalle.js */

.detalle-album {
  display: flex;
  align-items: center;
  gap: 40px;
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.vinilo-detalle {
  width: 260px;
  height: 260px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #d8a45f 0 10%, #111 11% 22%, #222 23% 40%, #111 41% 56%, #242424 57% 100%);
  border: 8px solid #050505;
}

.info-detalle h3 {
  font-size: 38px;
  margin: 8px 0 18px;
  color: #f7d9a8;
}

.info-detalle p {
  color: #e5d7c7;
}

.seccion-relacionados {
  margin-top: 50px;
}

#albumes-relacionados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card-relacionado {
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 20px;
  padding: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-relacionado:hover {
  transform: scale(1.04);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.portada-relacionado {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid #6f4e37;
  transition: transform 0.3s ease;
}

.card-relacionado:hover .portada-relacionado {
  transform: scale(1.05);
}

#albumes-relacionados h4 {
  color: #f7d9a8;
}

#albumes-relacionados a {
  color: #ffffff;
}

/* estilo formulario */

form {
  max-width: 700px;
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 28px;
  padding: 35px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

form div {
  margin-bottom: 22px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #f7d9a8;
  font-weight: bold;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #6f4e37;
  border-radius: 14px;
  background-color: #171313;
  color: #f4eee7;
  font-family: Arial, Helvetica, sans-serif;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f7d9a8;
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 22px;
  background-color: #a86f3c;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #c2864a;
}

#error-titulo,
#error-artista,
#error-genero,
#error-anio,
#error-duracion,
#error-formato,
#error-mood,
#error-comentario {
  margin: 6px 0 0;
  color: #ff9f9f;
  font-size: 14px;
}

#mensaje-confirmacion {
  margin-top: 20px;
  color: #a8f7c1;
  font-weight: bold;
}

/* estilo de carrousel para ultimos agregados en pagina de inicio*/

#ultimos-albums {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 10px 5px 25px;
  scroll-behavior: smooth;
}

#ultimos-albums::-webkit-scrollbar {
  height: 8px;
}

#ultimos-albums::-webkit-scrollbar-track {
  background-color: #171313;
  border-radius: 20px;
}

#ultimos-albums::-webkit-scrollbar-thumb {
  background-color: #6f4e37;
  border-radius: 20px;
}

.card-ultimo-album {
  min-width: 260px;
  max-width: 260px;
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 24px;
  padding: 22px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-ultimo-album:hover {
  transform: scale(1.06);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
}

.vinilo-ultimo {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #d8a45f 0 12%, #111 13% 24%, #222 25% 45%, #111 46% 60%, #222 61% 100%);
  border: 4px solid #050505;
}

.card-ultimo-album h3 {
  color: #f7d9a8;
  margin-top: 0;
}

.card-ultimo-album p {
  color: #e5d7c7;
}

/* estilo de panel de filtros */

.panel-filtros {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 18px;
  align-items: end;
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 35px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.panel-filtros label {
  color: #f7d9a8;
  font-size: 14px;
}

.panel-filtros input,
.panel-filtros select {
  margin-top: 8px;
}

.acciones-filtros {
  display: flex;
  align-items: end;
}

/* TOCADISCOS */

.tocadiscos {
  position: relative;
  width: 320px;
  min-height: 390px;
  background: linear-gradient(135deg, #2b2020, #171313);
  border: 1px solid #6f4e37;
  border-radius: 32px;
  padding: 28px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.tocadiscos .vinilo-detalle {
  margin: 0 auto 25px;
}

.brazo-tocadiscos {
  position: absolute;
  width: 95px;
  height: 8px;
  background-color: #caa06a;
  top: 85px;
  right: 28px;
  transform: rotate(32deg);
  transform-origin: right center;
  border-radius: 10px;
}

.brazo-tocadiscos::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background-color: #f7d9a8;
  border-radius: 50%;
  left: -8px;
  top: -5px;
}

.boton-reproductor {
  margin-top: 10px;
}

#estado-reproductor {
  margin-top: 15px;
  color: #d8c7b4;
  font-size: 14px;
}

.girando {
  animation: girarDisco 2.8s linear infinite;
}

@keyframes girarDisco {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* estilo de portadas catalogo */

.portada-album {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 20px;
  border: 2px solid #6f4e37;
}

.card-album {
  overflow: hidden;
}

.portada-album {
  transition: transform 0.3s ease;
}

.card-album:hover .portada-album {
  transform: scale(1.05);
}

/* estilo de lluvia de vinilos */

#lluvia-vinilos {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.vinilo-cayendo {
  position: absolute;
  top: -120px;
  opacity: 0.85;
  animation-name: caerVinilo;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes caerVinilo {
  0% {
    transform: translateY(-120px) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.75;
  }

  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* JS crea vinilos dinámicamente
CSS los anima cayendo
Math.random() define posición, tamaño, duración y delay*/

/* estilo header */

.hero-video {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 35px;
  margin-bottom: -40px;
  height: 720px;
  overflow: hidden;
  border-top: 1px solid #6f4e37;
  border-bottom: 1px solid #6f4e37;
}

.hero-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-video {
  position: relative;
}

.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(23, 19, 19, 0.35);
  pointer-events: none;
}

/* portadas de inicio */

.portada-destacada {
  width: 360px;
  height: 360px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid #6f4e37;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

.portada-ultimo {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
  border: 1px solid #6f4e37;
}

/* hover */

.portada-destacada,
.portada-ultimo {
  transition: transform 0.3s ease;
}

.card-destacado:hover .portada-destacada {
  transform: scale(1.08);
}

.card-ultimo-album:hover .portada-ultimo {
  transform: scale(1.08);
}

.seccion-moods {
  margin-top: 40px;
  margin-bottom: 60px;
}

.mood-marquee {
  width: 100%;
  overflow: hidden;
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 28px;
  padding: 18px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.mood-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: moverMoods 24s linear infinite;
}

.mood-track span {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 24px;
  background-color: #171313;
  color: #f7d9a8;
  border: 1px solid #6f4e37;
  font-size: 14px;
  letter-spacing: 2px;
  white-space: nowrap;
}

@keyframes moverMoods {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.mood-marquee:hover .mood-track {
  animation-play-state: paused;
}

/* suavizar scroll personalizar la barra */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: #171313;
}

::-webkit-scrollbar-thumb {
  background-color: #6f4e37;
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a86f3c;
}

/* secciones entran mas suave */

section {
  scroll-margin-top: 40px;
}

/*  resumen bibblioteca en inicio */

.resumen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.resumen-grid div {
  background-color: #241d1d;
  border: 1px solid #6f4e37;
  border-radius: 24px;
  padding: 24px;
  text-align: center;
}

.resumen-grid h3 {
  font-size: 42px;
  margin: 0;
  color: #f7d9a8;
}

.resumen-grid p {
  color: #d8c7b4;
}

/*fade en las tajetas*/

.card-album,
.card-destacado,
.card-ultimo-album,
.detalle-album,
.card-relacionado {
  animation: aparecerSuave 0.9s ease both;
}

@keyframes aparecerSuave {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*grilla al final del inicio*/

.seccion-galeria {
  margin-top: 70px;
}

.seccion-galeria p {
  color: #d8c7b4;
  margin-bottom: 25px;
}

#galeria-portadas {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.item-galeria {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #6f4e37;
  aspect-ratio: 1 / 1;
  background-color: #241d1d;
}

.item-galeria img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.overlay-galeria {
  position: absolute;
  inset: 0;
  background: rgba(23, 19, 19, 0.72);
  color: #f4eee7;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay-galeria h3 {
  margin: 0 0 6px;
  color: #f7d9a8;
  font-size: 18px;
}

.overlay-galeria p {
  margin: 0;
  color: #e5d7c7;
  font-size: 14px;
}

.item-galeria:hover img {
  transform: scale(1.12);
  filter: contrast(1.1) brightness(0.75);
}

.item-galeria:hover .overlay-galeria {
  opacity: 1;
}

/* BIENVENIDA */

.bienvenida-home {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 32px;
  align-items: center;
  margin-top: 50px;
  margin-bottom: 60px;
  padding: 42px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(247, 217, 168, 0.18), transparent 35%),
    linear-gradient(135deg, #241d1d, #171313);
  border: 1px solid #6f4e37;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.bienvenida-texto h2 {
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.95;
  margin: 14px 0 22px;
  max-width: 850px;
  color: #f4eee7;
  letter-spacing: -2px;
}

.texto-bienvenida {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.6;
  color: #d8c7b4;
}

.acciones-bienvenida {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.boton-secundario {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 24px;
  border: 1px solid #6f4e37;
  color: #f7d9a8;
  text-decoration: none;
  background-color: transparent;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.boton-secundario:hover {
  transform: translateY(-3px);
  background-color: #2f2522;
}

.bienvenida-card {
  position: relative;
  min-height: 260px;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(rgba(23, 19, 19, 0.2), rgba(23, 19, 19, 0.85)),
    background-size: 85%;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid #6f4e37;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.bienvenida-card::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background-color: rgba(247, 217, 168, 0.08);
  top: -45px;
  right: -45px;
}

.bienvenida-card span {
  position: relative;
  display: inline-block;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 20px;
  background-color: #171313;
  color: #f7d9a8;
  border: 1px solid #6f4e37;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.bienvenida-card h3 {
  position: relative;
  font-size: 34px;
  margin: 18px 0 8px;
  color: #f4eee7;
}

.bienvenida-card p {
  position: relative;
  color: #d8c7b4;
  margin: 0;
}

/*responsive celular*/

@media (max-width: 850px) {
  .bienvenida-home {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .bienvenida-texto h2 {
    font-size: 38px;
    letter-spacing: -1px;
  }

  .bienvenida-card {
    min-height: 220px;
  }
}

/*animacion suave de entrada*/

.bienvenida-home {
  animation: aparecerBienvenida 0.8s ease both;
}

@keyframes aparecerBienvenida {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*album random que suena en el inicio*/

.portada-now-playing {
  position: relative;
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid #6f4e37;
  margin: 18px 0;
  z-index: 2;
}

#now-playing-card .boton-reproductor {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin-top: 16px;
}

.now-playing-activo {
  box-shadow: 0 0 35px rgba(247, 217, 168, 0.22);
}

.now-playing-activo .portada-now-playing {
  animation: pulsoPortada 1.5s ease-in-out infinite alternate;
}

@keyframes pulsoPortada {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}