/* ==========================================================================
   CSS: MODALS / MODAL BASE
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(53, 53, 60, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 9999;
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  background-image: var(--grain-bg);
  background-size: 160px 160px;
  background-blend-mode: overlay;
}

.modal.show {
  display: flex;
}

.modal-box {
  width: min(1360px, 100%);
  max-height: min(88vh, 1000px);
  overflow: auto;
  background: #282626;
  border: 1px solid rgba(132, 170, 251, 0.28);
  border-radius: 12px;
  padding: 14px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 18px;
  line-height: 1.3;
}

.about-text {
  color: #f3f3f3;
  font-size: 15px;
  line-height: 1.65;
}

.about-modal-box {
  width: min(980px, 100%);
}

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-hero-card,
.about-section-card,
.about-links-card {
  position: relative;
  background: rgba(53, 53, 60, 0.55);
  border: 1px solid rgba(132, 170, 251, 0.22);
  border-radius: 14px;
  padding: 16px;
  background-image: var(--grain-bg);
  background-size: 20px 20px;
  background-blend-mode: overlay;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.about-hero-card::before,
.about-section-card::before,
.about-links-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(132, 170, 251, 0.08) 0%, rgba(132, 170, 251, 0.01) 42%, transparent 100%);
  opacity: 0.95;
}

.about-hero-card > *,
.about-section-card > *,
.about-links-card > * {
  position: relative;
}

.about-hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(132, 170, 251, 0.12);
  border: 1px solid rgba(132, 170, 251, 0.24);
  color: var(--accent-2);
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.about-hero-title {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #f3f3f3;
  margin-bottom: 10px;
}

.about-hero-text,
.about-section-text {
  color: #f3f3f3;
  font-size: 15px;
  line-height: 1.7;
}

.about-hero-text p,
.about-section-text p {
  margin: 0;
}

.about-hero-text p + p,
.about-section-text p + p {
  margin-top: 12px;
}

.about-section-title,
.about-links-title {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: #f3f3f3;
  margin-bottom: 10px;
}

.about-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.about-links-group {
  min-width: 0;
}

.about-links-group-title {
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

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

.about-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f3f3f3;
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.about-link-chip:hover {
  text-decoration: none;
  border-color: rgba(132, 170, 251, 0.7);
  background: rgba(132, 170, 251, 0.08);
}

.about-link-chip i {
  color: var(--accent-2);
  font-size: 14px;
  line-height: 1;
}

.about-link-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .about-links-grid {
    grid-template-columns: 1fr;
  }

  .about-hero-title {
    font-size: 21px;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-item {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.stats-rank {
  width: 38px;
  min-width: 38px;
  flex: 0 0 38px;
  border-radius: 12px 0 0 12px;
  border: 1px solid rgba(132, 170, 251, 0.22);
  background: rgba(132, 170, 251, 0.10);
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.stats-main {
  min-width: 0;
  flex: 1;
}

.stats-name {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

.stats-sub {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 2px;
}


.chart-entry-card.is-album .chart-entry-body,
.chart-entry-card.is-placement-score .chart-entry-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chart-entry-card.is-album .chart-entry-meta,
.chart-entry-card.is-placement-score .chart-entry-meta {
  flex: 0 0 auto;
  width: auto;
  margin-top: 6px;
}

.chart-entry-card.is-album .chart-entry-thumb {
  background: linear-gradient(180deg, rgba(215, 218, 139, 0.15) 0%, rgba(132, 170, 251, 0.06) 100%);
}


.chart-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(132, 170, 251, 0.22);
  background: rgba(53, 53, 60, 0.55);
  background-image: var(--grain-bg);
  background-size: 20px 20px;
  background-blend-mode: overlay;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.chart-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(132, 170, 251, 0.08) 0%, rgba(132, 170, 251, 0.02) 36%, transparent 100%);
}

.chart-panel > * {
  position: relative;
}

.chart-panel-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chart-panel-title {
  font-size: 15px;
  line-height: 1.32;
  font-weight: 700;
  color: var(--text);
}

.chart-panel-subtitle {
  font-size: 13px;
  line-height: 1.42;
  color: var(--muted);
}


.charts-sections-scroll::-webkit-scrollbar {
  width: 12px;
}

.charts-sections-scroll::-webkit-scrollbar-track {
  background: #282626;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.charts-sections-scroll::-webkit-scrollbar-thumb {
  background: #383838;
  border-top-left-radius: 0;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 0;
  border: 2px solid #282626;
}

.charts-sections-scroll::-webkit-scrollbar-button {
  display: none;
}

.chart-list-shell {
  min-width: 0;
}

.chart-list-shell .local-lazy-list-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.chart-entry {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.chart-entry-card,
.chart-entry-button {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 12px;
  row-gap: 6px;
  padding: 10px;
  margin-left: -1px;
  border-radius: 0 14px 14px 0;
  border: 1px solid rgba(132, 170, 251, 0.18);
  background: rgba(40, 38, 38, 0.78);
  position: relative;
  overflow: visible;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.chart-entry-button {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chart-entry-card {
  cursor: pointer;
}

.chart-entry-button:hover,
.chart-entry-button:focus-visible,
.chart-entry-card:hover {
  border-color: rgba(132, 170, 251, 0.62);
  background: rgba(44, 42, 46, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.chart-entry-thumb {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(132, 170, 251, 0.14);
  background: linear-gradient(180deg, rgba(132, 170, 251, 0.16) 0%, rgba(132, 170, 251, 0.05) 100%);
  color: var(--accent-2);
}

.chart-entry-thumb.is-curator {
  border-radius: 999px;
}

.chart-entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chart-entry-thumb i {
  font-size: 24px;
  line-height: 1;
}

.chart-entry-body {
  min-width: 0;
  flex: 1 1 calc(100% - 66px);
}

.chart-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chart-entry-title {
  min-width: 0;
  font-size: 14px;
  line-height: 1.38;
  font-weight: 700;
  color: var(--text);
}

.chart-entry-title a,
.chart-entry-sub a {
  color: inherit;
  text-decoration: none;
}

.chart-entry-title a:hover,
.chart-entry-sub a:hover {
  text-decoration: underline;
}

.chart-entry-title .hover-marquee,
.chart-entry-sub .hover-marquee {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.chart-entry-title .hover-marquee-inner,
.chart-entry-sub .hover-marquee-inner {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-entry-card:hover .hover-marquee.is-overflow .hover-marquee-inner,
.chart-entry-card:focus-within .hover-marquee.is-overflow .hover-marquee-inner,
.chart-entry-button:hover .hover-marquee.is-overflow .hover-marquee-inner,
.chart-entry-button:focus-visible .hover-marquee.is-overflow .hover-marquee-inner {
  animation: hover-marquee-x var(--marquee-duration, 6s) ease-in-out infinite alternate;
}

.chart-entry-metric {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(132, 170, 251, 0.26);
  background: rgba(132, 170, 251, 0.12);
  font-size: 12px;
  line-height: 1;
  color: #f3f3f3;
  white-space: nowrap;
}

.chart-entry-tooltip-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  outline: none;
  z-index: 1;
}

.chart-entry-tooltip-anchor:hover,
.chart-entry-tooltip-anchor:focus-within {
  z-index: 32001;
}

.chart-entry-tooltip-anchor.playlist-meta-tooltip-anchor > .chart-entry-tooltip.playlist-genres-tooltip.chart-entry-tooltip-panel {
  width: auto;
  min-width: 0;
  max-width: min(300px, calc(100vw - 24px));
  max-height: min(320px, calc(100vh - 24px));
  padding: 0;
  overflow: hidden;
  white-space: normal;
}

.chart-entry-tooltip-anchor > .chart-entry-tooltip .playlist-scroll-tooltip-header {
  padding: 10px 12px 8px;
}

.chart-entry-tooltip-anchor > .chart-entry-tooltip .playlist-genres-tooltip-title {
  font-size: 12px;
  line-height: 1.28;
  margin: 0;
}

.chart-entry-tooltip-anchor > .chart-entry-tooltip .playlist-scroll-tooltip-body {
  padding: 6px 10px 10px;
  max-height: none;
  overflow: visible;
}

.chart-entry-tooltip-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-entry-tooltip-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.chart-entry-tooltip-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
  text-align: left;
}

.chart-entry-tooltip-value {
  flex: 0 0 auto;
  margin-left: 6px;
  padding-left: 8px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.chart-entry-tooltip-row--single {
  justify-content: flex-start;
}

.chart-entry-tooltip-row--single .chart-entry-tooltip-value {
  text-align: left;
}

.chart-entry-metric i,
.chart-entry-chip i {
  font-size: 13px;
  line-height: 1;
  flex: 0 0 auto;
}

.chart-entry-pill-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  line-height: 1;
}

.chart-entry-sub {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.chart-entry-sub--placeholder {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.chart-entry-meta {
  position: relative;
  isolation: auto;
  overflow: visible;
  display: flex;
  flex: 1 0 100%;
  width: 100%;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.chart-entry-button.is-playlist .chart-entry-body,
.chart-entry-button.is-curator .chart-entry-body,
.chart-entry-card.is-track .chart-entry-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-entry-card.is-track .chart-entry-body {
  gap: 0;
}

.chart-entry-button.is-playlist .chart-entry-meta,
.chart-entry-button.is-curator .chart-entry-meta {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
}

.chart-entry-card.is-track .chart-entry-meta {
  flex: 0 0 auto;
  width: auto;
  margin-top: 6px;
}

.chart-entry-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  min-width: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(132, 170, 251, 0.14);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.chart-entry-thumb .preview-cover-trigger,
.chart-entry-thumb .preview-cover-static {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.chart-entry-card.is-track .chart-entry-thumb {
  background: linear-gradient(180deg, rgba(215, 218, 139, 0.15) 0%, rgba(132, 170, 251, 0.06) 100%);
}

.chart-entry-card.is-artist .chart-entry-thumb {
  background: linear-gradient(180deg, rgba(132, 170, 251, 0.16) 0%, rgba(87, 115, 200, 0.06) 100%);
}

.chart-entry-button.is-playlist .chart-entry-thumb {
  background: linear-gradient(180deg, rgba(132, 170, 251, 0.18) 0%, rgba(87, 115, 200, 0.06) 100%);
}

.chart-entry-button.is-curator .chart-entry-thumb {
  background: linear-gradient(180deg, rgba(215, 218, 139, 0.18) 0%, rgba(132, 170, 251, 0.05) 100%);
}

.loading-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.scroll-top-host {
  --scroll-top-button-y: 0px;
  --scroll-top-button-right: 14px;
  --scroll-top-button-size: 38px;
}

.scroll-top-host:not(.tab-pane) {
  position: relative;
}

.scroll-to-top-button {
  position: fixed;
  top: auto;
  left: var(--scroll-top-button-left, auto);
  right: auto;
  bottom: var(--scroll-top-button-bottom, 14px);
  width: var(--scroll-top-button-size);
  height: var(--scroll-top-button-size);
  border: 1px solid rgba(132, 170, 251, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(132, 170, 251, 0.2) 0%, rgba(53, 53, 60, 0.82) 100%);
  background-color: rgba(53, 53, 60, 0.88);
  background-image: var(--grain-bg), linear-gradient(180deg, rgba(132, 170, 251, 0.2) 0%, rgba(53, 53, 60, 0.82) 100%);
  background-size: 20px 20px, 100% 100%;
  background-blend-mode: overlay, normal;
  color: #f3f3f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 8px, 0) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.12s ease, background-color 0.12s ease;
  z-index: 36;
}

.scroll-to-top-button i {
  font-size: 18px;
  line-height: 1;
}

.scroll-top-host.is-scroll-top-visible > .scroll-to-top-button {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.scroll-to-top-button:hover,
.scroll-to-top-button:focus-visible {
  border-color: rgba(215, 218, 139, 0.64);
  background-color: rgba(64, 64, 72, 0.94);
  outline: none;
}

    
    .stats-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.stats-toggle-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-mode-btn.is-active {
  background-color: rgba(132, 170, 251, 0.2);
  border-color: rgba(132, 170, 251, 1);
}
