/* ===== Music Player Styles ===== */
.player-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  align-items: center;
/*   border: 1px solid var(--card-border);
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--card-border); */
  padding: 1rem;
  max-width: 500px;
  width: 100%;
  margin-bottom: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  background-color: transparent;
  background-image:
    linear-gradient(#e2e2e2 1px, transparent 1px),
    linear-gradient(90deg, #e2e2e2 1px, transparent 1px);
  background-size: 5px 5px;
}

[data-theme="dark"] .player-card {
  background-color: rgba(10, 10, 10, 0.75);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 5px 5px;
}

.cover {
  background: var(--card-bg);
  grid-row: 1 / span 2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: -1rem 0 -1rem -1rem;
  width: calc(120px + 1rem);
  aspect-ratio: 1;
}

.info {
  align-self: start;
  min-width: 0; /* Allows text to shrink */
}

.title {
  font-size: 1rem;
  font-weight: 1;
  text-decoration: underline;
  margin: 0;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist {
  font-size: 0.7rem;
  font-weight: 200;
  text-decoration: underline;
  margin: 0.2rem 0 0 0;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  font-family: "Times New Roman", serif;
  font-size: 14px;
  color: var(--fg);
  white-space: nowrap;
  min-width: 3.2rem;
  text-align: left;
}

.play-btn:hover {
  text-decoration: underline;
}

.play-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.progress-container {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  grid-row: 2;
  min-width: 0;
}

.progress {
  flex: 1;
  height: 4px;
  background: rgba(159, 159, 159, 0.182);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  min-width: 60px;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--fg);
  transition: width 0.1s linear;
  border-radius: 0px;
  pointer-events: none;
}

.time {
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--fg);
  flex-shrink: 0;
}
#titleLinkStyle {
  color: var(--fg);
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablets and smaller */
@media (max-width: 600px) {
  .player-card {
    grid-template-columns: 100px 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .cover {
    width: calc(100px + 0.75rem);
    margin: -0.75rem 0 -0.75rem -0.75rem;
  }

  .title {
    font-size: 1.2rem;
  }

  .artist {
    font-size: 0.9rem;
  }
}

/* Mobile phones */
@media (max-width: 400px) {
  .player-card {
    grid-template-columns: 80px 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .cover {
    width: calc(80px + 0.5rem);
    margin: -0.5rem 0 -0.5rem -0.5rem;
  }

  .title {
    font-size: 0.9rem;
  }

  .artist {
    font-size: 0.7rem;
  }

  .time {
    font-size: 0.7rem;
  }

  .progress-container {
    gap: 0.3rem;
  }
}

