/* FattMack — McKenzie 2.0 (mobile-first, DatPiff-inspired)
   Design reference: assets/figma/design-reference-full.png (402px frame) */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: #f1f1f1;
  color: #000;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 430px;
  margin: 0 auto;
  background: #f1f1f1;
  overflow-x: clip;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 99px;
}

.sky {
  position: absolute;
  inset: 0 0 24px 0;
  background: url('assets/header/top-background.png') center / cover no-repeat;
}

.logo {
  position: absolute;
  top: 19px;
  left: 32px;
  width: 75px;
  z-index: 2;
}

.logo img { width: 100%; height: auto; display: block; }

.nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: url('assets/header/menu-back.png') center / cover no-repeat;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 8px;
  gap: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 24px;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #99a2a4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.nav-link.is-active {
  color: #fff;
  width: 97px;
  height: 36px;
  margin-top: -8px;
  background: url('assets/figma/navbutton-active.png') center / 100% 100% no-repeat;
}

/* ===== Mixtape card ===== */

.mixtape-card {
  width: calc(100% - 40px);
  max-width: 334px;
  margin: 11px auto 0;
  background: #fff;
  border: 0.5px solid #cbcbcb;
  border-radius: 8px;
  padding: 8px 14px 10px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0 8px;
}

.icon-mixtape { flex: none; }

.artist-name {
  font-size: 14px;
  font-weight: 700;
  color: #00c8da;
}

.tape-title {
  font-family: 'IBM Plex Serif', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: #738b76;
}

.card-divider {
  border-top: 1px dashed #c9c9c9;
  margin-bottom: 8px;
}

.card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.cover-wrap {
  position: relative;
  flex: none;
  width: 164px;
  height: 164px;
  border: 1px solid #9a9a9a;
  box-sizing: content-box;
}

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

.banner-hot {
  position: absolute;
  top: 0;
  left: 0;
  width: 88px;
  height: 55px;
}

.tape-description {
  margin-top: 12px;
  font-size: 9px;
  line-height: 1.4;
  color: #000;
  padding-bottom: 10px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-buttons {
  display: flex;
  gap: 6px;
}

.detail-buttons img { display: block; }

.added-by {
  font-size: 6px;
  color: #707070;
}

.added-by strong { font-weight: 700; }

.added-by-label {
  color: #00af00;
  font-weight: 700;
  text-decoration: none;
}

.stats-box {
  flex: none;
  width: 118px;
  min-height: 156px;
  background: #fafafa;
  border: 1px solid #dadada;
  padding: 9px 4px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stat { display: flex; flex-direction: column; }

.stat-number {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.05em;
}
.stat-number.views { color: #00c7e2; }
.stat-number.streams { color: #0bb700; }
.stat-number.downloads { color: #8a8a8a; }

.stat-label { font-size: 9px; color: #000; }

.stars {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 8px;
}

.stars img { width: 18px; height: 18px; }

.ratings-count { font-size: 8px; color: #000; margin-top: 2px; }

.buy-tickets { font-size: 8px; color: #000; margin-top: 2px; text-decoration: none; }
.buy-tickets:hover { text-decoration: underline; }

/* ===== Ad banners ===== */

.ad-banner {
  display: block;
  margin: 12px 2px 0;
}

.ad-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-banner-large { margin: 8px 19px 16px; }

/* ===== Screenshot placeholders (to be rebuilt as real sections) ===== */

.placeholder { margin: 8px; }

.placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Albums panel ===== */

.albums-panel {
  margin: 12px 14px 0;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.albums-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: linear-gradient(#f7f7f7, #e3e3e3);
  border-bottom: 1px solid #d5d5d5;
}

.albums-header h2 {
  font-size: 12px;
  font-weight: 700;
  color: #333;
}

.album-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.album-card {
  background: #fdfdfd;
  border: 1px solid #d9d9d9;
  padding: 6px;
}

.album-card-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 1px solid #b5b5b5;
}

.album-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.album-card-info { min-width: 0; }

.album-card-links {
  flex: none;
  display: flex;
  gap: 5px;
  padding-top: 1px;
}

.album-card-links a {
  display: block;
  width: 16px;
  height: 16px;
}

.album-card-links svg {
  display: block;
  width: 100%;
  height: 100%;
}

.album-card-title {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #00a5c9;
  line-height: 1.25;
}

.album-card-artist {
  display: block;
  font-family: 'IBM Plex Serif', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 9px;
  color: #6d6d6d;
}

.album-card-meta {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dotted #c9c9c9;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 8px;
  color: #555;
}

.album-card-rating {
  display: flex;
  align-items: center;
  gap: 3px;
}

.album-card-rating img { display: block; }

/* ===== Links / share bar ===== */

.links-bar {
  margin-top: 4px;
  height: 32px;
  background: url('assets/header/menu-back.png') center / cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.links-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 76px;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #99a2a4;
  background: none;
  border: none;
  cursor: pointer;
}

/* short centered separators between items */
.links-item::before,
.links-item:last-child::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 15px;
  background: #5d5d5d;
}

.links-item::before { left: 0; }
.links-item:last-child::after { right: 0; }

.links-item img,
.links-item svg { display: block; }

.like-count { color: #c6cdcf; }

.links-item.liked,
.links-item.liked .like-count { color: #a8dd6d; }

/* ===== Mixtape tracks panel ===== */

.tracks-panel {
  margin: 12px 14px 0;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tracks-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: linear-gradient(#f7f7f7, #e3e3e3);
  border-bottom: 1px solid #d5d5d5;
  position: relative;
}

.tracks-header::after {
  /* folded page-curl corner */
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 26px 26px 0;
  border-color: #f1f1f1 #f1f1f1 #c4c4c4 transparent;
  box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.12);
}

.tracks-header h2 {
  font-size: 12px;
  font-weight: 700;
  color: #333;
}

.track-list {
  list-style: none;
}

.track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 10px;
  border-bottom: 1px solid #e2eef2;
}

.track:nth-child(even) { background: #e9f5f8; }
.track:last-child { border-bottom: none; }

.track-number {
  flex: none;
  width: 18px;
  font-weight: 700;
  color: #8daebc;
}

.track-title {
  flex: 1;
  min-width: 0;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track--locked .track-title { color: #b3b3b3; }
.track--locked .track-number { color: #c5d4db; }

.track--playing .track-title { font-weight: 700; }

.track-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-play,
.track-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.track-play { color: #f00; }
.track-play:disabled { color: #cfcfcf; cursor: default; }

.track-add {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #555;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background: linear-gradient(#fdfdfd, #ececec);
}

.track--locked .track-add { color: #999; }

/* ===== Streaming links popup ===== */

body.modal-open { overflow: hidden; }

.modal-overlay[hidden] { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 8px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}

.modal-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
}

.modal-track-title {
  margin: 4px 0 14px;
  font-family: 'IBM Plex Serif', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: #333;
}

.modal-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-link {
  display: block;
  padding: 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.modal-link-spotify { background: #1db954; }
.modal-link-apple { background: #1e1e1e; }

/* ===== Anchor sections ===== */

.anchor-section { scroll-margin-top: 107px; }

/* ===== Comments ===== */

.comments-panel {
  margin: 12px 14px 20px;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: linear-gradient(#f7f7f7, #e3e3e3);
  border-bottom: 1px solid #d5d5d5;
}

.comments-header h2 {
  font-size: 12px;
  font-weight: 700;
  color: #333;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: #fbfdfe;
  border-bottom: 1px solid #e2eef2;
}

.comment-form input[type='text'],
.comment-form textarea {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #333;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  padding: 6px 7px;
  background: #fff;
}

.comment-form textarea { resize: vertical; }

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #7fc4d4;
}

/* honeypot: invisible to humans, tempting to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comment-status {
  font-size: 9px;
  color: #b00020;
  min-height: 11px;
}

.comment-status.is-ok { color: #0bb700; }

#comment-submit {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(#8cc63f, #4e9210);
  border: 1px solid #417a0d;
  border-radius: 3px;
  padding: 5px 16px;
  cursor: pointer;
}

#comment-submit:disabled { opacity: 0.6; cursor: default; }

.comment-list { list-style: none; }

.comment {
  padding: 7px 12px;
  border-bottom: 1px solid #e2eef2;
}

.comment:nth-child(even) { background: #e9f5f8; }
.comment:last-child { border-bottom: none; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.comment-author {
  font-size: 10px;
  font-weight: 700;
  color: #00a5c9;
}

.comment-date { font-size: 8px; color: #999; }

.comment-text {
  font-size: 10px;
  line-height: 1.4;
  color: #333;
  overflow-wrap: break-word;
}

.comment-empty {
  padding: 12px;
  font-size: 10px;
  font-style: italic;
  color: #8a8a8a;
}

/* ===== Footer ===== */

.site-footer {
  padding: 14px 16px 22px;
  text-align: center;
  font-size: 8px;
  color: #8a8a8a;
}

.footer-credit { margin-top: 2px; }

.footer-credit a {
  font-size: 7px;
  color: #dedede;
  text-decoration: none;
}

.footer-credit a:hover { color: #8a8a8a; }

/* ===== Desktop (mobile layout untouched below 900px) ===== */

@media (min-width: 900px) {
  body { background: #dcdcdc; }

  .page {
    max-width: 960px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    column-gap: 20px;
    align-content: start;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.18);
  }

  .site-header { grid-column: 1 / -1; grid-row: 1; }

  .logo { width: 88px; top: 8px; left: 24px; }

  .nav { padding-right: 16px; }
  .nav-link { width: 80px; font-size: 11px; }

  /* Leaderboard ad under the header, full width */
  .ad-banner-top {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 16px 12px 0;
  }

  /* Main column */
  .mixtape-card,
  .links-bar,
  #listen,
  #albums {
    grid-column: 1;
    margin-left: 12px;
    margin-right: 0;
  }

  .mixtape-card { grid-row: 3; }
  .links-bar { grid-row: 4; }
  #listen { grid-row: 5; }
  #albums { grid-row: 6; }

  /* Card reflows: cover left, description middle, stats right */
  .mixtape-card {
    width: auto;
    max-width: none;
    margin-top: 16px;
    display: grid;
    grid-template-columns: 166px minmax(0, 1fr) 120px;
    gap: 0 16px;
  }

  .card-title { grid-column: 1 / -1; }
  .card-divider { grid-column: 1 / -1; }
  .card-body { display: contents; }
  .cover-wrap { grid-row: 3; grid-column: 1; }
  .stats-box { grid-row: 3; grid-column: 3; }

  .tape-description {
    grid-row: 3;
    grid-column: 2;
    margin-top: 0;
    font-size: 11px;
    line-height: 1.5;
    padding-bottom: 0;
  }

  .card-footer { grid-column: 1 / -1; margin-top: 10px; }

  .artist-name,
  .tape-title { font-size: 16px; }

  .links-bar { margin-top: 16px; }
  .links-item { width: 96px; font-size: 9px; }

  .tracks-panel { margin: 12px 0 0; }
  .track { padding: 5px 14px; font-size: 11px; }
  .tracks-header h2 { font-size: 13px; }

  .albums-panel { margin: 12px 0 0; }
  .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px; gap: 12px; }

  /* Right rail: ad follows you down the page */
  .ad-banner-large {
    grid-column: 2;
    grid-row: 3 / 7;
    align-self: start;
    position: sticky;
    top: 115px;
    margin: 16px 12px 0 0;
  }

  #comments { grid-row: 7; grid-column: 1 / -1; margin: 0; }
  .site-footer { grid-row: 8; grid-column: 1 / -1; }

  .comments-panel { margin: 16px 12px 8px; }
  .comment { padding: 8px 14px; }
  .comment-author { font-size: 11px; }
  .comment-text { font-size: 11px; }
  .comment-form input[type='text'] { max-width: 260px; }

  .site-footer { font-size: 10px; }
}

/* ===== FattAmp (Winamp Easter egg) ===== */

.winamp-egg {
  display: flex;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.winamp-egg img { transition: transform 0.15s ease; }
.winamp-egg:hover img { transform: rotate(-8deg) scale(1.15); }

#winamp {
  position: fixed;
  top: 110px;
  left: max(8px, calc(50% - 138px));
  width: 276px;
  z-index: 400;
  background: #3a3a44;
  border: 1px solid #14141a;
  box-shadow:
    inset 1px 1px 0 #6a6a78,
    inset -1px -1px 0 #1d1d24,
    3px 4px 12px rgba(0, 0, 0, 0.5);
  padding: 3px;
  font-family: 'Courier New', monospace;
  user-select: none;
}

.wa-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 15px;
  padding: 0 4px;
  cursor: grab;
  touch-action: none;
  background:
    repeating-linear-gradient(180deg, #52525e 0 1px, #33333c 1px 3px);
  box-shadow: inset 1px 1px 0 #6a6a78, inset -1px -1px 0 #1d1d24;
}

.wa-titlebar:active { cursor: grabbing; }

.wa-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d6b04a;
  text-shadow: 1px 1px 0 #000;
  background: #33333c;
  padding: 0 5px;
}

.wa-close {
  width: 11px;
  height: 11px;
  padding: 0;
  border: none;
  font-size: 8px;
  line-height: 11px;
  color: #cfcfd8;
  background: #44444f;
  box-shadow: inset 1px 1px 0 #6a6a78, inset -1px -1px 0 #1d1d24;
  cursor: pointer;
}

.wa-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
  padding: 4px 6px;
  background: #000;
  box-shadow: inset 1px 1px 0 #1d1d24, inset -1px -1px 0 #6a6a78;
}

.wa-time {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #00e800;
  text-shadow: 0 0 5px rgba(0, 232, 0, 0.55);
}

.wa-viz { display: block; background: #050505; }

.wa-marquee {
  margin-top: 3px;
  padding: 2px 0;
  background: #000;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: inset 1px 1px 0 #1d1d24, inset -1px -1px 0 #6a6a78;
}

.wa-marquee span {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #00e800;
  animation: wa-scroll 9s linear infinite;
}

@keyframes wa-scroll {
  to { transform: translateX(-50%); }
}

.wa-seek,
.wa-volume {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  height: 9px;
  background: linear-gradient(#1a1a20, #2c2c34);
  box-shadow: inset 1px 1px 0 #1d1d24, inset -1px -1px 0 #6a6a78;
  cursor: pointer;
}

.wa-seek { width: 100%; margin-top: 3px; }
.wa-volume { flex: 1; background: linear-gradient(90deg, #0a5f0a, #6d6d0a, #6d0a0a); }

.wa-seek::-webkit-slider-thumb,
.wa-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 9px;
  background: linear-gradient(#8f8f9c, #55555f);
  border: 1px solid #14141a;
  box-shadow: inset 1px 1px 0 #b7b7c4;
}

.wa-seek::-moz-range-thumb,
.wa-volume::-moz-range-thumb {
  width: 12px;
  height: 9px;
  border-radius: 0;
  background: linear-gradient(#8f8f9c, #55555f);
  border: 1px solid #14141a;
}

.wa-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
}

.wa-btn {
  width: 26px;
  height: 18px;
  padding: 0;
  border: 1px solid #14141a;
  font-size: 9px;
  line-height: 1;
  color: #d7d7e0;
  background: linear-gradient(#55555f, #3a3a44);
  box-shadow: inset 1px 1px 0 #6a6a78;
  cursor: pointer;
}

.wa-btn:active {
  background: linear-gradient(#33333c, #44444f);
  box-shadow: inset 1px 1px 0 #1d1d24;
}

.wa-playlist {
  margin-top: 3px;
  max-height: 130px;
  overflow-y: auto;
  list-style: none;
  background: #000;
  padding: 3px 0;
  box-shadow: inset 1px 1px 0 #1d1d24, inset -1px -1px 0 #6a6a78;
}

.wa-row {
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 700;
  color: #00c800;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-row:hover { background: #101a2e; }
.wa-row--current { color: #fff; background: #0b2a63; }
.wa-row--locked { color: #2e5a2e; cursor: default; }

/* ===== Back to top ===== */

.back-to-top {
  position: fixed;
  right: 12px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #1e1e1e;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 200;
}
