:root {
  --background: #050505;
  --panel: #101010;
  --panel-soft: #171717;
  --text: #f7f7f7;
  --muted: #a3a3a3;
  --border: #292929;
  --red: #d71920;
  --red-dark: #8d0f14;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(215, 25, 32, 0.13), transparent 32rem),
    var(--background);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

.albums-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.albums-hero {
  max-width: 760px;
  margin-bottom: 32px;
}

.albums-back-link {
  display: inline-flex;
  margin-bottom: 48px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.albums-eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.albums-description,
.album-copy {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.albums-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(16, 16, 16, 0.86);
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-value {
  font-size: 2rem;
}

.status-message {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: var(--panel);
}

.status-message[hidden] {
  display: none;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.album-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.album-card:hover {
  transform: translateY(-5px);
  border-color: rgba(215, 25, 32, 0.75);
}

.album-card-button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
}

.album-cover,
.album-detail-artwork {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(215, 25, 32, 0.85), rgba(35, 0, 2, 0.2)),
    #1b1b1b;
}

.album-cover {
  aspect-ratio: 1;
}

.album-cover img,
.album-detail-artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.album-cover-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 24px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-align: center;
}

.album-card-body {
  padding: 18px;
}

.album-card-title {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.album-card-artist,
.album-card-count {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.album-detail {
  margin-top: 24px;
}

.album-detail-header {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 40px;
  align-items: end;
}

.back-button {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  background: var(--panel);
}

.album-detail-artwork {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.album-detail-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.album-artist {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
}

.album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.album-meta span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
}

.tracklist-section {
  margin-top: 52px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
}

.tracklist-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.tracklist-heading h3 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.tracklist-heading span {
  color: var(--muted);
}

.songs-list {
  display: grid;
  gap: 10px;
}

.song-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--panel-soft);
}

.song-number {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.song-title {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.empty-songs {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 800px) {
  .albums-page {
    width: min(100% - 22px, 1240px);
    padding-top: 28px;
  }

  .albums-back-link {
    margin-bottom: 32px;
  }

  .album-detail-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tracklist-section {
    padding: 18px;
  }
}
