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

*:focus {
  outline: none;
}


:root {
  --bg-color: #f0f2f5;
  --white: #ffffff;
  --text-main: #1a1a1a;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --accent: #3770b1;
  --accent-hover: #2e5e95;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  --radius: 5px;
  --font-family: 'Inter', system-ui, sans-serif;
  --transition: 0.2s ease;
  --hover-bg: #f3f4f6;
  --track-hover: #1e3a8a;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 80px;
}

.container {
  margin: 0 auto;
}

.header, .footer {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.5px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav a:hover {
  color: var(--accent);
  background-color: #f3f4f6;
}
#input::placeholder {
  color: #888; /* Серый цвет */
  opacity: 1;  /* Убирает прозрачность по умолчанию в некоторых браузерах */
}

/* Hero Section */
.track-hero, .artist-hero, .playlist-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  
  background: var(--white);
  padding: 2rem;
}

.track-cover, .album-cover, .playlist-cover {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}
.artist-cover {
  position: relative;
  width: 320px;
  height: 320px;
  flex-shrink: 0;
}

.track-cover img, .artist-cover img, .playlist-cover img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}



.track-info, .artist-info, .playlist-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.track-info a, .artist-info a, .playlist-info a {
text-decoration: none;
color: var(--text-main);
}
.track-info a:hover, .artist-info a:hover, .playlist-info a:hover {
text-decoration: underline dotted;
}

.track-title, .artist-title, .playlist-title {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 700;
}

.artist-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.artist-line a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.artist-line a:hover {
  color: var(--accent-hover);
}

.track-meta, .artist-meta, .playlist-meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 25px;
}
.track-meta a, .artist-meta a, .playlist-meta a {
  color: inherit;
  text-decoration: none;
}

.track-meta a:hover, .artist-meta a:hover, .playlist-meta a:hover {
  text-decoration: underline dotted;
}


.track-meta .dot, .artist-meta .dot, .playlist-meta .dot {
  margin: 0 0.5rem;
  color: #ccc;
}

.track-actions {
margin-top: auto;
  display: flex;              /* включаем флексбокс */
  align-items: center;        /* вертикальное выравнивание по центру */
  gap: 0.75rem;               /* промежуток между кнопками (по желанию) */
}


.spotify-listen {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
}

.spotify-listen:hover {
  background: var(--accent-hover);
}

/* Tabs */
.tabbed-content {
  background: var(--white);
}

.tabs, .pageheaders {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
    white-space: nowrap;
     text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
}


.tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.tab.active {
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
}

.tab:hover {
  color: var(--accent-hover);
}

.tab-content {
  display: none;
  padding: 2rem;
}

.tab-content.active {
  display: block;
}

  /* Lyrics */

 
.lyrics-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.lyrics-columns {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.lyrics-block, .translation-block {
  display: flex;
  flex-direction: column;
}

.lyrics-line, .translation-line {
  padding: 0.4rem 0.6rem;
  transition: background 0.3s ease;
  border-radius: 6px;
  line-height: 1.5;
}

.lyrics-line:hover,
.translation-line:hover,
.lyrics-line.hover-match,
.translation-line.hover-match {
  background: rgba(0, 0, 0, 0.05);
}

.translation-block {
  background: #349ee10f;
    padding-right: 1.25rem;
    padding-bottom: 1rem;
    padding-left: 1.25rem;
  border-left: 4px solid var(--accent);
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .lyrics-columns {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .lyrics-block, .translation-block {
    width: 50%;
  }
}

.video-wrapper {
  aspect-ratio: 16 / 9;
  max-width: 720px;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}




/* Copyright */
.copyright {
  font-size: 0.5rem;
  color: var(--text-secondary);
  margin-top: 2rem;
}

/* Related Tracks / Playlists */
.more-tracks, .playlists, .description, .albums {
  margin-top: 2rem;
}

.more-tracks h3,
.playlists h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.mini-playlist-list, .mini-videolist-list {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: visible; /* <-- разрешаем вылезание по вертикали */
  position: relative;  /* <-- чтобы z-index внутри работал */
  padding-bottom: 0.5rem; /* небольшое пространство снизу */
}

.mini-playlist-item {
  width: 160px;
  text-align: center;
  overflow-x: hidden; /* Обрезаем всё, что выходит */
  flex: 0 0 auto;
}

.mini-videolist-item {
  width: 160px;
  text-align: center;
  overflow-x: hidden; /* Обрезаем всё, что выходит */
  flex: 0 0 auto;
}

.mini-playlist-item a, .mini-videolist-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.mini-playlist-item a:hover, .mini-videolist-item a:hover {
text-decoration: underline dotted;
}


.mini-playlist-item img, .mini-videolist-item img {
  width: 100%;
  transition: transform 0.25s ease;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: block;
  height: auto;
  
}

.mini-playlist-item a:hover img, .mini-videolist-item a:hover img {
  transform: scale(1.05);
}


.playlist-name {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Statistics Tab */
.chart-visuals {
  margin-top: 1rem;
}

.chart-placeholder {
  background: #e5e7eb;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.chart-history {
  list-style: disc;
  margin-top: 1rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.chart-history li {
  margin-bottom: 0.3rem;
}

/* Player container */
.player-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #000;
  z-index: 1000;
  display: none;
}

.player-container.show {
  display: block;
}

#soundcloud-player iframe {
  height: 120px; 
}

/* Responsive */
@media (max-width: 768px) {
  .track-hero, .artist-hero {
    flex-direction: column;
    align-items: center;
  }

  .track-info, .artist-info {
    align-items: center;
    text-align: center;
  }

  .track-title, .artist-info {
    font-size: 1.5rem;
  }
}
/* Кнопка воспроизведения */
.single-player {
  background: transparent;
  font-size: 1.5rem;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border var(--transition);
}
.single-video {
  background: transparent;
  font-size: 1.5rem;
  padding: 0.23rem 1.13rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border var(--transition);
}

/* Слушать */
.single-player {
  color: var(--accent);
  border: 2px solid var(--accent);
}

.single-player:hover {
  background: var(--accent);
  color: #fff;
}

/* Смотреть клип */
.single-video {
  color: #fa5a5a;
  border: 2px solid #fa5a5a;
}
.single-video svg{
  transform: scale(1.4) translateY(3px);
  transform-origin: center;
}

.single-video:hover {
  background: #fa5a5a;
  color: #fff;
}

/* График */
#spotifyChart {
  max-height: 200px;
  height: 200px;
  width: 100%;
}
@media (max-width: 480px) {
  .track-hero, .artist-hero {
    padding: 1rem;
    gap: 1.5rem;
  }

  .track-info, .artist-info {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .artist-line {
    justify-content: center;
  }


  .play-button.large {
    width: 100%;
    max-width: 240px;
  }

  .track-meta, .artist-meta {
    align-items: center;
    margin-bottom: 20px;
  }

  .tab {
    flex: 1 1 auto;
    text-align: center;
  }
}

.single-artist-line {
    display: inline;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
    flex-shrink: 0;
}

.single-artist-line a {
    color: var(--accent);
    text-decoration: none;
}

.single-artist-line a:hover {
text-decoration: underline dotted;
}

h2, h3 {
  position: relative;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

h3::after, h2::after {
    content: "";
    position: absolute;
    left: 0px;
    bottom: 0px;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--accent), transparent);
    border-radius: 4px;

}



/* === FLEBOX EXTRA STYLES === */

/* Sidebar */
.sidebar {
  width: 225px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform var(--transition);
  z-index: 1200;
  overflow-y: auto;
}
.sidebar.active {
  transform: translateX(0);
}

.sidebar a {
  text-decoration: none;
  color: var(--text-main);
}
.menu-holder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}
.sidebar ul {
  list-style: none;
}
.sidebar li {
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar li:hover {
  background: #eee;
}
.sidebar li.active, .sidebar li.active a {
  background: var(--bg-color);
  color: var(--accent-hover);
}
.sidebar .cta {
  display: block;
  margin: 20px auto;
  background: var(--track-hover);
  color: var(--white);
  padding: 8px 12px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  text-transform: uppercase;
  cursor: pointer;
}

/* Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition);
}
.sidebar.active ~ .sidebar-overlay {
  visibility: visible;
  opacity: 1;
}

/* Header */
header {
  width: 100%;
  background: var(--accent-hover);
  color: var(--white);
  z-index: 1100;
}

.logo a {
  color: var(--white);
  text-decoration: none;
  display: inline-block;
}



.top-bar {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 10px;
}
.top-bar h1 {
  font-size: 20px;
  flex-grow: 1;
  text-decoration: none;
  color: var(--white);
}
.top-bar input[type="text"] {
  flex-grow: 1;
  padding: 10px 14px;
  border-radius: 5px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 16px;
  transition: background var(--transition), box-shadow var(--transition);
  max-width: 400px;
}
.top-bar input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
.top-bar input[type="text"]:focus {
  background: var(--white);
  color: #333;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tabs */
.tab-bar {
  overflow-x: auto;
  white-space: nowrap;
  background: var(--accent-hover);
}

/* Сброс списков */
.tab-bar ul,
.tab-bar li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tab-bar li::marker {
  display: none;
  content: none;
}

/* Контейнер списка вкладок */
.tab-bar ul.tab-list {
  display: flex;
  gap: 0; /* можно добавить отступы между вкладками, если нужно */
}

/* Элемент вкладки */
.tab-bar li {
  flex-shrink: 0;
  position: relative; /* Для ripple */
  cursor: pointer;
  font-size: 14px;
  text-transform: uppercase;
}

/* Ссылка внутри вкладки */
.tab-bar li a {
  display: block;
  padding: 14px 20px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-bottom: 4px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

/* Активная вкладка */
.tab-bar li a.active {
  color: var(--white);
  font-weight: bold;
  border-bottom-color: #91b9e7; /* подчёркивание */
}

/* Ripple */
.ripple {
  position: relative;
  overflow: hidden;
}

.rippling {
  position: absolute;
  border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ripple-animation 0.6s linear;
  z-index: 2;
}

@keyframes ripple-animation {
  from {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  to {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}



/* Responsive */
@media (max-width: 768px) {
  .top-bar input {
    width: 100%;
  }
  .card {
    width: 45%;
  }
}
@media (max-width: 480px) {
  .card {
    width: 90%;
  }
}
/* ---- Контейнер поиска ---- */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  margin-left: auto;
  margin-right: 1rem;
}

/* ---- Поле ввода ---- */
#input.desktop-only {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: white;
  color: #222;
  min-width: 200px;
  transition: all 0.2s ease;
}
#input.desktop-only:focus {
  outline: none;
  border-color: var(--accent, #444);
  box-shadow: 0 0 0 2px rgba(100, 100, 100, 0.1);
}

/* ---- Иконки ---- */
.search-icon,
.close-search {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

/* ---- Показывать крестик при наличии текста ---- */
body.show-clear .close-search {
  display: inline-block;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* ---- Результаты ---- */
.search-results {
  display: none;
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  background: white;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
body.search-has-results .search-results {
  display: block;
}

/* ---- Затемнение (мобилка) ---- */
.blur-overlay {
  display: none;
}
body.search-active .blur-overlay {
  display: block;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.3);
  z-index: 2000;
}

/* ---- Mobile адаптация ---- */
@media (max-width: 768px) {
  #input.desktop-only {
    display: none;
  }
  .search-icon {
    display: inline-block;
  }
  .close-search {
    display: none;
  }
  body.search-active .search-icon {
    display: none;
  }
  body.search-active .close-search {
    display: inline-block;
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 3001;
    font-size: 20px;
    color: #888;
  }
  body.search-active #input.desktop-only {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    color: #000;
    padding: 14px 16px;
    font-size: 16px;
    z-index: 2000;
    border-radius: 0;
    border: none;
    outline: none;
  }
  .search-results {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    border-radius: 0;
    max-height: calc(100vh - 56px);
  }
}

/* ---- Категории ---- */
.result-category {
  font-weight: bold;
  font-size: 13px;
  margin: 16px 0 6px;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Элемент результата ---- */
.result-item {
  padding: 8px 4px;
  border-bottom: 1px solid #f1f1f1;
}
.result-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.result-link:hover {
  background: #f9f9f9;
  border-radius: 6px;
}

/* ---- Картинка ---- */
.result-link img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

/* ---- Текст ---- */
.result-link .info {
  display: flex;
  flex-direction: column;
}
.result-link .info strong {
  font-size: 14px;
  color: #111;
  line-height: 1.2;
}
.result-link .info span {
  font-size: 12px;
  color: #666;
  line-height: 1.1;
}


button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.section-white {
  background: var(--white);
  padding: 0.5rem 0;
  border-radius: 5px;
}

.section-white .section-inner {
  width: 100%;
  padding: 0 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin-block: 1rem;
}

.section-header h2 {
  font-size: 1.5rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80%;
  height: 3px;
  background: linear-gradient(to right, var(--accent), transparent);
  border-radius: 4px;
}

.button-small {
  font-size: 0.875rem;
  color: var(--accent);
  background: none;
  padding: 0.25rem 0;
  border: none;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.button-small:hover {
  color: var(--accent-hover);
  cursor: pointer;
}

.button-small::after {
  content: ' >';
  transition: margin-left 0.2s;
}

.button-small:hover::after {
  margin-left: 4px;
}

.chart-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
 grid-template-columns: repeat(auto-fit, minmax(580px, 1fr));
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem 0.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  /* box-shadow: var(--shadow); */
  transition: background var(--transition);
}

.chart-row:hover {
  background-color: var(--hover-bg);
}

.chart-row a:hover {
    text-decoration: underline dotted;
}

.chart-pos {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 4.2rem; /* Подходит для чисел до 999 */
  text-align: right; /* или center */

  flex-shrink: 0;
}

.chart-pos .position {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
}

.chart-pos .delta {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
}

.delta.up    { background: #dcfce7; color: #15803d; }
.delta.down  { background: #fee2e2; color: #b91c1c; }
.delta.same  { background: #e5e7eb; color: #6b7280; }
.delta.new   { background: #e5ecf6; color: #3770b1; }
.delta.re    { background: #f3f4f6; color: #4b5563; }

.chart-cover {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.chart-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.play-button {
    opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: opacity var(--transition), background var(--transition), color var(--transition);
}

.chart-row:hover .play-button,
.chart-row.playing .play-button {
  opacity: 1;
  pointer-events: auto;
}

.chart-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.track-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition);
}

.track-name:hover {
  color: var(--track-hover);
}

.artist-line {
  max-width: 380px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-line a {
  display: inline;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
  flex-shrink: 0;
}



.chart-meta {
  text-align: right;
  min-width: 140px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-secondary);
}
.chart-meta a {
  color: var(--text-secondary);
  text-decoration: none;
}

.genre {
  font-size: 0.75rem;
}

.listens {
  font-size: 0.8rem;
}


/* Mobile Optimization */
@media (max-width: 640px) {

  .chart-list {
    grid-template-columns: 1fr;
  }

  .chart-meta {
    display: none;
  }
  .artist-line {
  max-width: 200px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
  .chart-pos {
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрирует элементы по горизонтали */
    text-align: center;  /* Центрирует текст внутри, если нужно */
    gap: 2px;
    width: 2rem;
  }
  .section-header h2 {
  font-size: 1.2rem;
  
}
.button-small {
    font-size: 0.75rem;
}
}
.player-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1f1f1f;
  z-index: 1000;
  display: none;
}

.player-container iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: none;
  margin-left: auto;
    margin-right: auto;
}

.player-container.show {
  display: block;
}

    .lazy-img {
      display: block;
      width: 100%;
      height: auto;
      background: white; /* Белый фон до загрузки */
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .lazy-img.loaded {
      opacity: 1;
    }
 .explicit-icon {
  width: 13px;
  height: 13px;
  color: #000; /* можно заменить на #fa5a5a или любой другой */
  flex-shrink: 0;
  margin-left: 6px;
}

 table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
  }
  table thead {
    background-color: #f4f4f4;
  }
  table th, table td {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    text-align: left;
  }

  #spotify-positions, #shazam-positions, #apple-data {
    margin-top: 0.5rem;
  }

  .platform-position {
    display: block;
    margin-bottom: 4px;
  }

  .total-streams {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
  }
  h2.no-after::after, h3.no-after::after {
  content: none !important;
  display: none !important;
}

.menu-toggle::before {
  content: "";
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: transform 0.4s ease;
  z-index: -1;
}
.menu-toggle:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.social-links {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.social-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.social-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  font-family: var(--font-family);
}

.pagination .page {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.pagination .page:hover {
  background-color: var(--hover-bg);
  color: var(--accent);
  border-color: var(--accent);
}

.pagination .current {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  pointer-events: none;
  cursor: default;
  font-weight: 600;
}

.pagination .prev,
.pagination .next {
  font-weight: 500;
  color: var(--text-secondary);
}

.pagination .prev:hover,
.pagination .next:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background-color: var(--hover-bg);
}
@media (max-width: 480px) {
  .pagination .page {
    padding: 6px 10px;
    font-size: 13px;
  }
}
/* Обёртка, чтобы держать кнопку справа */
.filter-wrapper {
  display: flex;
  justify-content: flex-end;
  padding: 10px 0px;
}

/* Контейнер hover-а */
.filter-trigger {
  position: relative;
  min-width: 100px;
}

/* Кнопка */
.filter-label {
  background-color: var(--white);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
}

/* Скрыто по умолчанию */
.filter-options {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  padding: 0;
  min-width: 110px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}

/* ✅ Главное: ховер на ОБЩИЙ контейнер */
.filter-trigger:hover .filter-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.filter-options li a {
  display: block;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
}

.filter-options li a:hover {
  background-color: var(--hover-bg);
  color: var(--accent-hover);
}

.tab-bar li:hover {
  background-color: #fbfeff1a;
}