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

body {
  background: #000000;
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.now-playing-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 20px;
  padding: 20px 20px 0;
  width: 100%;
}

.now-playing-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.now-playing-left {
  justify-content: flex-end;
}

.now-playing-right {
  justify-content: flex-start;
}

.now-playing-trigger {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #b0b0b0;
  user-select: none;
  white-space: nowrap;
}

.now-playing-cover {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background:
    radial-gradient(circle at center, #000000 0 8px, transparent 9px),
    repeating-radial-gradient(circle at center, #2a2a2a 0, #2a2a2a 2px, #1a1a1a 2px, #1a1a1a 6px);
  background-size: cover;
  border: 1px solid #444;
  flex-shrink: 0;
}

.now-playing-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 70px;
}

.now-playing-artist {
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-artist a {
  color: inherit;
  text-decoration: none;
}

.now-playing-artist a:hover {
  color: #00B7EB;
  text-decoration: underline;
}

.now-playing-title {
  font-size: 1rem;
  line-height: 1.25;
  color: #00B7EB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-album {
  font-size: 0.8rem;
  line-height: 1.25;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-album:empty {
  display: none;
}

.bg-letter {
  position: fixed;
  top: 0;
  height: 913px;
  width: 661px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.bg-letter-left {
  left: 0;
  background-image: url('bg-letter-m.png');
}

.bg-letter-right {
  right: 0;
  background-image: url('bg-letter-a.png');
}

.hero,
.stats,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  row-gap: 20px;
  column-gap: 16px;
  align-items: center;
  justify-items: center;
  padding: 60px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.logo {
  grid-row: 1;
  width: 100%;
  max-width: 420px;
  height: auto;
}

.logo-metallica {
  grid-column: 1;
  justify-self: end;
}

.logo-acdc {
  grid-column: 3;
  justify-self: start;
}

.vs {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #c0c0c0;
  letter-spacing: 0.05em;
}

.counter {
  grid-row: 2;
  font-size: 5.5rem;
  font-weight: 400;
  color: #00B7EB;
  line-height: 1;
  transition: transform 0.2s ease, text-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.counter:hover {
  color: #00B7EB;
}

.counter.flash {
  animation: counterFlash 0.7s ease;
}

@keyframes counterFlash {
  0% { transform: scale(1); text-shadow: none; }
  30% { transform: scale(1.15); text-shadow: 0 0 24px #00B7EB; }
  100% { transform: scale(1); text-shadow: none; }
}

#count-metallica {
  grid-column: 1;
}

#count-acdc {
  grid-column: 3;
}

.stats {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.stats-column {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 24px;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.stats-column.flash {
  animation: cardFlash 0.9s ease;
}

@keyframes cardFlash {
  0% { box-shadow: none; border-color: #1f1f1f; }
  30% { box-shadow: 0 0 0 1px #00B7EB, 0 0 20px rgba(0, 183, 235, 0.35); border-color: #00B7EB; }
  100% { box-shadow: none; border-color: #1f1f1f; }
}

.stats-column h2 {
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #ffffff;
}

.stats-column ol {
  list-style: none;
  counter-reset: item-counter;
}

.stats-column li {
  counter-increment: item-counter;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.95rem;
}

.stats-column li:last-child {
  border-bottom: none;
}

.stats-column li::before {
  content: counter(item-counter) ".";
  color: #c0c0c0;
  font-weight: 700;
  width: 26px;
  flex-shrink: 0;
}

.item-name {
  flex: 1;
  color: inherit;
  text-decoration: none;
}

a.item-name:hover {
  color: #00B7EB;
  text-decoration: underline;
}

.item-name a {
  color: inherit;
  text-decoration: none;
}

.item-name a:hover {
  color: #00B7EB;
  text-decoration: underline;
}

.item-count {
  color: #00B7EB;
  font-weight: 700;
}

.loading {
  color: #808080;
}

.highlight-card h2 {
  margin-bottom: 4px;
  font-weight: 200;
  font-family: "Montserrat", sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.highlight-card h2 sup {
  font-size: 0.5em;
  font-weight: 400;
  vertical-align: super;
  margin-left: 1px;
}

.highlight-sub {
  font-size: 0.75rem;
  color: #808080;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.highlight-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1.05rem;
}

.highlight-text {
  min-width: 0;
  flex: 1;
}

.highlight-text .now-playing-album {
  margin-top: 4px;
}

.highlight-track {
  color: #ffffff;
  font-weight: 700;
}

.highlight-artist {
  display: block;
  color: #00B7EB;
  font-weight: 600;
  margin-top: 2px;
  text-decoration: none;
}

.highlight-artist:hover {
  text-decoration: underline;
}

.highlight-artist a {
  color: inherit;
  text-decoration: none;
}

.highlight-artist a:hover {
  color: #00B7EB;
  text-decoration: underline;
}

.highlight-since {
  font-size: 0.8rem;
  color: #808080;
  margin-top: 10px;
}

.pie-chart-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pie-chart-svg {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pie-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pie-legend-dot.metallica {
  background: #ffffff;
}

.pie-legend-dot.acdc {
  background: #00B7EB;
}

.pie-legend-dot.rest {
  background: #808080;
}

.pie-legend-label {
  flex: 1;
  color: #c0c0c0;
}

.pie-legend-value {
  color: #ffffff;
  font-weight: 700;
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.overview-item {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.overview-item.flash {
  animation: cardFlash 0.9s ease;
}

.overview-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #00B7EB;
}

.overview-label {
  font-size: 0.85rem;
  color: #808080;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.heatmap-section {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 24px;
}

.heatmap-section h2 {
  font-weight: 200;
  font-family: "Montserrat", sans-serif;
  font-size: 1.7rem;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.heatmap-legend {
  display: flex;
  gap: 20px;
  margin: 10px 0 20px;
  font-size: 0.8rem;
  color: #808080;
}

.heatmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.metallica {
  background: #ffffff;
}

.legend-dot.acdc {
  background: #00B7EB;
}

.heatmap {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100px;
}

.heatmap-hour {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.heatmap-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
  width: 100%;
  justify-content: center;
}

.heatmap-bar {
  width: 40%;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}

.heatmap-bar.metallica {
  background: #ffffff;
}

.heatmap-bar.acdc {
  background: #00B7EB;
}

.heatmap-hour-label {
  font-size: 0.6rem;
  color: #808080;
}

@media (max-width: 700px) {
  .heatmap {
    overflow-x: auto;
  }
  .heatmap-hour {
    min-width: 28px;
  }
}

.footer {
  margin-top: auto;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 20px;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #808080;
  border-top: 1px solid #1a1a1a;
}

.footer h2 {
  color: #ffffff;
}

.footer-since {
  font-size: 0.95rem;
}

.footer-links {
  position: absolute;
  left: max(40px, calc((100% - 1100px) / 2 + 20px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.footer a {
  color: inherit;
  text-decoration: underline;
}

.footer a:hover {
  color: #00B7EB;
}

.footer-legal {
  max-width: 640px;
}

.footer-motto {
  font-size: 0.85rem;
  font-style: normal;
}

@media (max-width: 700px) {
  .footer-links {
    position: static;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 24px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .footer {
    padding: 24px 16px;
  }
  .footer-since {
    font-size: 0.85rem;
  }
}

@media (max-width: 700px) {
  .now-playing-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 12px;
  }
  .now-playing-left,
  .now-playing-right {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .overview {
    grid-template-columns: 1fr;
  }
  .bg-letter {
    display: none;
  }
  .pie-chart-wrap {
    flex-direction: column;
  }
}

.big4-card {
  margin-top: 24px;
}

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

.big4-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
}

.big4-item:last-child {
  border-bottom: none;
}

.big4-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background:
    radial-gradient(circle at center, #000000 0 5px, transparent 6px),
    repeating-radial-gradient(circle at center, #2a2a2a 0, #2a2a2a 2px, #1a1a1a 2px, #1a1a1a 6px);
  background-size: cover;
  border: 1px solid #444;
  flex-shrink: 0;
}

.big4-info {
  flex: 1;
  min-width: 0;
}

.big4-artist {
  display: block;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}

.big4-artist:hover {
  color: #00B7EB;
  text-decoration: underline;
}

.big4-song {
  color: #00B7EB;
  font-size: 0.9rem;
  margin-top: 2px;
}

.big4-album {
  color: #808080;
  font-size: 0.8rem;
  margin-top: 2px;
}

.big4-count {
  color: #00B7EB;
  font-weight: 700;
  flex-shrink: 0;
}


.century-summary {
  font-size: 0.75rem;
  color: #808080;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #1a1a1a;
}

.century-sub-albums {
  margin-top: 16px;
}


.media-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
}

.media-artist {
  display: block;
  color: #00B7EB;
  font-size: 0.9rem;
  margin-top: 2px;
  text-decoration: none;
}

.media-artist:hover {
  text-decoration: underline;
}

.now-playing-album {
  color: #808080;
}

#view-artist,
#view-songs {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

#view-artist h1,
#view-songs h1 {
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  background: transparent;
  color: #808080;
  border: 1px solid #333;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
}

.tab-btn.active {
  color: #000000;
  background: #00B7EB;
  border-color: #00B7EB;
}

.view-toggle {
  text-align: center;
  margin-bottom: 32px;
}

.view-toggle-link {
  color: #808080;
  font-size: 0.85rem;
  text-decoration: none;
}

.view-toggle-link:hover {
  color: #00B7EB;
}

#songs-list {
  list-style: none;
  counter-reset: song-counter;
}

#songs-list li {
  counter-increment: song-counter;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #1a1a1a;
}

#songs-list li::before {
  content: counter(song-counter) ".";
  color: #c0c0c0;
  font-weight: 700;
  width: 32px;
  flex-shrink: 0;
}

.song-title {
  flex: 1;
}

.song-count {
  color: #00B7EB;
  font-weight: 700;
  font-size: 1.1rem;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 40px;
  color: #808080;
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: #ffffff;
}

.album-group {
  margin-bottom: 32px;
}

.album-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.album-year {
  color: #808080;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.album-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.album-cover {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  background:
    radial-gradient(circle at center, #000000 0 8px, transparent 9px),
    repeating-radial-gradient(circle at center, #2a2a2a 0, #2a2a2a 2px, #1a1a1a 2px, #1a1a1a 6px);
  background-size: cover;
  background-position: center;
  border: 1px solid #444;
  flex-shrink: 0;
}

.album-tracks {
  flex: 1;
  list-style: none;
  counter-reset: song-counter;
  min-width: 0;
}

.album-tracks li {
  counter-increment: song-counter;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 0.85rem;
  line-height: 1.2;
}

.album-tracks li::before {
  content: counter(song-counter) ".";
  color: #c0c0c0;
  font-weight: 700;
  width: 24px;
  flex-shrink: 0;
}

.no-album-section .album-tracks {
  flex: none;
}

/* ---------- О проекте ---------- */

#view-about {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.about-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}

#about-title {
  font-weight: 200;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}

.about-lang {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.about-lang a {
  color: #808080;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.about-lang a:hover {
  color: #e6e6e6;
}

.about-lang a.active {
  color: #00B7EB;
  border-bottom-color: #00B7EB;
}

.about-list {
  border-top: 1px solid #1a1a1a;
}

.about-item {
  border-bottom: 1px solid #1a1a1a;
}

.about-q {
  position: relative;
  display: block;
  padding: 18px 36px 18px 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.about-q::-webkit-details-marker {
  display: none;
}

.about-q::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: #00B7EB;
}

.about-item[open] > .about-q::after {
  content: "\2212";
}

.about-q:hover {
  color: #00B7EB;
}

.about-q:focus-visible {
  outline: 1px solid #00B7EB;
  outline-offset: 2px;
}

.about-item[open] > .about-q {
  color: #00B7EB;
}

.about-a {
  padding: 0 36px 22px 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #b3b3b3;
}

@media (max-width: 600px) {
  #view-about {
    padding: 28px 16px;
  }
  .about-q {
    padding-right: 28px;
  }
  .about-a {
    padding-right: 0;
  }
}