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

:root {
  --bg: #0b0b14;
  --bg-card: rgba(18, 18, 35, 0.65);
  --bg-card-hover: rgba(25, 25, 50, 0.8);
  --glass-border: rgba(120, 80, 220, 0.15);
  --glass-border-hover: rgba(180, 100, 255, 0.35);
  --text: #e8e8f4;
  --text-dim: #6e6e8a;
  --pink: #e84393;
  --purple: #a855f7;
  --cyan: #06d6a0;
  --blue: #4cc9f0;
  --orange: #f4845f;
  --green: #55efc4;
  --sidebar-w: 200px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  overflow-x: hidden;
}

/* ============ BACKGROUND ============ */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    url('images/bg-texture.png') center center / cover no-repeat fixed;
  opacity: 0.35;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(168, 85, 247, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(232, 67, 147, 0.06) 0%, transparent 50%);
}

#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============ SIDEBAR ============ */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
}

.sidebar-logo {
  padding: 0 1.2rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.logo-dna {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.3));
}

.logo-sub {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(168, 85, 247, 0.08);
  border-left-color: rgba(168, 85, 247, 0.4);
}

.nav-link:hover svg {
  transform: scale(1.15);
}

.nav-link.active {
  color: var(--purple);
  border-left-color: var(--purple);
  background: rgba(168, 85, 247, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--purple);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 0 12px var(--purple);
}

/* ============ MAIN ============ */

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.section {
  padding: 3rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============ REVEAL — frequency scan ============ */

.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.reveal.visible {
  opacity: 1;
}

.reveal.visible::after {
  content: '';
  position: absolute;
  top: 0;
  left: -5%;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--purple), transparent);
  box-shadow: 0 0 12px var(--purple), 0 0 25px rgba(168, 85, 247, 0.3);
  animation: scanLine 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes scanLine {
  0% { left: -5%; opacity: 1; }
  80% { opacity: 0.6; }
  100% { left: 105%; opacity: 0; }
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ============ SECTION DIVIDER ============ */

.section::after {
  content: '';
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  margin: 2rem auto 0;
  opacity: 0.2;
}

#decades::after {
  display: none;
}

/* ============ GLASS CARD ============ */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  box-shadow:
    0 8px 40px rgba(168, 85, 247, 0.1),
    inset 0 0 30px rgba(168, 85, 247, 0.03);
}

.glass-card.neon-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card.neon-hover:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.12),
    0 0 60px rgba(168, 85, 247, 0.06),
    inset 0 0 40px rgba(168, 85, 247, 0.04);
}

/* ============ HERO ============ */

#hero {
  padding-top: 0;
  padding-bottom: 2rem;
  text-align: center;
  position: relative;
  min-height: auto;
  gap: 0;
}

.hero-banner {
  width: calc(100% + 6rem);
  margin: -4rem -3rem 2.5rem -3rem;
  height: 280px;
  background: url('images/banner.png') center 40% / cover no-repeat;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 20, 0) 0%,
    rgba(11, 11, 20, 0.4) 60%,
    rgba(11, 11, 20, 1) 100%
  );
}

@media (max-width: 768px) {
  .hero-banner {
    width: calc(100% + 3rem);
    margin: -3rem -1.5rem 2rem -1.5rem;
    height: 200px;
  }
}

/* Wave canvas */
.hero-wave-wrap {
  width: 100%;
  max-width: 600px;
  height: 60px;
  margin: 0.3rem auto;
  position: relative;
}

#heroWave {
  width: 100%;
  height: 100%;
}

/* Hero intro reveal */
.hero-reveal {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-reveal.visible {
  opacity: 1;
}

.hero-reveal-d1 { transition-delay: 0.3s; }
.hero-reveal-d2 { transition-delay: 0.6s; }
.hero-reveal-d3 { transition-delay: 0.9s; }

.hero-header {
  margin-bottom: 1.2rem;
  text-align: center;
}

.hero-subtitle {
  margin-top: 0.3rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
}

.title-line {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--text-dim);
  transition: all 0.5s;
  cursor: default;
}

.title-neon {
  color: var(--text-dim);
  font-weight: 600;
  transition: filter 0.3s;
  cursor: default;
}

.title-neon:hover {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(
    90deg,
    var(--purple) 0%,
    var(--pink) 20%,
    #fff 25%,
    var(--cyan) 30%,
    var(--purple) 50%,
    var(--pink) 70%,
    #fff 75%,
    var(--cyan) 80%,
    var(--purple) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonSweep 2s linear infinite;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4))
         drop-shadow(0 0 30px rgba(232, 67, 147, 0.2));
}

.title-accent {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--pink), var(--cyan));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite alternate;
  position: relative;
  cursor: default;
}

.title-accent:hover {
  animation: none;
  background: linear-gradient(
    90deg,
    var(--purple) 0%,
    var(--pink) 20%,
    #fff 25%,
    var(--cyan) 30%,
    var(--purple) 50%,
    var(--pink) 70%,
    #fff 75%,
    var(--cyan) 80%,
    var(--purple) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonSweep 2s linear infinite;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4))
         drop-shadow(0 0 30px rgba(232, 67, 147, 0.2));
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes neonSweep {
  0% { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 0.8rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  max-width: 650px;
  width: 100%;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.4s;
}

.stat-card[data-glow="pink"]::before { background: radial-gradient(circle at 50% 0%, rgba(232, 67, 147, 0.18), transparent 70%); }
.stat-card[data-glow="purple"]::before { background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.18), transparent 70%); }
.stat-card[data-glow="cyan"]::before { background: radial-gradient(circle at 50% 0%, rgba(6, 214, 160, 0.18), transparent 70%); }
.stat-card[data-glow="green"]::before { background: radial-gradient(circle at 50% 0%, rgba(85, 239, 196, 0.18), transparent 70%); }
.stat-card[data-glow="orange"]::before { background: radial-gradient(circle at 50% 0%, rgba(244, 132, 95, 0.18), transparent 70%); }
.stat-card[data-glow="blue"]::before { background: radial-gradient(circle at 50% 0%, rgba(76, 201, 240, 0.18), transparent 70%); }

.stat-card:hover::before { opacity: 1; }

.stat-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--glass-border-hover);
}

.stat-icon {
  margin-bottom: 0.4rem;
  opacity: 0.45;
  line-height: 0;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-number {
  font-family: 'Space Mono', monospace;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card[data-glow="pink"] .stat-number { color: var(--pink); }
.stat-card[data-glow="purple"] .stat-number { color: var(--purple); }
.stat-card[data-glow="cyan"] .stat-number { color: var(--cyan); }
.stat-card[data-glow="green"] .stat-number { color: var(--green); }
.stat-card[data-glow="orange"] .stat-number { color: var(--orange); }
.stat-card[data-glow="blue"] .stat-number { color: var(--blue); }

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.4rem;
}

/* ============ SECTION HEADERS ============ */

.section-header {
  margin-bottom: 1.2rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.section-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.section-title em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-style: italic;
}

/* Layout rhythm — alternate alignment */
#languages .section-header { text-align: center; }
#map .section-header { text-align: left; align-self: flex-start; }
#genres .section-header { text-align: right; align-self: flex-end; }
#decades .section-header { text-align: center; }

/* ============ TICKER ============ */

#languages {
  overflow: hidden;
}

.ticker-wrapper {
  position: relative;
  overflow: hidden;
  cursor: grab;
  padding: 1rem 0;
  width: 100vw;
  margin-left: calc(-50vw + 50% - var(--sidebar-w)/2);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.ticker-wrapper:active { cursor: grabbing; }

.ticker-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: tickerScroll 140s linear infinite;
  will-change: transform;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.7rem 1.2rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ticker-item:hover {
  border-color: var(--purple);
  background: var(--bg-card-hover);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.ticker-lang {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(6, 214, 160, 0.3);
}

.ticker-sep {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.ticker-detail {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.ticker-detail strong {
  color: var(--text);
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Language grid */

.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  justify-content: center;
  max-width: 100%;
}

.lang-chip {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: default;
  transition: all 0.3s;
}

.lang-chip:hover {
  color: var(--text);
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15), 0 0 8px rgba(168, 85, 247, 0.08);
}

.lang-chip:hover .chip-native {
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.lang-chip .chip-native {
  font-weight: 600;
  color: var(--text);
}

/* ============ MAP ============ */

.map-card {
  padding: 1.5rem;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

#mapContainer {
  width: 100%;
  aspect-ratio: 2 / 1;
  position: relative;
}

#mapContainer svg {
  width: 100%;
  height: 100%;
}

.map-country {
  fill: transparent;
  stroke: rgba(168, 85, 247, 0.18);
  stroke-width: 0.5;
  transition: all 0.3s;
}

.map-country.active {
  cursor: pointer;
  fill: rgba(168, 85, 247, 0.15);
}

.map-country.active:hover {
  fill: rgba(168, 85, 247, 0.35);
  stroke: var(--purple);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

.map-dot {
  fill: var(--cyan);
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(6, 214, 160, 0.6));
}

.map-dot-pulse {
  fill: var(--cyan);
  pointer-events: none;
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.6; r: 3; }
  50% { opacity: 0.15; r: 8; }
}

/* Language toggle + grid */
.lang-toggle {
  text-align: center;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  background: var(--bg-card);
  transition: all 0.3s;
  margin-top: 1.5rem;
  align-self: center;
}

.lang-toggle:hover {
  color: var(--purple);
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.08);
}

.lang-toggle.open {
  color: var(--purple);
  border-color: var(--purple);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
  max-width: 100%;
  width: 100%;
  margin-top: 1.2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s;
  opacity: 0;
}

.lang-grid.open {
  max-height: 800px;
  opacity: 1;
}

.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  transition: all 0.3s;
  cursor: default;
  text-align: center;
}

.lang-card:hover {
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.12);
}

.lang-card-native {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.lang-card-name {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Country list — desktop only */
.country-list {
  display: none;
}

.map-tooltip {
  position: fixed;
  background: rgba(12, 12, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--cyan);
  border-radius: 12px;
  padding: 1rem 1.3rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 100;
  max-width: 300px;
  box-shadow: 0 8px 30px rgba(6, 214, 160, 0.15);
}

.map-tooltip.visible { opacity: 1; }

.map-tooltip .tt-country {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.map-tooltip .tt-count {
  color: var(--cyan);
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
}

.map-tooltip .tt-artists {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* ============ GENRES ============ */

.genre-card {
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.genre-row {
  margin-bottom: 0.6rem;
}

.genre-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.genre-bar:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.06);
}

.genre-bar:hover .genre-bar-fill {
  opacity: 0.35;
  filter: brightness(1.3);
}

.genre-bar:hover .genre-bar-dot {
  box-shadow: 0 0 12px currentColor, 0 0 24px currentColor;
  transform: scale(1.3);
}

.genre-bar-dot {
  transition: all 0.3s;
}

.genre-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 10px;
  opacity: 0.18;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  width: 0%;
}

.genre-bar:hover .genre-bar-fill {
  opacity: 0.3;
}

.genre-bar-name {
  font-weight: 600;
  font-size: 0.92rem;
  z-index: 1;
  flex: 1;
}

.genre-bar-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  z-index: 1;
  opacity: 0.5;
}

.genre-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 8px currentColor;
}

.genre-bar.active {
  border-color: var(--glass-border-hover);
}

.genre-bar.active .genre-bar-fill {
  opacity: 0.25;
}

/* Sub-genres */

.subgenre-list {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 1.8rem;
}

.subgenre-list.open {
  max-height: 600px;
}

.subgenre-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0.8rem;
  margin: 0.2rem 0;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.subgenre-bar:hover {
  background: rgba(255, 255, 255, 0.03);
}

.subgenre-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 8px;
  opacity: 0.1;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.subgenre-bar-name {
  font-size: 0.82rem;
  color: var(--text-dim);
  z-index: 1;
  flex: 1;
}

.subgenre-bar:hover .subgenre-bar-name {
  color: var(--text);
}

.subgenre-bar-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  z-index: 1;
  opacity: 0.5;
}

.genre-expand-icon {
  z-index: 1;
  font-size: 0.7rem;
  color: var(--text-dim);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.genre-bar.active .genre-expand-icon {
  transform: rotate(90deg);
}

.hidden { display: none; }

/* ============ GEMS / CURIOSITÉS ============ */

.gems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

@media (max-width: 768px) {
  .gems-grid {
    grid-template-columns: 1fr;
  }
}

.gem-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.gem-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.08);
}

.gem-card.wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .gem-card.wide {
    grid-column: span 1;
  }
}

.gem-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.gem-value {
  font-family: 'Space Mono', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.gem-value.pink { color: var(--pink); }
.gem-value.purple { color: var(--purple); }
.gem-value.cyan { color: var(--cyan); }
.gem-value.green { color: var(--green); }

.gem-detail {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

.gem-detail strong {
  color: var(--text);
  font-style: normal;
}

/* Did you know cards */
.dyk-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
  transition: all 0.4s;
  grid-column: span 2;
}

@media (max-width: 768px) {
  .dyk-card { grid-column: span 1; }
}

.dyk-card:hover {
  border-color: var(--glass-border-hover);
  color: var(--text);
}

.dyk-card strong {
  color: var(--purple);
  font-style: normal;
  font-family: 'Space Mono', monospace;
}

/* ============ DECADES ============ */

.decades-card {
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.decades-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  height: 280px;
  width: 100%;
}

.decade-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.decade-bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  min-height: 4px;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom;
  height: 0;
}

.decade-bar:hover {
  filter: brightness(1.4);
  transform: scaleX(1.1);
  box-shadow: 0 0 25px currentColor;
}

.decade-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.5s;
}

.decade-count.visible {
  opacity: 1;
}

.decade-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.8rem;
}

/* ============ SCROLLBAR ============ */

.last-updated {
  font-size: 0.6rem;
  color: rgba(110, 110, 138, 0.4);
  letter-spacing: 0.03em;
  padding: 0 1.2rem;
  margin-top: auto;
}

@media (max-width: 768px) {
  .last-updated { display: none; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.5); }

/* ============ FOOTER ============ */

footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-left: var(--sidebar-w);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  footer { margin-left: 0; }
  .section {
    padding: 2rem 1rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  .stat-number { font-size: 2rem; }
  .ticker-wrapper {
    margin-left: calc(-50vw + 50%);
  }

  /* MAP — zoomable globe on mobile */
  .map-card {
    padding: 0;
    overflow: hidden;
    touch-action: none;
  }
  #mapContainer {
    aspect-ratio: 1 / 1;
  }

  /* GENRES — no card wrapper on mobile */
  .genre-card {
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: 0;
    min-height: auto;
  }
  .genre-card:hover {
    background: none;
    border-color: transparent;
    box-shadow: none;
  }
  .genre-bar {
    padding: 0.6rem 0.8rem;
  }
  .genre-bar-name {
    font-size: 0.85rem;
  }
  .subgenre-list {
    padding-left: 1.2rem;
  }

  /* DECADES */
  .decades-card {
    padding: 1.5rem 1rem;
  }
  .decades-chart {
    gap: 0.5rem;
    height: 200px;
  }
  .decade-count { font-size: 0.7rem; }
  .decade-label { font-size: 0.65rem; }

  /* HERO */
  .hero-banner {
    width: calc(100% + 2rem);
    margin: -2rem -1rem 2rem -1rem;
    height: 180px;
  }
}
