/* css styles */
:root {
  color-scheme: dark;
}

html,
body {
  background: #09090b;
  color: #e4e4e7;
}

body {
  min-height: 100vh;
  padding-top: 0 !important;
}

.navbar {
  background: #09090b !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand,
.navbar-nav .nav-link {
  color: #e4e4e7 !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #ffffff !important;
}

.quarto-container,
#quarto-content,
main.content {
  background: #09090b;
}

.quarto-title h1,
.title,
h1,
h2,
h3 {
  color: #fafafa;
}

a {
  color: #a1a1aa;
}

a:hover {
  color: #ffffff;
}

@keyframes slideDownIn {
  0% {
    transform: translateY(-70px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

#title-block-header, .quarto-title, .title, header.quarto-title-block {
  display: none !important;
}

#title-block-header {
  animation: slideDownIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-height: 150px;
  transition: opacity 0.8s ease, max-height 0.8s ease, margin 0.8s ease, padding 0.8s ease;
  overflow: hidden;
}

.search-bar-container {
  animation: slideDownIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
  max-height: 100px;
  transition: opacity 0.8s ease, max-height 0.8s ease, margin 0.8s ease, padding 0.8s ease;
  overflow: hidden;
}

body.has-chart {
  overflow-x: hidden;
}

.about-lastfm-container {
  width: 100%;
  padding: 36px 24px 48px;
  background: #09090b;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.about-lastfm-content {
  max-width: 960px;
  width: 100%;
}

.about-lastfm-title,
.about-lastfm-text {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.about-lastfm-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 1.1rem;
}

.about-lastfm-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #a1a1aa;
  margin-bottom: 0;
}

.genre-simulations-section {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 52px;
  padding-top: 44px;
}

.genre-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 36px;
  width: 100%;
}

@media (max-width: 768px) {
  .genre-grid-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.genre-sim-item {
  position: relative;
  width: 100%;
  height: 440px;
  background: transparent;
  overflow: hidden;
}

.mini-simulation-header {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 100;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.mini-simulation-header .simulation-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.mini-simulation-header .simulation-subtitle {
  font-size: 0.82rem;
  color: #a1a1aa;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: lowercase;
  margin-top: 3px;
  line-height: 1.2;
}

.mini-focus-info {
  width: 210px !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 1) !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.mini-album-node:not(.album-focused):hover .album-card-inner {
  transform: scale(1.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.85);
  z-index: 100;
}

.mini-album-node.album-focused .album-card-inner {
  transform: scale(1.85) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.98), 0 0 28px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
}

.album-card-inner img {
  pointer-events: none !important;
  -webkit-user-drag: none !important;
  user-select: none !important;
}

.cataloguing-text {
  margin-top: 36px !important;
}

body.has-chart #title-block-header {
  opacity: 0;
  max-height: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

body.has-chart .search-bar-container {
  opacity: 0;
  max-height: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

#quarto-header {
  display: none !important;
}

/* floating navigation header */
.floating-nav {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 1200;
  display: flex;
  gap: 20px;
  align-items: center;
  user-select: none;
}

.floating-nav-item {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--bs-body-color, #e0e0e0);
  text-decoration: none;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.floating-nav-item:hover {
  opacity: 0.8;
  color: #ffffff;
  text-decoration: none;
}

.floating-nav-item.active {
  opacity: 1;
  font-weight: 600;
  color: #ffffff;
}

.floating-nav-item:focus {
  outline: none;
}

.floating-nav-item:focus-visible {
  outline: 1px dotted rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

.tab-view {
  width: 100%;
}

#scrobbles-tab-view .simulation-header {
  display: none;
}

.simulation-header {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 100;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.simulation-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.simulation-subtitle {
  font-size: 0.82rem;
  color: #a1a1aa;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: lowercase;
  margin-top: 4px;
  line-height: 1.2;
}

.change-user-btn {
  background: none;
  border: none;
  color: #a1a1aa;
  text-decoration: underline;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 8px;
  pointer-events: auto;
  padding: 0;
  transition: color 0.15s ease;
}

.change-user-btn:hover {
  color: #ffffff;
}

@media (max-width: 600px) {
  .simulation-header {
    top: 55px;
  }
  .simulation-title {
    font-size: 1.35rem;
  }
  .simulation-subtitle {
    font-size: 0.75rem;
  }
}

.scrobble-btn {
  background: #27272a !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e4e4e7 !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.scrobble-btn:hover,
.scrobble-btn:focus {
  background: #3f3f46 !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

@keyframes popScale {
  0% {
    transform: scale(0.12);
    opacity: 0;
  }
  68% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes dotPulse {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.loading-dot-1 { animation: dotPulse 1.4s infinite 0.0s; }
.loading-dot-2 { animation: dotPulse 1.4s infinite 0.25s; }
.loading-dot-3 { animation: dotPulse 1.4s infinite 0.5s; }

.album-node {
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
  will-change: transform;
}

.album-node .album-card-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  animation: popScale 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

@keyframes albumBlowUp {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  30% {
    transform: scale(1.22);
    filter: brightness(1.28);
    box-shadow: 0 16px 36px rgba(255, 255, 255, 0.22), 0 0 24px rgba(255, 255, 255, 0.15);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  }
}

.album-node.album-node-blowup:not(.album-focused) .album-card-inner {
  animation: albumBlowUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.album-node.album-focused {
  z-index: 1002 !important;
  cursor: pointer !important;
}

.album-node.album-focused .album-card-inner {
  transform: scale(2.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.98), 0 0 40px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
  cursor: pointer !important;
}

.album-focus-info {
  position: absolute;
  left: 50%;
  transform: translate(calc(-50% + var(--shift-x, 0px)), 0);
  width: 280px;
  text-align: center;
  color: #ffffff;
  pointer-events: auto;
  cursor: pointer;
  z-index: 1003;
  animation: focusFadeIn 0.25s ease forwards;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.album-focus-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #f1f5f9;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.album-node.album-focused:hover .album-focus-hint,
.album-focus-hint:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.04);
}

@keyframes focusFadeIn {
  0% { opacity: 0; transform: translate(calc(-50% + var(--shift-x, 0px)), 6px); }
  100% { opacity: 1; transform: translate(calc(-50% + var(--shift-x, 0px)), 0); }
}

/* Album Detail Popout Modal */
.album-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.album-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.album-modal-card {
  position: relative;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  padding: 26px;
  color: #f4f4f5;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.album-modal-backdrop.active .album-modal-card {
  transform: scale(1) translateY(0);
}

.album-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.album-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.album-modal-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.album-modal-img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.album-modal-meta {
  flex: 1;
  min-width: 0;
}

.album-modal-rank {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  margin-bottom: 6px;
}

.album-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 4px 0;
  word-break: break-word;
}

.album-modal-artist {
  font-size: 0.95rem;
  color: #a1a1aa;
  margin-bottom: 10px;
}

.album-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.album-modal-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #d4d4d8;
  transition: all 0.18s ease;
}

.album-modal-tag.clickable-tag {
  cursor: pointer;
  user-select: none;
}

.album-modal-tag.clickable-tag:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  transform: translateY(-1px);
}

.album-modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.album-modal-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.album-modal-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a;
  margin-bottom: 4px;
}

.album-modal-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-modal-stats.stats-user-mode {
  display: flex;
  gap: 10px;
}

.album-modal-stats.stats-user-mode .box-scrobbles {
  flex: 0 0 130px;
  min-width: 110px;
  text-align: center;
}

.album-modal-stats.stats-user-mode .box-fav-track {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  padding: 10px 14px;
  overflow: hidden;
}

.album-modal-stats.stats-user-mode .fav-track-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.fav-track-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.fav-track-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: #a1a1aa;
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .album-modal-stats.stats-user-mode {
    flex-direction: column;
  }
  .album-modal-stats.stats-user-mode .box-scrobbles {
    flex: auto;
    width: 100%;
  }
}

.album-modal-wiki {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #d4d4d8;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  max-height: 160px;
  overflow-y: auto;
}

.album-modal-wiki-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a1a1aa;
  margin-bottom: 6px;
}

.album-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.album-modal-explore-btn {
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f4f4f5;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  user-select: none;
}

.album-modal-explore-btn:hover {
  background: #3f3f46;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.album-modal-explore-btn:active {
  transform: translateY(0);
}

.album-modal-lastfm-link {
  font-size: 0.8rem;
  color: #a1a1aa;
  text-decoration: none;
  transition: color 0.15s ease;
}

.album-modal-lastfm-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Settings tab and drawer */
@keyframes settingsSlideUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.settings-dock {
  position: fixed;
  bottom: 0;
  left: 24px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: settingsSlideUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.settings-tab-btn {
  width: 48px;
  height: 32px;
  background: rgba(24, 24, 27, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.settings-tab-btn:hover {
  color: #ffffff;
  background: rgba(39, 39, 42, 0.95);
}

.settings-tab-btn:hover .settings-gear-icon {
  transform: rotate(45deg);
}

.settings-gear-icon {
  width: 17px;
  height: 17px;
  transition: transform 0.35s ease;
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1055;
}

.settings-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  bottom: 0;
  left: 24px;
  transform: translateY(100%);
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: rgba(18, 18, 20, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 16px 20px 22px 20px;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.65);
  z-index: 1060;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.settings-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.settings-panel-close {
  background: none;
  border: none;
  color: #71717a;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.settings-panel-close:hover {
  color: #ffffff;
}

.settings-group {
  margin-bottom: 14px;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-group-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: lowercase;
  color: #d4d4d8;
  margin-bottom: 6px;
}

.settings-group-value {
  font-size: 0.75rem;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
}

.settings-user-form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.settings-user-input {
  flex: 1;
  height: 32px;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.settings-user-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
}

.settings-btn {
  height: 32px;
  padding: 0 12px;
  background: #27272a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.settings-btn:hover {
  background: #3f3f46;
}

.settings-btn.active {
  background: #ffffff !important;
  color: #09090b !important;
  border-color: #ffffff !important;
  font-weight: 600;
}

.settings-btn-group {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.settings-btn-group .settings-btn {
  flex: 1;
  text-align: center;
}

.settings-range {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin: 6px 0 2px 0;
}

.settings-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}

.settings-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.settings-reset-btn {
  background: none;
  border: none;
  color: #71717a;
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
  transition: color 0.15s ease;
}

.settings-reset-btn:hover {
  color: #d4d4d8;
}

/* Home Explore CTA Section */
.home-explore-section {
  width: 100%;
  padding: 80px 20px 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #09090b;
}

.home-explore-link {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.home-explore-link:hover {
  color: #38bdf8;
  transform: translateY(-2px);
}

.home-explore-arrow {
  font-size: 0.85em;
  transition: transform 0.2s ease;
}

.home-explore-link:hover .home-explore-arrow {
  transform: translateX(6px);
}

/* Genre Folksonomy Network (Obsidian node style) */
.genre-network-section {
  width: 100%;
  background: #09090b;
  padding: 64px 0 16px;
  position: relative;
  overflow: hidden;
}

.genre-network-header {
  text-align: center;
  margin-bottom: 24px;
  pointer-events: none;
  user-select: none;
}

.genre-network-header .simulation-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.genre-network-header .simulation-subtitle {
  font-size: 0.82rem;
  color: #a1a1aa;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: lowercase;
  margin-top: 4px;
  line-height: 1.2;
}

.genre-network-container {
  position: relative;
  width: 100%;
  height: 850px;
  background: transparent;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.genre-network-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Dragging state: suppress pointer events on other nodes to stop glitching */
.genre-network-container svg.is-dragging .genre-network-node {
  pointer-events: none;
}

.genre-network-container svg.is-dragging .genre-network-node.is-dragged {
  pointer-events: auto;
}

.genre-network-link {
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.genre-network-node {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.genre-network-node .node-circle {
  transition: fill 0.15s ease, stroke 0.15s ease;
}

/* High-performance CSS-driven hover dimming */
.network-root.has-hover .genre-network-node:not(.highlighted) {
  opacity: 0.15;
}

.network-root.has-hover .genre-network-link:not(.highlighted) {
  opacity: 0.05;
}

.network-root.has-hover .genre-network-label:not(.highlighted) {
  opacity: 0.06 !important;
}

.genre-network-link.highlighted {
  stroke: #38bdf8 !important;
  stroke-width: 1.8px !important;
  opacity: 0.85 !important;
}

.genre-network-node.highlighted .node-circle {
  fill: #ffffff !important;
  stroke: #38bdf8 !important;
  stroke-width: 2px !important;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

/* Layered labels - rendered above nodes with dark halo */
.genre-network-label {
  font-family: inherit;
  user-select: none;
  pointer-events: none;
  text-anchor: middle;
  paint-order: stroke fill;
  stroke: #09090b;
  stroke-width: 3.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s ease, fill 0.15s ease;
}

.genre-network-label.label-tier-major {
  font-size: 11.5px;
  font-weight: 700;
  fill: #fafafa;
  letter-spacing: 0.3px;
}

.genre-network-label.label-tier-mid {
  font-size: 9px;
  font-weight: 500;
  fill: #d4d4d8;
  letter-spacing: 0.2px;
}

.genre-network-label.label-tier-small {
  font-size: 8px;
  font-weight: 400;
  fill: #a1a1aa;
  letter-spacing: 0.1px;
}

.genre-network-label.highlighted {
  fill: #ffffff !important;
  opacity: 1 !important;
  font-weight: 600;
}

.genre-network-label.dimmed {
  opacity: 0.12 !important;
}

/* Random Genre Section */
.random-genre-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 20px 24px;
  gap: 12px;
}

.random-genre-header {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: #e4e4e7;
  margin: 0;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.random-genre-header::before {
  content: "...";
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.random-genre-btn {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f4f4f5;
  padding: 11px 26px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  user-select: none;
}

.random-genre-btn:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.random-genre-btn:active {
  transform: translateY(0);
}

/* Genre Search Bar in Explore tab */
.genre-search-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
  position: relative;
}

.genre-search-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 0 20px 0 16px;
  height: 42px;
  width: 270px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.genre-search-pill:hover,
.genre-search-pill:focus-within {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.genre-search-icon {
  width: 14px;
  height: 14px;
  color: #a1a1aa;
  flex-shrink: 0;
  margin-right: 8px;
}

.genre-search-field {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.genre-search-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: #71717a;
  font-size: 0.95rem;
  pointer-events: none;
  user-select: none;
  white-space: pre;
  font-family: inherit;
  line-height: normal;
}

.genre-search-input {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f4f4f5;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0;
  z-index: 1;
  line-height: normal;
}

.genre-search-input::placeholder {
  color: #71717a;
}

/* Genre Detail Section on Explore Tab */
.genre-detail-section {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 24px 100px;
  box-sizing: border-box;
  scroll-margin-top: 70px;
}

.genre-detail-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.genre-detail-left {
  flex: 0 0 50%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.genre-detail-tag-badge {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a1a1aa;
  font-weight: 600;
}

.genre-detail-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
}

.genre-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #a1a1aa;
}

.genre-detail-meta strong {
  color: #e4e4e7;
  font-weight: 600;
}

.genre-detail-description {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #d4d4d8;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 12px;
}

.genre-detail-description p {
  margin: 0 0 14px;
}

.genre-detail-description::-webkit-scrollbar {
  width: 6px;
}

.genre-detail-description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.genre-detail-description::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.genre-detail-lastfm-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #38bdf8;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.genre-detail-lastfm-link:hover {
  color: #7dd3fc;
  transform: translateX(4px);
}

.genre-detail-right {
  flex: 1;
  min-width: 0;
  position: relative;
}

.genre-detail-sim-card {
  position: relative;
  width: 100%;
  height: 520px;
  background: transparent;
  overflow: hidden;
}

.genre-detail-sim-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 900px) {
  .genre-detail-container {
    flex-direction: column;
    gap: 36px;
  }
  .genre-detail-left {
    flex: none;
    max-width: 100%;
    width: 100%;
  }
  .genre-detail-right {
    width: 100%;
  }
  .genre-detail-sim-card {
    height: 460px;
  }
}

/* Artist Orbit Solar System */
.artist-orbit-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 10px 16px 40px;
  box-sizing: border-box;
}

.artist-orbit-header {
  text-align: center;
  margin-bottom: 12px;
}

.artist-orbit-search-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 16px;
}

.artist-orbit-search-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 0 20px 0 16px;
  height: 42px;
  width: min(100%, 380px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.artist-orbit-search-pill:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.artist-orbit-mount {
  position: relative;
  width: 100%;
  max-width: 1100px;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: radial-gradient(circle at center, #18181f 0%, #111116 65%, #09090b 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.artist-orbit-canvas {
  display: block;
  width: 100%;
  height: 100%;
}




