* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #f5f5f5;
  color: #222;
}

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

h1 {
  margin: 0 0 10px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #111;
}

.top-link {
  margin-bottom: 28px;
}

.top-link a {
  color: #2563eb;
  text-decoration: none;
  font-size: 15px;
}

.empty {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  color: #333;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.album-row {
  display: grid;
  grid-template-columns: repeat(4, 220px);
  gap: 68px 112px;
  justify-content: start;
  align-items: start;
}

.album-item {
  min-width: 0;
  position: relative;
}

.album-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: visible;
}

.album-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  z-index: 20;
}

.disc {
  position: absolute;
  top: 16px;
  left: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 50%;
  z-index: 10;
  background:
    radial-gradient(
      circle at center,
      transparent 0 14%,
      rgba(255,255,255,0.02) 15% 20%,
      #0f0f0f 21% 100%
    );
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.04),
    inset 0 0 26px rgba(255,255,255,0.05),
    0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1), z-index 0.2s ease;
  overflow: hidden;
  pointer-events: none;
}

.disc-outer-art {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-position: center;
  background-size: cover;
  opacity: 0.94;
  -webkit-mask: radial-gradient(circle at center, transparent 0 25%, #000 26% 100%);
  mask: radial-gradient(circle at center, transparent 0 25%, #000 26% 100%);
}

.disc-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      rgba(255,255,255,0.045) 0 1px,
      rgba(0,0,0,0) 2px 7px
    );
  opacity: 0.45;
}

.disc-label-center {
  position: absolute;
  width: 27%;
  height: 27%;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,0.08);
}

.disc-hole {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #111;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}

.cover {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ddd;
  overflow: hidden;
  z-index: 20;
  box-shadow: 0 18px 34px rgba(0,0,0,0.22);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.album-item:hover .cover,
.album-item:focus-within .cover,
.album-item.is-active-disc .cover {
  transform: translateY(-6px) scale(1.02);
}

.album-item:hover .disc,
.album-item:focus-within .disc,
.album-item.is-active-disc .disc {
  transform: translateX(52%) rotate(10deg);
  z-index: 19;
}

.album-item.is-preview-spinning .disc {
  animation: trackDiscSpin 2.3s linear infinite;
}

@keyframes trackDiscSpin {
  from {
    transform: translateX(52%) rotate(0deg);
  }
  to {
    transform: translateX(52%) rotate(360deg);
  }
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d9d9d9, #bdbdbd);
  color: #444;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
}

.album-meta {
  margin-top: 14px;
  padding: 0 2px;
}

.album-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  word-break: break-word;
}

.album-artist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.album-artist-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.album-artist {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  word-break: break-word;
}

.album-genre {
  margin: 8px 0 6px;
  font-size: 13px;
  color: #444;
  font-weight: 700;
  word-break: break-word;
}

.album-stats {
  margin: 0;
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

.preview-unlock-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
}

.preview-unlock-modal.is-hidden {
  display: none;
}

.preview-unlock-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.56);
}

.preview-unlock-dialog {
  position: relative;
  width: min(92vw, 520px);
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}

.preview-unlock-dialog h2 {
  margin: 0 0 12px;
  font-size: 26px;
  color: #111;
}

.preview-unlock-text {
  margin: 0 0 18px;
  line-height: 1.8;
  color: #333;
}

.preview-unlock-button {
  min-width: 120px;
  height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .page-wrap {
    padding: 24px 14px 40px;
  }

  h1 {
    font-size: 30px;
  }

  .album-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .album-item:hover .disc,
  .album-item:focus-within .disc,
  .album-item.is-active-disc .disc {
    transform: translateX(34%) rotate(8deg);
  }

  @keyframes trackDiscSpin {
    from {
      transform: translateX(34%) rotate(0deg);
    }
    to {
      transform: translateX(34%) rotate(360deg);
    }
  }

  .album-title {
    font-size: 16px;
  }

  .album-artist,
  .album-genre,
  .album-stats {
    font-size: 12px;
  }

  .album-artist-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 520px) {
  .album-row {
    grid-template-columns: 1fr;
  }

  .album-item:hover .disc,
  .album-item:focus-within .disc,
  .album-item.is-active-disc .disc {
    transform: translateX(24%) rotate(6deg);
  }

  @keyframes trackDiscSpin {
    from {
      transform: translateX(24%) rotate(0deg);
    }
    to {
      transform: translateX(24%) rotate(360deg);
    }
  }
}

.profile-link {
  text-decoration: none;
  color: inherit;
}

.album-artist-row.profile-link:hover .album-artist {
  text-decoration: underline;
}

.track-search-form {
  margin: 0 0 68px;
  width: 100%;
}

.track-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.track-search-input,
.track-search-select {
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 14px;
  background: #fff;
  color: #222;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.track-search-input {
  width: 420px;
  max-width: 100%;
  flex: 1 1 260px;
}

.track-search-input:focus,
.track-search-select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.track-search-select {
  min-width: 180px;
  cursor: pointer;
}

.track-search-button {
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.track-search-button:hover {
  opacity: 0.92;
}

.track-search-button:active {
  transform: translateY(1px);
}

.search-result-label {
  margin: -4px 0 22px;
  font-size: 14px;
  color: #555;
  font-weight: 600;
}

.view-large .album-row {
  grid-template-columns: repeat(4, 220px);
  gap: 68px 112px;
  justify-content: start;
  align-items: start;
}

.view-medium .album-row {
  grid-template-columns: repeat(5, 170px);
  gap: 52px 48px;
  justify-content: start;
  align-items: start;
}

.view-medium .disc {
  top: 12px;
  left: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
}

.view-medium .album-title {
  font-size: 17px;
  margin-bottom: 6px;
}

.view-medium .album-artist,
.view-medium .album-genre,
.view-medium .album-stats {
  font-size: 12px;
}

.view-medium .album-artist-icon {
  width: 28px;
  height: 28px;
}

.view-medium .album-item:hover .disc,
.view-medium .album-item:focus-within .disc,
.view-medium .album-item.is-active-disc .disc {
  transform: translateX(36%) rotate(8deg);
}

.view-medium .album-item.is-preview-spinning .disc {
  animation-name: trackDiscSpinMedium;
}

@keyframes trackDiscSpinMedium {
  from {
    transform: translateX(36%) rotate(0deg);
  }
  to {
    transform: translateX(36%) rotate(360deg);
  }
}

.view-compact .album-row {
  grid-template-columns: repeat(6, 130px);
  gap: 34px 20px;
  justify-content: start;
  align-items: start;
}

.view-compact .disc {
  display: none;
}

.view-compact .album-meta {
  margin-top: 10px;
  padding: 0;
}

.view-compact .album-title {
  font-size: 14px;
  margin-bottom: 5px;
}

.view-compact .album-artist-row {
  gap: 6px;
  margin-top: 6px;
}

.view-compact .album-artist-icon {
  width: 24px;
  height: 24px;
}

.view-compact .album-artist,
.view-compact .album-genre,
.view-compact .album-stats {
  font-size: 11px;
}

.view-compact .album-genre {
  margin: 6px 0 4px;
}

.view-list .album-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view-list .album-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.view-list .album-visual {
  width: 76px;
  min-width: 76px;
  aspect-ratio: 1 / 1;
}

.view-list .disc {
  display: none;
}

.view-list .album-card {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.view-list .cover {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  box-shadow: none;
}

.view-list .cover img,
.view-list .cover-fallback {
  border-radius: 12px;
}

.view-list .album-meta {
  margin-top: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.view-list .album-title {
  order: 2;
  margin: 0;
  min-width: 0;
  flex: 1 1 220px;
  font-size: 18px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-list .album-artist-row {
  order: 3;
  margin-top: 0;
  display: contents;
}

.view-list .profile-icon-link {
  order: 3;
  display: inline-flex;
  align-items: center;
}

.view-list .profile-name-link {
  order: 4;
  display: inline-flex;
  align-items: center;
}

.view-list .album-artist-icon {
  width: 28px;
  height: 28px;
}

.view-list .album-artist {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.view-list .album-genre {
  order: 5;
  margin: 0 0 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.view-list .album-stats {
  order: 6;
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
}

.view-list .album-item:hover .cover,
.view-list .album-item:focus-within .cover,
.view-list .album-item.is-active-disc .cover {
  transform: none;
}

.page-current-label {
  margin-left: 8px;
  color: #777;
  font-size: 13px;
}

.pagination {
  margin-top: 36px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.page-link {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d1d5db;
  color: #222;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.page-link:hover {
  background: #f3f4f6;
}

.page-link.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.page-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.track-search-input-wrap {
  position: relative;
  width: min(420px, 100%);
  flex: 1 1 260px;
}

.track-search-input-wrap .track-search-input {
  width: 100%;
  padding-right: 44px;
}

.track-search-clear-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #e5e7eb;
  color: #444;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.track-search-clear-button:hover {
  background: #d1d5db;
}

.track-search-clear-button.is-hidden {
  display: none;
}

.track-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 50;
}

.track-search-suggestion-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.track-search-suggestion-item:hover,
.track-search-suggestion-item.is-active {
  background: #f3f4f6;
}

.track-search-suggestion-item.is-exact {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.track-search-suggestion-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.track-search-suggestion-type {
  font-size: 11px;
  font-weight: 700;
  color: #666;
}

.track-search-suggestion-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.track-search-suggestion-label {
  font-size: 14px;
  color: #111;
  font-weight: 700;
}
