/* Optimized Widget: rank_legend */
.rank-legend-container { overflow: visible; display: flex; flex-direction: row; align-items: center; gap: 1rem; transition: opacity 0.4s ease, transform 0.4s ease; position: relative; z-index: 1; text-align: left !important; justify-content: flex-start !important; }
.rank-legend-title { font-family: "JetBrains Mono", "Share Tech Mono", "Consolas", monospace; font-size: 0.85rem; color: #a78bfa; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.1em; display: inline-flex; align-items: center; gap: 0.5rem; margin-left: 0 !important; vertical-align: middle; font-weight: 800; white-space: nowrap; flex-shrink: 0; text-align: left !important; justify-content: flex-start !important; }
.rank-legend-rail { display: flex; align-items: center; justify-content: flex-start; overflow: visible; }
.rank-legend-title::before { content: ">"; color: #6c63ff; font-weight: bold; }
.rank-legend-title .pulse-dot { display: none; }
.rank-legend { display: flex; gap: 0.2rem; justify-content: flex-start !important; flex-wrap: nowrap; text-align: left !important; }
.rank-legend__item { position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); background: rgba(10, 12, 20, 0.6); border: 1px solid rgba(108, 99, 255, 0.2); border-radius: 6px; padding: 0.15rem; outline: none; }
.rank-legend__badge { display: flex; align-items: center; justify-content: center; gap: 0; min-width: 32px; height: 32px; }
.rank-legend__icon { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 5px rgba(0,0,0,0.5)); }
.rank-legend__info { display: flex; flex-direction: column; padding: 0; max-width: 0; opacity: 0; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); white-space: nowrap; margin-left: 0; }
.rank-legend__name { font-size: 0.65rem; font-weight: 900; text-transform: uppercase; line-height: 1; }
.rank-legend__score { font-size: 0.55rem; color: #d1def0; font-family: "Courier New", Courier, monospace; }
.rank-legend__item:hover, .rank-legend__item:focus { background: rgba(108, 99, 255, 0.25); border-color: rgba(108, 99, 255, 0.6); z-index: 100; transform: translateY(-2px) scale(1.1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(108, 99, 255, 0.2); }
.rank-legend__item:hover .rank-legend__info, .rank-legend__item:focus .rank-legend__info { max-width: 130px; opacity: 1; padding-right: 0.6rem; margin-left: 0.4rem; }
.rankings-nav-wrapper.is-open ~ .rank-legend-container, .rankings-nav-wrapper.is-open .rank-legend-container { opacity: 0; pointer-events: none; transform: scale(0.95); }
@media (min-width: 1280px) {
  .rank-legend-rail { zoom: 1.3; }
  @supports not (zoom: 1) {
    .rank-legend-rail { transform: scale(1.3); transform-origin: left center; width: calc(100% / 1.3); }
  }
}
@media (max-width: 1279px) {
  .rank-legend-container { flex-direction: column !important; align-items: flex-start !important; gap: 0 !important; width: 100% !important; max-width: 100% !important; overflow: visible !important; margin-top: -0.2rem !important; }
  .rank-legend-title { font-size: 0.55rem; padding: 0; margin-left: 0 !important; opacity: 0.6; }
  .rank-legend { display: flex !important; width: 100% !important; flex-wrap: nowrap !important; justify-content: flex-start !important; gap: 0.35rem !important; overflow-x: auto !important; padding: 0.2rem 0 !important; white-space: nowrap !important; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(to right, 
            black 0%, 
            black 85%, 
            transparent 100%
        ); -webkit-mask-image: linear-gradient(to right, 
            black 0%, 
            black 85%, 
            transparent 100%
        ); scrollbar-width: none; }
  .rank-legend::-webkit-scrollbar { display: none; }
  .rank-legend__badge { min-width: 24px; height: 24px; }
  .rank-legend__icon { width: 20px; height: 20px; }
}
@media (max-width: 992px) {
  .rank-legend { justify-content: flex-start !important; }
}
@media (max-width: 480px) {
  .rank-legend-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .rank-legend-container::-webkit-scrollbar { display: none; }
  .rank-legend { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0.4rem; padding: 0 0.25rem; width: max-content; }
  .rank-legend__item { flex-shrink: 0; display: flex; align-items: center; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .rank-legend__info { position: static; transform: none; background: transparent; padding: 0; margin: 0; border: none; box-shadow: none; width: auto; min-width: 0; max-width: 0; opacity: 0; align-items: flex-start; z-index: auto; transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .rank-legend__info::after { display: none; }
  .rank-legend__item:focus, .rank-legend__item:active { background: rgba(108, 99, 255, 0.2); border-color: rgba(108, 99, 255, 0.6); padding-right: 0.25rem; }
  .rank-legend__item:focus .rank-legend__info, .rank-legend__item:active .rank-legend__info { max-width: 150px; opacity: 1; margin-left: 0.35rem; padding-right: 0.5rem; }
}
