/* --- SPOTIFY HEADER STYLING --- */
.spotify-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  background-color: #0a0a0a;
  padding: 25px 0 5px 0;  
  margin: 0;
  border: none;
  position: relative;
  z-index: 5;
}

.spotify-logo {
  width: 70px;
  height: 70px;
  filter: brightness(0) saturate(100%) invert(64%) sepia(71%) saturate(475%)
    hue-rotate(92deg) brightness(93%) contrast(92%);
}

.spotify-title {
  color: #1DB954;
  font-family: "Circular Std", "Helvetica Neue", Arial, sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 18px rgba(29, 185, 84, 0.25);
  border: 2px solid #1DB954;
  border-radius: 40px;
  padding: 6px 28px;
  display: inline-block;
  background: #0a0a0a;
  box-shadow:
    0 0 12px rgba(29, 185, 84, 0.35),
    inset 0 0 6px rgba(29, 185, 84, 0.15);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.spotify-title:hover {
  box-shadow:
    0 0 20px rgba(29, 185, 84, 0.55),
    inset 0 0 10px rgba(29, 185, 84, 0.25);
  transform: scale(1.02);
}

/* --- GENERAL PAGE STYLING --- */
body {
  font-family: "Circular Std", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  text-align: center;
  background-color: #0a0a0a;      
  color: rgba(255, 255, 255, 0.695);

  margin: 20px;                
  padding: 30px;                   
  min-height: 100vh;               
  box-sizing: border-box;

  border: 4px solid #1DB954;
  border-radius: 20px;
  box-shadow:
    0 0 25px rgba(29, 185, 84, 0.25),
    inset 0 0 12px rgba(29, 185, 84, 0.1);

  overflow-y: visible;           
  overflow-x: visible;           
}

h1 {
  margin-top: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ffffff;
}

h2, h3 {
  color: #1DB954;
  font-weight: 600;
}

svg {
  margin-top: 10px;
}

text {
  fill: white;
  font-size: 12px;
  text-anchor: middle;
  pointer-events: none;
  font-family: "Inter", "Helvetica Neue", sans-serif !important;
}

/* --- BUBBLE MAP SECTION --- */
.viz-section {
  margin: 0px auto;
  width: 90%;
  max-width: 1200px;
}

.viz-section h2 {
  margin-top: 15px;
  margin-bottom: 15px;
  font-weight: 500;
  color: #1DB954;
}

/* --- ARTIST LIST --- */
.artist-list {
  margin-top: 20px;
  text-align: center;
  color: white;
  font-size: 16px;
  line-height: 1.6;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.artist-list h2 {
  color: #1DB954;
  margin-bottom: 10px;
  font-weight: 600;
}

.artist-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.artist-list li {
  margin: 4px 0;
  color: #e0e0e0;
}

/* --- MODAL POPUP --- */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: visible;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease-in-out;
}

.modal-content {
  background: #121212;
  color: #eaeaea;
  margin: 4% auto;
  padding: 40px 50px;
  border: 1px solid #1DB95440;
  width: 75%;
  max-width: 750px;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  font-family: "Inter", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  max-height: 85vh;
  overflow-y: auto;
  overflow-x: auto;
}

.modal-content:hover {
  transform: scale(1.01);
  box-shadow: 0 0 45px rgba(29, 185, 84, 0.25);
}

.close {
  color: #bbb;
  float: right;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.25s ease;
}

.close:hover {
  color: #1DB954;
}

.modal-content h2 {
  text-align: center;
  color: #1DB954;
  font-size: 2rem;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.modal-content h3 {
  color: #1DB954;
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 30px;
  text-transform: uppercase;
  border-bottom: 1px solid #1DB95440;
  padding-bottom: 5px;
}

/* --- TOP 10 ARTIST LIST --- */
.modal-content ul {
  list-style-type: none;
  padding: 0;
  margin: 15px 0 25px 0;
}

.modal-content li {
  padding: 5px 0;
  border-bottom: 1px solid #222;
  font-size: 15.5px;
  color: #ccc;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  position: relative;
}

.modal-content li strong {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* --- ARTIST METADATA --- */
.artist-meta {
  color: #aaa;
  font-size: 14px;
  font-weight: 400;
  margin-top: 2px;
  margin-left: 2px;
}

/* --- SECTION CONTAINERS --- */
#artistListSection,
#efficiencyDashboard {
  margin-top: 20px;
  background: #0a0a0a;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* --- EFFICIENCY CONTAINER --- */
#efficiencyContainer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.efficiency-chart svg {
  background-color: #0f0f0f;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.05);
}

/* --- TOOLTIP (GENERIC) --- */
#tooltip {
  position: absolute;
  z-index: 2000;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 13px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

/* --- GCI TOOLTIP --- */
.gci-tooltip {
  position: fixed !important;
  z-index: 999999999 !important;
  background: #ffffff;
  color: #000000;
  border: 1px solid #000;
  padding: 10px;
  border-radius: 8px;
  pointer-events: none;
  font-size: 13px;
  max-width: 260px;
  line-height: 1.4;
}

/* --- FULLSCREEN EFFICIENCY MAP OVERLAY --- */
#efficiencyFullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(4px);
  padding: 40px;
  overflow: auto;
}

#efficiencyFullscreenContainer {
  width: 95%;
  height: 90%;
  margin: 0 auto;
  background: #0f0f0f;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255,255,255,0.05);
}

.fullscreen-close {
  position: fixed;
  top: 20px;
  right: 40px;
  font-size: 48px;
  color: white;
  cursor: pointer;
  z-index: 20001;
}

.expand-btn {
  background: #1DB954;
  color: black;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  margin-bottom: 15px;
}

.expand-btn:hover {
  background: #25e06f;
}

/* --- ANIMATION --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- TOP 10 ARTISTS IMAGE LIST --- */
.artist-inline {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.artist-inline-thumb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

.artist-inline strong {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}

/* --- GCI SECTION --- */
#gciSection {
  margin-top: 10px;
  background: #0a0a0a;
  border-radius: 10px;
  padding: 25px 30px;
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#gciSection h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #1DB954;
  border-bottom: 1px solid #1DB95440;
  padding-bottom: 5px;
  width: 100%;
}

.gci-chart svg {
  display: block;
  margin: 0 auto;
  background-color: #121212;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255,255,255,0.05);
}

/* --- GCI TEXT FONTS --- */
#gciContainer text {
  font-family: "Inter", "Segoe UI", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-anchor: middle;
  pointer-events: none;
}

/* --- CENTER TEXT --- */
.center-text {
  fill: #1DB954 !important;
  filter:
    drop-shadow(0 0 10px rgba(29,185,84,0.4))
    drop-shadow(0 0 20px rgba(29,185,84,0.2))
    drop-shadow(0 0 30px rgba(29,185,84,0.1));
  text-shadow:
    0 0 10px rgba(29,185,84,0.3),
    0 0 20px rgba(29,185,84,0.15);
}

/* POPULARITY CURVE SECTION */

/* UPDATED — smaller spacing */
#popularityContainer {
  border-radius: 12px;
  padding: 10px;
  margin-top: 0px;      
}

#popularityDashboard {
  background: #0a0a0a;
  padding: 20px 30px 10px 30px;
  border-radius: 12px;
  margin-top: 30px;
  margin-bottom: 30px;
}

#popularityContainer svg {
  border-radius: 50px;
  margin-bottom: 30px;
  margin-top: 0px;
}

#popularityContainer .domain,
#popularityContainer .tick line {
  stroke: #cfcfcf;
}

.tooltip {
  background: rgba(30,30,30,0.95);
  color: #ffffff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  font-family: "Inter", "Helvetica Neue", sans-serif !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  pointer-events: none;
}

#popularityContainer path {
  stroke-width: 3;
}

#popularityContainer circle {
  stroke: #191414;
  stroke-width: 1.5px;
  transition: r 0.2s ease, fill 0.2s ease;
}

#popularityContainer circle:hover {
  fill: #1db954;
  r: 8;
}

/* --- BOTTOM SPACING FOR EFFICIENCY --- */
#efficiencyContainer {
  transition: all 0.35s ease;
  padding-bottom: 30px;
  padding-left: 10px;
}

/* 
   SPOTIFY-STYLE CIRCULAR LEGEND BOX (HORIZONTAL)
*/
.roi-legend-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: -25px;
  margin-top: 10px;
}

.roi-legend-box-horizontal {
  display: flex;
  gap: 22px;
  margin-bottom: 0px;
  align-items: center;

  /* Spotify pill look */
  background: rgba(25, 25, 25, 0.85);
  padding: 10px 22px;

  border-radius: 999px;          /* circular pill shape */
  backdrop-filter: blur(6px);    /* subtle glass effect */
  box-shadow: 0 0 18px rgba(29, 185, 84, 0.15); /* green glow */
  border: 1px solid rgba(255,255,255,0.08);
}

.legend-horizontal-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e5e5e5;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(0,0,0,0.7);
}

.modal-content {
  max-height: 85vh !important;
  overflow-y: auto !important;
  overflow-x: hidden;
}

#gciContainer, #gciSection, .gci-html-legend {
  overflow: visible !important;
  height: auto !important;
}

#gciContainer svg {
  overflow: visible !important;
}


/* 
  FINAL FIX — Reduce gap between sliders and popularity chart
*/

#popularityDashboard {
  margin-top: 10px !important;
  padding-top: 10px !important;
  padding-bottom: 0px !important;
}

#popularityContainer {
  margin-top: 0px !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

#year-range-controls {
  margin-bottom: 5px !important;
  padding-bottom: 0 !important;
}

#popularityContainer .x-axis .tick text {
  transform: translateY(20px);
}

#popularityContainer .y-axis .tick text {
  transform: translateX(-10px);
}


/* 
   UNIFIED AXIS TEXT STYLE — Efficiency + Popularity
*/

.efficiency-chart .tick text,
#efficiencyContainer .tick text,
#efficiencyContainer .axis-label,
#efficiencyFullscreenContainer .tick text,
#efficiencyFullscreenContainer .axis-label,

#popularityContainer .tick text,
#popularityContainer .axis-label {

  font-family: "Inter", sans-serif !important;
  font-weight: 400 !important;
  font-size: 13px;
  fill: #e5e5e5 !important;
  letter-spacing: 0.3px;
  pointer-events: none;
}

/* Force SVG axis labels */
.axis-label {
  font-family: "Inter", sans-serif !important;
  font-weight: 400 !important;
  font-size: 13px;
  fill: #ffffff !important;
  text-anchor: middle;
}



/* 
   SPOTIFY PARTIAL-FILL SLIDER — DARK TRACK + GREEN GLOW
*/

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 260px;
  height: 8px;
  background: transparent;
  outline: none;
  border-radius: 6px;
  filter: drop-shadow(0 0 6px rgba(29,185,84,0.35));  /* soft green glow */
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(
    to right,
    #1DB954 0%,
    #1DB954 var(--range-progress),
    #1a1a1a var(--range-progress),
    #1a1a1a 100%
  );
  box-shadow: 0 0 10px rgba(29,185,84,0.20); /* glow on full track */
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #1DB954;
  cursor: pointer;
  margin-top: -5px;
  box-shadow: 0 0 10px rgba(29,185,84,0.5); /* glowing thumb */
}

input[type="range"]::-ms-track {
  height: 8px;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type="range"]::-ms-fill-lower {
  background: #1DB954;
  border-radius: 6px;
}

input[type="range"]::-ms-fill-upper {
  background: #1a1a1a;
  border-radius: 6px;
}

/* DARK OUTLINE AROUND THE THUMB */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #1DB954;                        /* Spotify green */
  border: 2px solid #0d0d0d;                  /* darker outline */
  cursor: pointer;
  margin-top: -5px;
  box-shadow: 0 0 6px rgba(29,185,84,0.35);   /* softer glow */
}

input[type="range"]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #1DB954;
  border: 2px solid #0d0d0d;                  /* darker outline */
  cursor: pointer;
  box-shadow: 0 0 6px rgba(29,185,84,0.35);
}

input[type="range"]::-ms-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #1DB954;
  border: 1px solid #0d0d0d;                  /* darker outline */
  cursor: pointer;
  box-shadow: 0 0 6px rgba(29,185,84,0.35);
}

::-webkit-scrollbar {
  width: 0px;                  
  height: 0px;
}


/* 
   BUBBLE MAP — CENTER TEXT OVERRIDE
*/
.bubble-center-text tspan,
.bubble-center-text {
  font-family: "Circular Std", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 900 !important;
  font-size: 20px !important;
  letter-spacing: 0.7px !important;
  fill: #1DB954 !important;
  pointer-events: none; /* prevents blocking bubble hover */
  text-anchor: middle;
}

/* 
   QUADRANT POPUP 
*/
.quad-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 380px;
  max-height: 520px;
  overflow-y: auto;

  background: rgba(20, 40, 20, 0.85); /* green tint */
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.10);

  box-shadow: 0 0 40px rgba(29,185,84,0.25);
  backdrop-filter: blur(10px);

  z-index: 9999999;
  color: #e8e8e8;
}

/* Animation */
.quad-popup {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Header */
.quad-popup h2 {
  margin-top: 0;
  color: #1DB954;
  font-size: 22px;
  font-weight: 700;
}

/* Top description */
.qp-desc {
  margin-bottom: 14px;
  opacity: 0.9;
}

/* Top stats row */
.qp-stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  text-align: center;
}

.qp-stats-row div strong {
  color: #1DB954;
  font-size: 17px;
}

/* Stats box */
.qp-stats-box {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.qp-stats-box strong {
  color: #1DB954;
  font-size: 15px;
}

/* Sorting */
.qp-sort-label {
  font-size: 14px;
  opacity: 0.9;
}

.qp-dropdown {
  width: 100%;
  padding: 8px;
  margin: 6px 0 14px 0;
  background: rgba(255,255,255,0.08);
  color: white;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Artist list */
.qp-artist-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.qp-artist-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.qp-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Close button */
.quad-popup-close {
  width: 100%;
  padding: 10px 0;
  background: #1DB954;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.quad-popup-close:hover {
  background: #18a647;
}

/* Slider styling */
#year-range-controls input[type="range"] {
  width: 300px;
  margin: 6px;
}

#yearRangeLabel {
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-block;
}

/* POPUP VIDEO MODAL */
/* Spotify Pill Button (Screencast Button) */
.video-button {
  background: rgba(25, 25, 25, 0.85);
  padding: 10px 22px;
  border-radius: 999px; /* pill shape */
  backdrop-filter: blur(6px);
  box-shadow: 0 0 25px rgba(29, 185, 84, 0.15); /* soft green glow */
  border: 1px solid rgba(255, 255, 255, 0);

  color: #1DB954;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin: 30px auto;
  margin-bottom: 30px;
  display: block;
  text-align: center;

  transition: all 0.25s ease;
}

.video-button:hover {
  background: rgba(40, 40, 40, 0.9);
  box-shadow: 0 0 24px rgba(29, 185, 84, 0.25);
  transform: translateY(-2px);
}

.video-button:active {
  transform: scale(0.97);
}

.video-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
}

.video-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #111;
  padding: 10px;
  border-radius: 8px;
}

.video-close {
  color: white;
  float: right;
  font-size: 32px;
  cursor: pointer;
  margin-bottom: 5px;
}


/* Spotify Pill Button (Process Book Button) */
.processbook-button {
  background: rgba(25, 25, 25, 0.85);
  padding: 10px 22px;
  border-radius: 999px; 
  backdrop-filter: blur(6px);
  box-shadow: 0 0 25px rgba(29, 185, 84, 0.15);

  border: 1px solid rgba(255, 255, 255, 0);
  color: #1DB954;
  font-size: 16px;
  font-weight: 600;

  cursor: pointer;

  display: inline-block;       /* ← FIX: prevents full-width stretch */
  width: auto;                 /* ← FIX: shrink-wrap button */
  text-align: center;
  text-decoration: none;

  margin: 10px auto;           /* centers inline-block within container */
  transition: all 0.25s ease;
}

.processbook-button:hover {
  background: rgba(40, 40, 40, 0.9);
  box-shadow: 0 0 24px rgba(29, 185, 84, 0.25);
  transform: translateY(-2px);
}

.processbook-button:active {
  transform: scale(0.97);
}
