:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

a[href='#descarga'],
[data-download-link] {
  color: #050508 !important;
}

[data-download-link] {
  background: #ff8a1f;
}

[data-download-link]:hover {
  background: #ff9d3f;
}

.hero-phone {
  width: min(100%, 390px);
  animation: phone-float 5.5s ease-in-out infinite;
  perspective: 1200px;
}

.phone-shell {
  position: relative;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3.25rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 34%, rgba(0, 0, 0, 0.85));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.65),
    0 0 70px rgba(20, 241, 217, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(1.5deg);
}

.phone-shell::before {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  z-index: 4;
  width: 5rem;
  height: 1rem;
  border-radius: 999px;
  background: #050508;
  content: '';
  transform: translateX(-50%);
}

.phone-viewport {
  position: relative;
  aspect-ratio: 9 / 17.6;
  overflow: hidden;
  border-radius: 2.65rem;
  background: #111216;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: #111216;
  color: #f8fafc;
  opacity: 0;
}

.player-screen {
  animation: player-view 10s ease-in-out infinite;
}

.library-screen {
  animation: library-view 10s ease-in-out infinite;
}

.phone-status,
.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 800;
}

.player-top {
  display: grid;
  grid-template-columns: 1.5rem 1fr 1.5rem;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
  text-align: center;
}

.player-top p {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-top strong {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.9rem;
}

.album-art {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  margin-top: 1.7rem;
  overflow: hidden;
  place-items: center;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.12), transparent 22%),
    radial-gradient(circle at 20% 20%, rgba(255, 138, 31, 0.42), transparent 32%),
    radial-gradient(circle at 78% 30%, rgba(29, 245, 157, 0.35), transparent 34%),
    radial-gradient(circle at 75% 78%, rgba(47, 140, 255, 0.42), transparent 34%),
    linear-gradient(135deg, #050508, #121526 45%, #050508);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.album-art::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  content: '';
  opacity: 0.18;
}

.album-art img {
  position: relative;
  z-index: 1;
  width: 52%;
  border-radius: 1.7rem;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55);
}

.album-equalizer {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  align-items: end;
  gap: 0.25rem;
  height: 2.4rem;
}

.album-equalizer span {
  width: 0.25rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #14f1d9, #2f8cff);
  animation: eq 780ms ease-in-out infinite alternate;
}

.album-equalizer span:nth-child(2) {
  animation-delay: 110ms;
}

.album-equalizer span:nth-child(3) {
  animation-delay: 220ms;
}

.album-equalizer span:nth-child(4) {
  animation-delay: 330ms;
}

.album-equalizer span:nth-child(5) {
  animation-delay: 440ms;
}

.track-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.55rem;
}

.track-meta h3 {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.track-meta p {
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.track-meta span {
  display: block;
  margin-top: 0.18rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

.track-meta i {
  font-size: 1.9rem;
}

.phone-progress {
  position: relative;
  height: 0.22rem;
  margin-top: 2.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.phone-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 24%;
  border-radius: inherit;
  background: #f8fafc;
  animation: progress-slide 10s linear infinite;
}

.phone-progress span::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: #f8fafc;
  content: '';
  transform: translate(50%, -50%);
}

.time-row {
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
}

.player-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.6rem;
  text-align: center;
}

.player-controls i {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.8rem;
}

.player-controls i.active {
  color: #14f1d9;
}

.player-controls button {
  display: grid;
  width: 4.75rem;
  height: 4.75rem;
  margin-inline: auto;
  place-items: center;
  border-radius: 999px;
  background: #14f1d9;
  color: #050508;
  box-shadow: 0 20px 40px rgba(20, 241, 217, 0.28);
}

.player-controls button i {
  color: #050508;
  font-size: 2.15rem;
}

.player-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  margin-top: auto;
  padding-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.86);
}

.player-footer strong {
  color: #14f1d9;
}

.player-footer span {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
}

.library-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.library-header > span {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 0.45rem;
  font-size: 1.2rem;
}

.library-header h3 {
  font-size: 1.75rem;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.library-header p {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
  font-weight: 800;
}

.library-tabs {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.45rem;
}

.library-tabs span {
  border-radius: 999px;
  background: #1f2329;
  padding: 0.72rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 800;
}

.library-tabs span.active {
  background: #14f1d9;
  color: #050508;
}

.library-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  font-size: 1.6rem;
}

.library-actions button {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 999px;
  background: #14f1d9;
  color: #050508;
}

.library-actions .fa-folder {
  justify-self: end;
}

.song-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
  overflow: hidden;
}

.song-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.65rem;
  color: rgba(255, 255, 255, 0.86);
}

.song-row.active {
  border-radius: 1rem;
  background: rgba(20, 241, 217, 0.1);
}

.song-row strong,
.mini-player strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-row p,
.mini-player p {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-cover {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: 0.55rem;
  background-size: cover;
  background-position: center;
}

.cover-one {
  background-image: url('../img/favicon.png');
}

.cover-two {
  background-image: linear-gradient(135deg, #7c2d12, #facc15, #111827);
}

.cover-three {
  background-image: linear-gradient(135deg, #111827, #e5e7eb, #111827);
}

.cover-four {
  background-image: linear-gradient(135deg, #0891b2, #84cc16, #7c2d12);
}

.mini-player {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  border-radius: 1.25rem;
  background: #24292f;
  padding: 0.7rem;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.mini-player .song-cover {
  width: 2.7rem;
  height: 2.7rem;
}

.mini-player i {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.56rem;
  text-align: center;
}

.bottom-nav span {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
}

.bottom-nav i {
  font-size: 1.25rem;
}

.bottom-nav .active {
  color: #f8fafc;
}

@keyframes phone-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes player-view {
  0%,
  43% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  50%,
  93% {
    opacity: 0;
    transform: translateX(-18px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes library-view {
  0%,
  43% {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }

  50%,
  93% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }
}

@keyframes progress-slide {
  0% {
    width: 8%;
  }

  45% {
    width: 58%;
  }

  100% {
    width: 82%;
  }
}

.mosaic-field {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #050508;
  background-size: 56px 56px;
}

.mosaic-field::before {
  position: absolute;
  inset: 0;
  content: '';
  background-image:
    linear-gradient(135deg, rgba(255, 138, 31, 0.18), transparent 24%),
    linear-gradient(225deg, rgba(29, 245, 157, 0.15), transparent 26%),
    linear-gradient(315deg, rgba(47, 140, 255, 0.16), transparent 28%),
    linear-gradient(45deg, rgba(155, 92, 255, 0.18), transparent 28%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 78%);
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-lines {
  position: relative;
}

.menu-lines::before,
.menu-lines::after {
  position: absolute;
  left: 0;
  content: '';
}

.menu-lines::before {
  top: -6px;
}

.menu-lines::after {
  top: 6px;
}

[data-menu-button][aria-expanded='true'] .menu-lines {
  transform: rotate(45deg);
}

[data-menu-button][aria-expanded='true'] .menu-lines::before {
  transform: translateY(6px) rotate(90deg);
}

[data-menu-button][aria-expanded='true'] .menu-lines::after {
  opacity: 0;
}

@keyframes eq {
  from {
    height: 12px;
  }

  to {
    height: 40px;
  }
}

.feature-card {
  min-height: 290px;
  border-width: 1px;
  border-style: solid;
  border-radius: 2rem;
  padding: 1.5rem;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.075);
}

.feature-card h3 {
  margin-top: 4rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.feature-card p {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
}

.feature-icon {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 1.25rem;
  font-weight: 900;
}

.feature-icon i {
  font-size: 1.35rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-phone,
  .player-screen,
  .library-screen,
  .phone-progress span,
  .album-equalizer span {
    animation: none !important;
  }

  .player-screen {
    opacity: 1;
    transform: none;
  }

  .library-screen {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .hero-phone {
    width: min(100%, 330px);
  }

  .phone-shell {
    border-radius: 2.8rem;
    padding: 0.55rem;
  }

  .phone-viewport {
    border-radius: 2.25rem;
  }

  .phone-screen {
    padding: 0.85rem;
  }

  .album-art {
    margin-top: 1.15rem;
  }

  .track-meta {
    margin-top: 1rem;
  }

  .track-meta h3 {
    font-size: 1.3rem;
  }

  .phone-progress {
    margin-top: 1.45rem;
  }

  .player-controls {
    margin-top: 1rem;
  }

  .player-controls i {
    font-size: 1.45rem;
  }

  .player-controls button {
    width: 4rem;
    height: 4rem;
  }

  .player-controls button i {
    font-size: 1.8rem;
  }

  .player-footer {
    gap: 1rem;
  }

  .player-footer span {
    width: 2.55rem;
    height: 2.55rem;
  }

  .library-header {
    margin-top: 1.45rem;
  }

  .library-header h3 {
    font-size: 1.45rem;
  }

  .library-tabs span {
    padding: 0.62rem 0.8rem;
    font-size: 0.78rem;
  }

  .library-actions button {
    width: 3.35rem;
    height: 3.35rem;
  }

  .song-row {
    min-height: 3.25rem;
  }

  .song-cover {
    width: 2.55rem;
    height: 2.55rem;
  }

  .bottom-nav {
    font-size: 0.5rem;
  }

  .bottom-nav i {
    font-size: 1.05rem;
  }

  .feature-card {
    min-height: auto;
  }
}
