a:link { color: #FFA500; text-decoration: none; }
a:active { color: #FFA500; text-decoration: none; }
a:hover { color: #ffffff; text-decoration: none; }
a:visited { color: #FFA500; text-decoration: none; }

#lastfm-top a.top-choice,
#lastfm-top a.top-choice:link,
#lastfm-top a.top-choice:visited {
  color: #ffffff;
}

#lastfm-top a.top-choice.active,
#lastfm-top a.top-choice:hover {
  color: #FFA500;
}

body { background: #111111; color: #ffffff; display: flex; justify-content: center; align-items: center; }
pre {
 margin: 0; 
}
.oranssi { color: #FFA500; }
.harmaa { color: #606060; }

pre,
#media {
    font-size: clamp(10px, 1.4vw, 16px);
}

.gallery img {
  filter: grayscale(100%);
  transition: .15s;
}

.gallery img:hover { filter: grayscale(0%); }


#media {
  margin-left: 1ch; 
  width: 71ch;
  display: grid;
  grid-template-columns: 1ch 2ch 1fr 2ch 1ch;
  align-items: stretch;
  font-family: monospace;
  margin-bottom: -1.2em; /* <- jos joku velho lukee tätä, niin voitko kertoa miten saan tämän toimimaan ilman tätä ? */

}

#media-left { grid-column: 1; }
#media-right { grid-column: 5;}
#media-left, #media-right {
  margin: 0;
  color: #606060;
  line-height: 1.2;
}

.gallery { grid-column: 3; }


.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

@media (max-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
    #lastfm-cover { width: 48px; height: 48px; }
    #lastfm-top { margin-left: calc(-32px - 1.5ch); margin-top: 1.8em; }
    #lastfm-right { position: relative; left: .65ch; }
    #media-right { position: relative; left: .65ch; }
}

#lastfm-wrap {
  margin-left: 1ch;
  width: 73ch;
  display: grid;
  grid-template-columns: 1ch 2ch 65ch 2ch 1ch;
  margin-bottom: -1.2em;
}

#lastfm-left {
  grid-column: 1;
}

#lastfm-right {
  grid-column: 5;
}

#lastfm-left,
#lastfm-right {
  margin: 0;
  color: #606060;
  line-height: 1.2;
}


#lastfm {
  grid-column: 3;
  display: flex;
  align-items: flex-start;
  gap: 1.5ch;
  width: 69ch;
transform: translateY(.35em);
}

#lastfm-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 1.25;
}

#lastfm-artist,
#lastfm-track,
#lastfm-album {
  display: block;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}



#lastfm-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1ch;
    margin-top: .2em;
    margin-bottom: .8em;
}

#lastfm-top {
  margin-top: 1em;
  margin-left: calc(-64px - 1.5ch);
  font-family: monospace;
  white-space: pre;
  line-height: 1.2;
}

.top-choice {
  color: #ffffff;
}

.top-choice:hover {
  color: #FFA500;
}

.dots {
    color: #606060;
}

#lastfm-album {
    color: #909090;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#lastfm-cover {
    width: 64px;
    height: 64px;
    object-fit: cover;
    flex-shrink: 0;

}

#lastfm-more {
    flex-shrink: 0;
    margin-left: -6ch;
    position: relative;
    left: -3ch;
    padding: 0;
    border: 0;
    background: none;

    color: #FFA500;
    font: inherit;
    cursor: pointer;
}

#lastfm-more::before {
    content: "[ ";
    color: #606060;
}

#lastfm-more::after {
    content: " ]";
    color: #606060;
}

@media (max-width: 700px) {
  #lastfm-cover {
    width: 48px;
    height: 48px;
  }

  #lastfm-top {
    margin-left: calc(-48px - 1.5ch);
    margin-top: 1.8em;
  }
}


#lightbox {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,.9);
    z-index: 9999;
}

#lightbox.open {
    display: flex;
}


#lightbox-img,
#lightbox-video {
    display: none;
    object-fit: contain;
    max-width: min(85vw, 1000px);
    max-height: min(85vh, 1000px);

    width: auto;
    height: auto;
}