/* Custom Font */
@font-face {
  font-family: 'Akt Thin';
  src: url('/css/fonts/font.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Akt Bold';
  src: url('/css/fonts/bold-font.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Name Font';
  src: url('/css/fonts/name-font.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Style Font';
  src: url('/css/fonts/default-font.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Flow Style Font';
  src: url('/css/fonts/style-font.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Style Font', sans-serif !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Запрещаем масштабирование на мобильных */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  background: #0c0c0c;
  color: #fff;
  font-family: 'Akt Thin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  /* Дополнительная защита от масштабирования */
  touch-action: manipulation;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px 0 10px;
  border-bottom: 1px solid #1a1a1a;
  background: #0c0c0c;
  z-index: 200;
}

.header-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Search */
.search {
  width: min(480px, 40vw);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: #202123;
  border: 1px solid #292b2e;
  border-radius: 999px;
  color: #666;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 480px;
}

.search:focus-within {
  background: #282a2d;
  border-color: #666;
}

.search svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}

.search input::placeholder {
  color: #777b80;
}

.search input[type="search"]::-webkit-search-cancel-button {
  filter: brightness(0) invert(1);
  opacity: 1;
  cursor: pointer;
}

/* Notification Button */
.notification-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #666;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  -webkit-tap-highlight-color: transparent;
}

.notification-btn svg,
.notification-btn img {
  width: 20px;
  height: 20px;
}

.notification-btn img {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: .65;
}

.notification-btn:hover {
  color: #fff;
  background: #151515;
}

.notification-menu-wrapper {
  position: relative;
  flex: 0 0 auto;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: -8px;
  z-index: 300;
  width: 360px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 84px));
  overflow: auto;
  border: 1px solid #292929;
  border-radius: 16px;
  background: #111;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.notification-panel-header h2 {
  margin: 0;
  color: #fff;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.notification-empty-state {
  min-height: 180px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #777;
  text-align: center;
}

.notification-empty-state img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .45;
}

.notification-empty-state p {
  margin: 0;
  font-size: 14px;
}

.mobile-notification-page {
  padding: 0 20px;
}

.mobile-notification-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 24px;
}

.mobile-notification-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #eee;
  background: #151515;
}

.mobile-notification-back svg {
  width: 22px;
  height: 22px;
}

.mobile-notification-header h1 {
  margin: 0;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-size: 22px;
}

.mobile-notification-empty {
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #777;
  text-align: center;
}

.mobile-notification-empty img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .45;
}

.mobile-notification-empty p {
  margin: 0;
  font-size: 15px;
}

@media (min-width: 769px) {
  .mobile-notification-page {
    display: none !important;
  }

  .notification-panel {
    width: 720px;
    max-width: min(720px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 84px));
  }

  .notification-panel-header {
    padding: 18px 40px;
  }

  .notification-panel-header h2 {
    font-size: 24px;
  }

  .notification-empty-state {
    min-height: 360px;
    gap: 24px;
  }

  .notification-empty-state img {
    width: 48px;
    height: 48px;
  }

  .notification-empty-state p {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .mobile-notification-page {
    padding-right: 4px;
    padding-left: 4px;
  }

  .mobile-notification-back {
    display: none;
  }

  .mobile-notification-header {
    justify-content: flex-start;
  }

  .mobile-notification-header h1 {
    width: 100%;
    text-align: left;
  }
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 56px;
  bottom: 0;
  width: 60px;
  background: #0c0c0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-right: 1px solid #1a1a1a;
  z-index: 100;
  padding-bottom: 20px;
}

.navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
  
  .desktop-only {
    display: flex;
  }
}

.nav-item-bottom {
  margin-bottom: 0;
}

.nav-item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  border-radius: 11px;
  text-decoration: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.mobile-nav-icon {
  display: none;
}

.desktop-nav-icon {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(.42);
  transition: filter .2s ease;
}

.nav-item:hover .desktop-nav-icon,
.nav-item.active .desktop-nav-icon {
  filter: grayscale(1) brightness(0) invert(1);
}

.nav-active-indicator {
  display: none;
}

.nav-item:hover {
  color: #fff;
  background: #151515;
}

.nav-item.active {
  color: #fff;
  background: #151515;
}

.nav-item-bottom {
  margin-bottom: 0;
}

.desktop-nav-label {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    width: 186px;
    align-items: stretch;
    padding: 0 10px 20px;
    box-sizing: border-box;
  }

  .navigation {
    width: 100%;
    align-items: stretch;
  }

  .navigation .nav-item,
  .sidebar > .nav-item-bottom {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 13px;
    padding: 0 12px;
  }

  .desktop-nav-label {
    display: block;
    color: #929292;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    transition: color .2s ease;
  }

  .nav-item:hover .desktop-nav-label,
  .nav-item.active .desktop-nav-label {
    color: #fff;
  }

  .desktop-nav-icon {
    flex: 0 0 21px;
  }

  .main {
    margin-left: 186px;
  }
}

/* Main */
.main {
  margin-left: 60px;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

@media (min-width: 1024px) {
  .main {
    margin-left: 186px;
  }
}

/* Content */
.content {
  min-height: calc(100vh - 56px);
  padding: 28px;
}

/* Search page - убираем padding от .content */
#search.content-section {
  padding: 0;
}

/* Player */
.player {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  height: 90px;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 45px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 150;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.player:not(.is-visible) {
  display: none;
}

.mini-progress {
  display: none;
}

/* Track Info */
.player .track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 280px; /* Фиксированная ширина */
  flex-shrink: 0;
}

@media (min-width: 969px) {
  .player .track-info {
    transform: translateX(10px);
    width: 240px;
    gap: 10px;
  }

  .player .track-details {
    width: 174px;
  }

  .player {
    gap: 12px;
  }
}

.player .track-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player .track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player .track-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  width: 212px; /* Фиксированная ширина (280px - 56px обложки - 12px gap) */
  flex-shrink: 0;
  position: relative;
}

.player .track-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.player .track-name > span {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 7.84s linear infinite;
  animation-play-state: paused;
  will-change: transform;
  padding-right: 50px; /* Отступ после оригинального текста */
}

/* Анимация запускается только если текст переполнен */
.player .track-name.is-overflowing > span {
  animation-play-state: running;
}

/* Дублирование текста для бесконечного эффекта - только при переполнении */
.player .track-name.is-overflowing > span::after {
  content: attr(data-text);
  position: absolute;
  left: 100%;
  white-space: nowrap;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.player .track-artist {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Playback Mode Button */
.playback-mode {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.playback-mode:hover {
  color: #fff;
  background: #202020;
}

.mode-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show icons based on mode */
.playback-mode[data-mode="normal"] .mode-normal,
.playback-mode[data-mode="shuffle"] .mode-shuffle,
.playback-mode[data-mode="repeat"] .mode-repeat {
  opacity: 1;
}

.playback-mode[data-mode="shuffle"] .mode-shuffle,
.playback-mode[data-mode="repeat"] .mode-repeat {
  filter: brightness(0) invert(1);
}

/* Player Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.control-btn svg {
  width: 24px;
  height: 24px;
}

.control-play {
  width: 36px;
  height: 36px;
  position: relative;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.control-play .transport-state-icon {
  width: 24px;
  height: 24px;
  position: absolute;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s ease;
}

.transport-skip-icon {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
  color: #fff;
  filter: brightness(0) invert(1);
}

.control-btn .transport-skip-icon {
  width: 16px;
  height: 16px;
}

.transport-skip-icon.is-previous {
  transform: scaleX(-1);
}

.control-play .pause-icon {
  opacity: 0;
}

.control-play[data-playing="true"] .play-icon {
  opacity: 0;
}

.control-play[data-playing="true"] .pause-icon {
  opacity: 1;
}

.control-btn:hover {
  transform: scale(1.1);
}

/* Like Button */
.like-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  margin-left: 4px;
}

.like-btn img {
  width: 22px;
  height: 22px;
  position: absolute;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.like-btn .like-icon { filter: brightness(0) invert(1); }
.like-btn .like-icon-filled { filter: brightness(0) saturate(100%) invert(35%) sepia(98%) saturate(3240%) hue-rotate(333deg) brightness(102%) contrast(101%); }

.like-btn .like-icon-filled {
  opacity: 0;
}

.like-btn[data-liked="true"] .like-icon {
  opacity: 0;
}

.like-btn[data-liked="true"] .like-icon-filled {
  opacity: 1;
}

.like-btn:hover {
  color: #fff;
  background: #202020;
}

/* Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.time-current,
.time-total {
  font-size: 11px;
  color: #999;
  min-width: 36px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  position: relative;
}

.progress-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.progress-buffered-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 0;
  background: #676767;
  border-radius: 2px;
  pointer-events: none;
  transition: width .25s ease;
}

.progress-handle {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.progress-bar:hover .progress-handle {
  opacity: 1;
}

/* Volume Control */
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.volume-btn svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity 0.2s ease;
}

.volume-btn .volume-muted {
  opacity: 0;
}

.volume-btn[data-muted="true"] .volume-high {
  opacity: 0;
}

.volume-btn[data-muted="true"] .volume-muted {
  opacity: 1;
}

.volume-btn:hover {
  color: #fff;
  background: #202020;
}

.volume-slider {
  width: 80px;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.volume-track {
  width: 100%;
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  position: relative;
}

.volume-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 70%;
  pointer-events: none;
}

.volume-handle {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.volume-slider:hover .volume-handle {
  opacity: 1;
}

/* More Button */
.more-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.more-btn svg {
  width: 20px;
  height: 20px;
}

.more-btn:hover {
  color: #fff;
  background: #202020;
}

.more-btn.active {
  color: #fff;
  background: #202020;
}

/* More Menu */
.more-menu {
  position: absolute;
  bottom: 100%;
  right: 24px;
  margin-bottom: 12px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 200;
}

.more-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-item img { width: 20px; height: 20px; flex-shrink: 0; }
.playlist-menu-waveform-icon { filter: brightness(0) invert(1); }

.menu-item span {
  font-size: 14px;
  font-weight: 400;
}

.menu-item:hover {
  background: #252525;
}

.menu-item-danger {
  color: #ff4444;
}

.menu-item-danger:hover {
  background: rgba(255, 68, 68, 0.1);
}

/* Playlist Context Menu */
.playlist-context-menu {
  position: fixed;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.95) translateY(-4px);
  transition: all 0.2s ease;
  z-index: 10000;
  pointer-events: none;
}

.playlist-context-menu.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.playlist-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
}

.playlist-menu-item svg,
.playlist-menu-item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.playlist-menu-heart-icon {
  filter: invert(1);
}

.playlist-menu-heart-icon[src*="heart_full.svg"] {
  filter: none;
}

.playlist-menu-item:hover {
  background: #252525;
}

.playlist-menu-item-danger {
  color: #ff4444;
}

.playlist-menu-item-danger:hover {
  background: rgba(255, 68, 68, 0.1);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section h1 {
  font-size: 32px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
}

.content-section p {
  font-size: 16px;
  color: #999;
  line-height: 1.6;
}

.artist-studio-page {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.artist-studio-header { margin-bottom: 32px; }
.artist-studio-eyebrow, .artist-studio-card-label { color: #888; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.artist-studio-header h1 { margin: 0 0 8px; font-size: clamp(34px, 5vw, 56px); }
.artist-studio-header p { margin: 0; }
.artist-studio-balance, .artist-studio-stat-card, .artist-studio-chart { border: 1px solid #292929; border-radius: 20px; background: #141414; }
.artist-studio-balance { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; min-height: 264px; padding: 48px 32px; margin-bottom: 0; border: 0; border-radius: 0; background: transparent; text-align: center; }
@media (min-width: 769px) {
  .artist-studio-balance { min-height: 384px; }
}
.artist-studio-balance::before { content: ""; position: absolute; z-index: -1; width: min(75.6vw, 837px); height: min(59.4vh, 621px); left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(0,201,184,.168) 0%, rgba(92,126,210,.09) 38%, rgba(148,104,230,.042) 58%, transparent 74%); filter: blur(28px); pointer-events: none; animation: artist-balance-glow 10s ease-in-out infinite alternate; }
@keyframes artist-balance-glow { from { opacity:.65; translate:-3% -1%; scale:.94 1; } to { opacity:1; translate:3% 2%; scale:1.06 .96; } }
.artist-studio-balance-content { display: flex; flex-direction: column; align-items: center; }
.artist-studio-payout-actions { display: flex; justify-content: center; gap: 14px; margin: 0 0 40px; }
.artist-studio-monetization-note { max-width: 620px; margin: -20px auto 38px; color: #888; font-size: 13px; line-height: 1.55; text-align: center; }
.artist-studio-monetization-note a { color: #d7d7d7; text-decoration: underline; text-underline-offset: 3px; }
.artist-studio-monetization-note a:hover { color: #fff; }
.artist-studio-monetization-note.is-paused { color: #aaa; }
.artist-studio-payout-button { appearance: none; display: inline-flex; min-width: 190px; min-height: 54px; align-items: center; justify-content: center; gap: 11px; padding: 14px 25px; border: 1px solid #fff; border-radius: 999px; background: #fff; color: #090909; font: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: not-allowed; opacity: .72; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.artist-studio-payout-button svg { display: block; width: 21px; height: 21px; flex: 0 0 21px; }
.artist-studio-payout-button-report { min-width: 54px; width: 54px; height: 54px; padding: 0; border-color: #343434; border-radius: 50%; background: #171717; color: #eee; }
.artist-studio-payout-button-report svg { width: 22px; height: 22px; }
.artist-studio-payout-button:disabled { cursor: not-allowed; }
.artist-studio-balance strong, .artist-studio-stat-card strong { display: block; margin: 12px 0 6px; color: #f5f5f5; font-size: 32px; }
.artist-studio-balance strong { font-size: 64px; }
.artist-studio-card-note { display: block; color: #888; font-size: 14px; }
.artist-studio-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.artist-studio-stat-card { appearance: none; width: 100%; min-height: 148px; padding: 24px; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.artist-studio-stat-card.metric-plays { --metric-color:#14d6e8; --metric-bg:rgba(20,214,232,.1); }
.artist-studio-stat-card.metric-listeners { --metric-color:#a980ff; --metric-bg:rgba(169,128,255,.1); }
.artist-studio-stat-card.metric-engaged { --metric-color:#ff4f98; --metric-bg:rgba(255,79,152,.1); }
.artist-studio-stat-top { display:flex; align-items:center; gap:10px; }
.artist-studio-stat-top svg { width:22px; height:22px; flex:0 0 22px; color:var(--metric-color); }
.artist-studio-value-row { display:flex; align-items:baseline; gap:12px; }
.artist-studio-change { color:#25c784; font-size:13px; font-weight:700; }
.artist-studio-change.is-down { color:#ff5e68; }
.artist-studio-sparkline { display:block; width:100%; height:42px; margin-top:12px; }
.artist-studio-sparkline svg { width:100%; height:100%; overflow:visible; }
.artist-studio-sparkline path { fill:none; stroke:var(--metric-color); stroke-width:2.5; vector-effect:non-scaling-stroke; }
.artist-studio-sparkline .spark-area { fill:var(--metric-bg); stroke:none; }
.artist-studio-stat-card:hover { border-color: #555; transform: translateY(-2px); }
.artist-studio-stat-card.is-active { border-color: var(--metric-color); background: linear-gradient(145deg, var(--metric-bg), #141414 75%); }
.artist-studio-stat-card strong { font-size: 28px; }
.artist-studio-chart { padding: 26px 28px 22px; }
.artist-studio-chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.artist-studio-chart-heading h2 { margin: 8px 0 0; font-size: 22px; }
.artist-studio-period { color: #999; font-size: 13px; }
.artist-studio-period-controls { display: flex; gap: 6px; }
.artist-studio-period-controls button { border: 1px solid #333; border-radius: 999px; padding: 7px 11px; background: transparent; color: #aaa; font: inherit; font-size: 12px; cursor: pointer; }
.artist-studio-period-controls button:hover, .artist-studio-period-controls button.is-active { background: #fff; border-color: #fff; color: #111; }
.artist-studio-chart-heading { flex-wrap: wrap; }
.artist-studio-chart-placeholder { position: relative; display: grid; min-height: 230px; margin-top: 24px; place-items: center; overflow: visible; border-radius: 12px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 56px, #252525 57px); }
.artist-studio-chart-placeholder p { z-index: 1; padding: 10px 16px; border-radius: 999px; background: #141414; text-align: center; }
.artist-studio-line-chart { position: absolute; inset: 12px 8px 0; touch-action: none; cursor: crosshair; opacity:1; transform:translateY(0); transition:opacity .32s ease, transform .32s ease; }
.artist-studio-line-chart.is-entering { opacity:0; transform:translateY(10px); }
.artist-studio-line-chart.is-exiting { opacity:0; transform:translateY(-8px); pointer-events:none; }
.artist-studio-line-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.artist-studio-line-area { fill-opacity: 1; }
.artist-studio-line { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.artist-studio-line-marker { position: absolute; width: 12px; height: 12px; border: 3px solid #0c0c0c; border-radius: 50%; background: var(--artist-chart-color, #14d6e8); opacity: 0; transform: translate(-50%,-50%); pointer-events: none; }
.artist-studio-line-tooltip { position: absolute; z-index: 3; padding: 7px 10px; border: 1px solid #393939; border-radius: 8px; background: #202020; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; }
.artist-studio-line-chart.has-selection .artist-studio-line-marker, .artist-studio-line-chart.has-selection .artist-studio-line-tooltip { opacity: 1; }
.artist-studio-stat-card #artistStudioTopTrack { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .artist-studio-page { width: calc(100% - 32px); padding: 12px 0 48px; }
  .artist-studio-stats { grid-template-columns: 1fr; gap: 10px; }
  .artist-studio-stat-card { min-height: 0; padding: 18px 20px; }
  .artist-studio-balance { min-height: clamp(280px, 38svh, 430px); padding: 24px 22px; margin: 0 -16px; }
  .artist-studio-balance::before { width: min(124.2vw, 621px); height: min(65svh, 500px); filter: blur(24px); }
  .artist-studio-payout-actions { flex-direction: row; align-items: center; justify-content: center; gap: 12px; margin: 70px 0 12px; }
  .artist-studio-payout-button { width: auto; min-width: 0; min-height: 48px; padding: 12px 20px; }
  .artist-studio-payout-button-report { flex: 0 0 48px; width: 48px; height: 48px; padding: 0; }
  .artist-studio-monetization-note { margin: 0 auto 22px; }
  .artist-studio-chart-placeholder, .artist-studio-line-chart { touch-action: none; }
  .artist-studio-chart { padding: 20px 16px; }
  .artist-studio-chart-placeholder { min-height: 190px; }
}

/* Settings Page */
#settings {
  max-width: 50%;
  margin: 0 auto;
}

.content-section#settings.active {
  display: flex;
  flex-direction: column;
}

#playlistPage {
  max-width: 50%;
  margin: 0 auto;
}

.playlist-page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 8px 0;
  color: #aaa;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: color .18s ease;
}

.playlist-page-back:hover {
  color: #fff;
}

.playlist-page-back svg {
  width: 20px;
  height: 20px;
}

.playlist-page-header {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.playlist-page-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 180px;
  width: 180px;
  height: 180px;
  overflow: hidden;
  border-radius: 10px;
  background: #131313;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
}

.playlist-page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-page-cover svg {
  width: 96px;
  height: 96px;
  color: rgba(255, 255, 255, .92);
}
.playlist-cover-empty { background: #202020 !important; }
.playlist-page-cover.playlist-cover-empty { background: #202020; }
.library-playlist-cover.playlist-cover-empty:hover,
.library-playlist-card:hover .library-playlist-cover.playlist-cover-empty { background-color: #202020; }

.playlist-page-cover.favorites {
  background: linear-gradient(135deg, #ff444f, #ff5c9b);
}

.playlist-page-cover.favorites img[src*="heart_full.svg"] {
  width: 60%;
  height: 60%;
  object-fit: contain;
  color: rgba(115, 17, 44, .7);
}

.playlist-page-heading {
  min-width: 0;
  flex: 1;
}

.playlist-page-type {
  margin-bottom: 8px;
  color: #aaa;
  font-size: 13px;
}

.playlist-page-heading h1 {
  overflow: hidden;
  margin: 0 0 10px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-size: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-page-meta,
.playlist-page-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 14px;
}

.playlist-page-owner {
  margin-top: 6px;
}

.playlist-page-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  margin-top: 20px;
  padding: 0 20px;
  color: #000;
  background: #fff;
  border: 0;
  border-radius: 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.playlist-page-play:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #eee;
  box-shadow: 0 2px 7px rgb(0 0 0 / 16%);
}

.playlist-page-play:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.playlist-page-play:disabled {
  cursor: default;
  opacity: .45;
}

.playlist-page-play img {
  width: 12px;
  height: 12px;
}

.playlist-pause-icon { display: none; }
.library-playlist-play-btn.is-playing .playlist-play-icon,
.playlist-page-play.is-playing .playlist-play-icon { display: none; }
.library-playlist-play-btn.is-playing .playlist-pause-icon,
.playlist-page-play.is-playing .playlist-pause-icon { display: block; }

.playlist-page-tracks {
  padding-bottom: 24px;
}

.playlist-page-empty {
  padding: 32px 16px;
  text-align: left;
}

.settings-account-section {
  order: 3;
}

.settings-privacy-section {
  order: 2;
}

.settings-page-title {
  font-size: 32px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 700;
  margin-bottom: 40px;
  color: #fff;
}

.settings-section {
  margin-bottom: 48px;
}

.settings-profile-section {
  order: 0;
  scroll-margin-top: 92px;
}
.settings-profile-preview {
  position: relative;
  width: 100%;
  margin: 18px 0 24px;
}
.settings-profile-banner {
  position: relative;
  width: 100%;
  height: clamp(150px, 22vw, 240px);
  overflow: visible;
  border-radius: 14px;
  background: linear-gradient(135deg, #252525, #151515);
  background-position: center;
  background-size: cover;
}
.settings-profile-banner::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,0,0,.22), transparent 55%);
  content: "";
  pointer-events: none;
}
.settings-profile-edit {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  color: #f5f5f5;
  background: rgba(15,15,15,.78);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.settings-profile-edit:hover { background: #292929; transform: scale(1.05); }
.settings-profile-edit-banner { top: 16px; right: 16px; }
.settings-profile-avatar-wrap {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 16px;
  width: 132px;
  height: 132px;
  border: 6px solid #0c0c0c;
  border-radius: 50%;
  background: #0c0c0c;
}
.settings-profile-avatar {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #aaa;
  background: linear-gradient(135deg, #303030, #1a1a1a);
  background-position: center;
  background-size: cover;
  font-size: 34px;
}
.settings-profile-edit-avatar { right: -5px; bottom: 0; }
.settings-account-section .settings-media-item { display: none; }
.settings-account-section [data-edit="displayname"] { display: none; }
.settings-verification-item { gap: 16px; }
.settings-verification-link {
  flex: 0 0 auto;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  color: #929292;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: color .18s ease;
}
.settings-verification-link:hover {
  color: #c2c2c2;
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .settings-profile-preview {
    margin-top: 16px;
    margin-bottom: clamp(53px, calc(5.5vw + 24px), 58px);
  }
  .settings-profile-banner {
    height: clamp(176px, 42vw, 230px);
    border-radius: 12px;
  }
  .settings-profile-avatar-wrap {
    width: clamp(116px, 22vw, 136px);
    height: clamp(116px, 22vw, 136px);
    bottom: 0;
    left: 14px;
    border-width: 5px;
    transform: translateY(25%);
  }
  .settings-profile-edit { width: 36px; height: 36px; }
  .settings-profile-edit-banner { top: 12px; right: 12px; }
  .settings-profile-edit-avatar { right: -4px; bottom: -1px; }
}

.settings-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 16px;
}

.settings-divider {
  height: 1px;
  background: #1a1a1a;
  margin-bottom: 8px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -8px;
  padding: 16px 8px;
  border-radius: 6px;
  border-bottom: 1px solid #0a0a0a;
  transition: background 0.2s ease;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.settings-item-editable {
  cursor: pointer;
}

.settings-media-edit {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.settings-media-edit:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #aaa;
}

.settings-media-edit-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.settings-media-item {
  gap: 16px;
}

.settings-media-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-media-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  color: #888;
  background: #181818;
  border: 1px solid #303030;
  font-size: 10px;
  text-align: center;
}

.settings-avatar-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.settings-banner-preview {
  width: 128px;
  height: 48px;
  border-radius: 8px;
  background-image: linear-gradient(135deg, #252525, #101010);
}

.settings-media-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-crop-modal { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.profile-crop-dialog { width: min(520px, 100%); padding: 26px; border: 1px solid #333; border-radius: 20px; background: #171717; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.profile-crop-dialog h2 { margin: 0 0 6px; color: #fff; font-size: 22px; }
.profile-crop-dialog p { margin: 0 0 18px; color: #999; }
.profile-crop-viewport { position: relative; width: 100%; height: 280px; overflow: hidden; border-radius: 12px; background: #080808; touch-action: none; cursor: grab; }
.profile-crop-viewport:active { cursor: grabbing; }
.profile-crop-viewport.is-avatar { width: min(280px, 100%); height: min(280px, 65vw); margin: auto; border-radius: 50%; }
.profile-crop-viewport img { position: absolute; top: 50%; left: 50%; max-width: none; max-height: none; user-select: none; pointer-events: none; }
.profile-crop-zoom { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: #bbb; }
.profile-crop-zoom input { flex: 1; accent-color: #d8d8d8; }
.profile-crop-actions { display: flex; justify-content: flex-end; gap: 10px; }
.profile-crop-actions button { min-height: 44px; padding: 0 20px; border: 1px solid #3a3a3a; border-radius: 12px; background: #222; color: #eee; font: inherit; font-weight: 700; }
.profile-crop-actions .profile-crop-save { border-color: #dedede; background: linear-gradient(135deg, #ededed, #c6c6c6); color: #111; }
.profile-crop-actions button:disabled { opacity: .5; }
.profile-media-loading { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(5,5,5,.72); color: #fff; font-size: 13px; font-weight: 600; backdrop-filter: blur(3px); }
.profile-media-spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.22); border-top-color: #d8d8d8; border-radius: 50%; animation: profile-media-spin .75s linear infinite; }
#accountAvatar, #accountBanner { position: relative; }
#accountAvatar.is-uploading > :not(.profile-media-loading), #accountBanner:has(.profile-media-loading) > .account-edit-banner-btn { visibility: hidden; }
@keyframes profile-media-spin { to { transform: rotate(360deg); } }

.settings-item-editable:hover .settings-edit-icon {
  opacity: 1;
}

@media (max-width: 480px) {
  .settings-media-controls {
    gap: 8px;
  }

  .settings-banner-preview {
    width: 88px;
    height: 42px;
  }

  .settings-avatar-preview {
    width: 42px;
    height: 42px;
  }
}

.settings-label {
  font-size: 15px;
  color: #fff;
  font-weight: 400;
}

.settings-value-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-value {
  font-size: 14px;
  color: #999;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.settings-value-password {
  font-size: 18px;
  letter-spacing: 3px;
  color: #666;
}

.settings-value-username::before {
  content: '@';
  color: #666;
}

.settings-edit-icon {
  width: 18px;
  height: 18px;
  color: #666;
  opacity: 0.5;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.settings-item-editable:hover .settings-edit-icon {
  color: #fff;
}

.settings-arrow {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: color 0.2s ease;
}

.settings-arrow:hover {
  color: #fff;
}

.settings-arrow svg {
  width: 20px;
  height: 20px;
}

/* Toggle Switch */
.settings-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #2a2a2a;
  border-radius: 24px;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #666;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-input:checked + .toggle-slider {
  background: linear-gradient(135deg, #e8e8e8, #aaa);
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: linear-gradient(145deg, #333, #111);
}

/* Expandable Settings */
.settings-item-expandable .settings-arrow svg {
  transition: transform 0.3s ease;
}

.settings-item-expandable.expanded .settings-arrow svg {
  transform: rotate(90deg);
}

.settings-expandable {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

.settings-expandable.expanded {
  max-height: 600px;
  opacity: 1;
  margin-top: 16px;
}

/* Equalizer */
.equalizer-content {
  padding: 24px;
  background: #171717;
  border-radius: 12px;
  border: 1px solid #1a1a1a;
}

.equalizer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.eq-preset-btn {
  padding: 8px 16px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #999;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.eq-preset-btn:hover {
  background: #2a2a2a;
  color: #fff;
}

.eq-preset-btn.active,
.eq-preset-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #ededed, #c4c4c4);
  border-color: #dedede;
  color: #111;
}

.equalizer-bands {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Кастомный слайдер */
.eq-slider-custom {
  position: relative;
  width: 4px;
  height: 180px;
  cursor: pointer;
  user-select: none;
}

.eq-track-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  border-radius: 2px;
}

.eq-track-fill {
  position: absolute;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #f5f5f5 0%, #c3c3c3 48%, #777 100%);
  border-radius: 2px;
  pointer-events: none;
}

.eq-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(145deg, #fff, #c5c5c5);
  border-radius: 50%;
  cursor: grab;
  transition: all 0.2s ease;
}

.eq-slider-custom.is-dragging .eq-thumb {
  transition: none;
}

.eq-thumb:hover {
  background: linear-gradient(145deg, #fff, #ddd);
  transform: translate(-50%, -50%) scale(1.15);
}

.eq-thumb:active {
  cursor: grabbing;
  background: linear-gradient(145deg, #eee, #bbb);
}

.eq-value {
  font-size: 12px;
  color: #d7d7d7;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}

.eq-label {
  font-size: 11px;
  color: #666;
  font-weight: 500;
}

/* Account actions */
.settings-logout-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 16px 0 8px;
  background: transparent;
  border: 0;
  border-top: 1px solid #1a1a1a;
  border-radius: 0;
  color: #ff4444;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
  font-family: inherit;
}

.settings-logout-btn:hover,
.settings-logout-btn:focus-visible {
  color: #ff7777;
}

.settings-delete-account-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 16px 0 8px;
  border: 0;
  border-top: 1px solid #1a1a1a;
  border-radius: 0;
  background: transparent;
  color: #bd0000;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}

.settings-delete-account-btn:hover,
.settings-delete-account-btn:focus-visible {
  color: #e00000;
}

.account-delete-modal-content { max-width: 460px; }
.account-delete-warning { margin: 0 0 20px; color: #bbb; font-size: 14px; line-height: 1.55; }
.account-delete-error { min-height: 20px; margin: 8px 0 14px; color: #ff6b6b; font-size: 13px; }
.account-delete-confirm-btn,
.account-delete-confirm-btn:hover,
.account-delete-confirm-btn:focus,
.account-delete-confirm-btn:active {
  border: 0 !important;
  outline: 0;
  box-shadow: none;
  background: #bd0000 !important;
  color: #fff !important;
}
.account-delete-confirm-btn:hover { background: #d00000 !important; }

/* Edit Modals */
.edit-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.edit-modal.show {
  display: flex;
}

.edit-modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  animation: modalSlideIn 0.3s ease;
  position: relative;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.edit-modal-form {
  display: block;
}

.edit-modal-success,
.edit-modal-error {
  display: none;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.edit-modal-content.show-success .edit-modal-form {
  display: none;
}

.edit-modal-content.show-success .edit-modal-success {
  display: block;
}

.edit-modal-content.show-error .edit-modal-form {
  display: none;
}

.edit-modal-content.show-error .edit-modal-error {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon,
.error-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: block;
}

.success-message,
.error-message {
  font-size: 16px;
  color: #fff;
  font-weight: 500;
  line-height: 1.5;
}

.success-message {
  color: #d8d8d8;
}

.error-message {
  color: #ff4444;
}

.edit-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
}

.edit-modal-input {
  width: 100%;
  padding: 14px 16px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.edit-modal-input:focus {
  outline: none;
  border-color: #c9c9c9;
}

.edit-modal-input::placeholder {
  color: #666;
}

.edit-modal-hint {
  font-size: 13px;
  color: #666;
  margin: -8px 0 16px 0;
  line-height: 1.4;
}

.username-input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.username-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #666;
  font-weight: 600;
  pointer-events: none;
}

.username-input {
  padding-left: 32px !important;
  margin-bottom: 0 !important;
}

.edit-modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.edit-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.phone-edit-content {
  max-width: 440px;
  padding: 28px 30px 22px;
}

.phone-edit-step-controls { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 8px auto 0; min-height: 76px; justify-content: center; }
.phone-edit-step-controls .phone-step-dots { margin: 0; }
.phone-edit-step-controls .phone-step-next { display: flex; align-items: center; justify-content: center; gap: 9px; width: auto; min-width: 0; min-height: 42px; margin: 4px auto 0; padding: 6px 10px; border: 0; border-radius: 0; background: transparent; color: #aaa; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.phone-edit-step-controls .phone-step-next:hover { background: transparent; color: #fff; }
.phone-edit-step-controls .phone-step-next svg { width: 18px; height: 18px; }
.phone-edit-step-controls .phone-step-next svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phone-edit-step-controls .phone-step-back { margin: 4px auto 0; padding: 5px 12px; border: 0; background: none; color: #aaa; font: inherit; font-size: 14px; cursor: pointer; }
.phone-edit-step-controls [hidden] { display: none !important; }
.phone-edit-footer { margin-top: 4px; }
.phone-edit-content .edit-modal-title { margin: 0 0 18px; font-size: 22px; }
.phone-edit-content .edit-modal-input { margin-bottom: 0; }
.phone-edit-content .phone-edit-status { min-height: 0; margin: 4px 0 0; }
.phone-edit-content .phone-telegram-action { min-height: 48px; border-radius: 12px; font-size: 15px; }
.phone-edit-content .edit-modal-cancel { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; background: transparent; color: #aaa; font: inherit; font-weight: 600; cursor: pointer; }

#phoneEditFormView[hidden] {
  display: none !important;
}

#phoneEditVerifyView[hidden] {
  display: none !important;
}

.phone-verification-subtitle {
  margin: 0 0 18px;
  color: #999;
  font-size: 15px;
}

.phone-telegram-action {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #279bd3;
  border-radius: 14px;
  background: #229ed9;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease;
}

.phone-telegram-action:hover {
  background: #168ac3;
  transform: translateY(-1px);
}

.phone-telegram-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.phone-edit-status {
  min-height: 1.35em;
  margin: 0 0 12px;
  color: #999;
  font-size: 14px;
  line-height: 1.45;
}

.phone-edit-status.is-success {
  color: #fff;
}

.edit-modal-cancel {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #999;
}

.edit-modal-cancel:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}

.edit-modal-save {
  background: linear-gradient(135deg, #ededed, #c6c6c6);
  border: none;
  color: #111;
}

.edit-modal-save:hover {
  background: linear-gradient(135deg, #fff, #d5d5d5);
  transform: translateY(-1px);
}

.edit-modal-save:active {
  transform: translateY(0);
}

/* Main Title */
.main-title {
  font-size: 48px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0;
}

/* ===================================
   FLOW HERO SECTION
   =================================== */

.flow-hero {
  padding: 60px 0 32px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  z-index: 1; /* Поверх волны */
  overflow: hidden;
  border-radius: 16px;
  background: #06151d;
}

.flow-hero #waveCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block !important;
  opacity: 1;
  transform: none;
  z-index: 0;
  pointer-events: none;
}

.flow-hero-content {
  text-align: left;
  max-width: 600px;
  padding-left: 58px; /* Выравнивание с секциями */
  position: relative;
  z-index: 1;
}

.flow-hero-title {
  font-size: 100px !important; /* Было 200px, уменьшаем в 2 раза */
  font-family: 'Flow Style Font', sans-serif !important;
  font-weight: 900;
  letter-spacing: 4px;
  margin: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  line-height: 1;
}

.flow-wave-icon {
  width: 60px;
  height: 60px;
  opacity: 0.9;
  display: block;
  margin: 0;
  align-self: center; /* Центрируем по вертикали относительно flex-контейнера */
}

.flow-hero-subtitle {
  font-size: 18px; /* Было 16px */
  line-height: 1.6;
  color: #999;
  margin: 0 0 36px; /* Было 32px */
  font-weight: 400;
}

.flow-subtitle-mobile {
  display: none;
}

.flow-hero-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flow-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 32px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.flow-hero-buttons > .flow-hero-btn:not(.flow-hero-btn-icon) {
  flex: 0 0 250px;
  width: 250px;
  justify-content: center;
}

.flow-hero-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.flow-hero-btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.flow-hero-btn-icon {
  width: 56px;
  height: 56px; /* Делаем квадратной */
  padding: 0;
  justify-content: center;
  border-radius: 50%; /* Делаем круглой */
  gap: 0; /* Убираем gap для кнопки с иконкой */
}

.flow-hero-btn-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.flow-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.flow-settings-overlay.show {
  opacity: 1;
  visibility: visible;
}

.flow-settings-card {
  width: min(100%, 480px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  background: #151515;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  transform: translateY(8px) scale(.98);
  transition: transform .2s ease;
}

.flow-settings-overlay.show .flow-settings-card {
  transform: translateY(0) scale(1);
}

.flow-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.flow-settings-header h2 {
  margin: 0;
  color: #fff;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-size: 22px;
}

.flow-settings-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #aaa;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.flow-settings-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.flow-preference-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer;
}

.flow-preference-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 14px;
  border: 1px solid #333;
  border-radius: 10px;
  outline: none;
  color: #f4f4f4;
  background: #202020;
  font: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.flow-preference-field select:focus-visible {
  border-color: #27d7c5;
}

.flow-preference-field select option {
  color: #fff;
  background: #202020;
}

.flow-setting-name {
  color: #f4f4f4;
  font-size: 15px;
}

.flow-settings-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.flow-settings-apply {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 24px;
  color: #051211;
  background: linear-gradient(110deg, #27d7c5, #64bce5);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.flow-settings-apply:hover {
  filter: brightness(1.08);
}

.flow-hero-btn:hover {
  transform: translateY(-2px);
}

.flow-hero-btn:active {
  transform: translateY(0);
}

.flow-hero-btn img,
.flow-hero-btn svg {
  width: 20px;
  height: 20px;
  color: #000;
}

.flow-hero-btn .flow-play-icon,
.flow-hero-btn .flow-pause-icon {
  width: 12px;
  height: 12px;
}

.flow-hero-btn.playing .flow-play-icon {
  display: none;
}

.flow-hero-btn.playing .flow-pause-icon {
  display: block !important;
}

@media (min-width: 769px) {
  .flow-hero {
    margin-left: 54px;
    margin-right: 58px;
    padding-top: 102px;
    padding-bottom: 8px;
    min-height: 420px;
    align-items: flex-start;
  }

  .flow-hero-content {
    margin-left: 0;
    margin-right: auto;
    flex: initial;
    max-width: 600px;
    padding-left: 0;
    left: 70px;
    text-align: left;
    top: -22px;
  }

  .flow-featured-carousel {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    margin-left: 18px;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  }

  .flow-featured-track {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 0;
  }

  .flow-featured-track::-webkit-scrollbar {
    display: none;
  }

  .flow-featured-card {
    position: relative;
    flex: 0 0 clamp(180px, 18vw, 280px);
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: #111;
    cursor: pointer;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    isolation: isolate;
    transform: scale(var(--flow-featured-scale, 1));
    transition: transform .24s ease;
  }

  .flow-featured-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter .25s ease;
  }

  .flow-featured-placeholder {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .72);
    font-size: 64px;
    background: radial-gradient(circle at 35% 30%, #30383c, #111 70%);
  }

  .flow-featured-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .48));
    opacity: .45;
    transition: opacity .2s ease;
  }

  .flow-featured-card:hover img,
  .flow-featured-card:focus-visible img,
  .flow-featured-card.is-playing img {
    filter: brightness(.88);
  }

  .flow-featured-card:hover::after,
  .flow-featured-card:focus-visible::after,
  .flow-featured-card.is-playing::after {
    opacity: .9;
  }

  .flow-featured-card:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
  }

  .flow-featured-play {
    position: absolute;
    z-index: 1;
    left: 14px;
    bottom: 14px;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    color: #111;
    background: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
  }

  .flow-featured-play svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }

  .flow-featured-card:hover .flow-featured-play,
  .flow-featured-card:focus-visible .flow-featured-play,
  .flow-featured-card.is-playing .flow-featured-play {
    opacity: 1;
    transform: translateY(0);
  }

  .flow-featured-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    color: #fff;
    background: rgba(18, 18, 18, .78);
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .2s ease, background .2s ease;
    cursor: pointer;
  }

  .flow-featured-carousel:hover .flow-featured-arrow,
  .flow-featured-carousel:focus-within .flow-featured-arrow {
    opacity: 1;
  }

  .flow-featured-arrow:hover {
    background: #292929;
  }

  .flow-featured-arrow svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .flow-featured-prev { left: 10px; }
  .flow-featured-next { right: 10px; }

  .flow-featured-arrow:disabled {
    display: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .flow-featured-card img,
    .flow-featured-card::after,
    .flow-featured-play,
    .flow-featured-arrow,
    .flow-featured-card {
      transition: none;
    }
  }

  .flow-hero-buttons {
    justify-content: flex-start;
  }

  .flow-hero-title {
    display: block;
    margin-bottom: 20px;
    text-align: left;
  }

  .flow-hero-title::after {
    display: block;
    width: 36px;
    height: 3px;
    margin: 14px 0 0;
    content: "";
    background: rgba(255, 255, 255, .28);
    border-radius: 2px;
  }

  .flow-subtitle-desktop {
    display: none;
  }

  .flow-subtitle-mobile {
    display: inline;
  }

  .main-wave-space {
    height: 180px;
    margin-bottom: -140px;
  }

  .main-wave-space {
    display: block;
    visibility: hidden;
  }

  #waveCanvas {
    display: none;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  #home {
    margin-left: 0;
    margin-right: 0;
  }

  .flow-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -4px;
    /* svh stays fixed while mobile browser chrome expands/collapses on scroll. */
    height: calc(clamp(240px, calc(100svh - 386px), 374px) + 60px);
    padding: 60px 4px 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 16px 16px;
  }

  .flow-hero::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 10%;
    background: linear-gradient(to bottom, transparent 0%, #0c0c0c 100%);
    pointer-events: none;
  }

  .flow-featured-carousel {
    display: none;
  }

  .flow-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 560px;
    padding-left: 0;
    left: auto;
    top: 0;
    text-align: center;
    margin: 0 auto;
    z-index: 2;
  }

  .flow-hero-title {
    font-size: 64px !important;
    font-family: 'Flow Style Font', sans-serif !important;
    letter-spacing: 2px;
    display: block;
    line-height: 1;
    margin-bottom: 3px;
    text-align: center; /* Центрируем заголовок */
  }

  .flow-hero-title::after {
    display: block;
    width: 28px;
    height: 2px;
    margin: 8px auto 0;
    content: "";
    background: rgba(255, 255, 255, .28);
    border-radius: 2px;
  }

  .flow-wave-icon {
    width: 32px;
    height: 32px;
  }

  .flow-hero-subtitle {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 32px;
    text-align: center; /* Центрируем подзаголовок */
  }

  .flow-subtitle-desktop {
    display: none;
  }

  .flow-subtitle-mobile {
    display: inline;
  }

  .flow-hero-buttons {
    justify-content: center; /* Центрируем кнопки */
    gap: 12px;
  }

  .flow-hero-btn {
    height: 48px;
    min-width: 210px;
    justify-content: center;
    padding: 0 22px;
    font-size: 15px;
    border-radius: 24px;
  }

  .flow-hero-buttons > .flow-hero-btn:not(.flow-hero-btn-icon) {
    flex-basis: 210px;
    width: 210px;
  }

  .flow-hero-btn-icon {
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0 !important; /* Принудительно убираем padding для круглой кнопки */
    border-radius: 50% !important; /* Принудительно круглая */
    gap: 0; /* Убираем gap чтобы SVG был по центру */
  }

  .flow-hero-btn img,
  .flow-hero-btn svg {
    width: 16px;
    height: 16px;
  }

  .flow-hero-btn .flow-play-icon,
  .flow-hero-btn .flow-pause-icon {
    width: 12px;
    height: 12px;
  }

  .flow-hero-btn-icon svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0; /* Убираем любые margin */
  }

  /* Уменьшаем волну на мобильных */
  .main-wave-space {
    height: 96px;
    margin-bottom: -56px;
    margin-left: -20px; /* Убираем левый padding контента (20px на мобильных) */
    margin-right: -20px; /* Убираем правый padding контента */
    width: calc(100% + 40px); /* Компенсируем оба отступа (20px * 2) */
  }

  #waveCanvas {
    height: calc(100% + 200px); /* Уменьшаем */
    top: -100px; /* Поднимаем меньше */
    transform: scale(0.4); /* Уменьшаем общий масштаб волны на 60% */
    transform-origin: center center; /* Масштабируем от центра */
  }

  /* Адаптация каруселей для мобильных */
  .section-title {
    font-size: 18px;
    padding-left: 4px;
    margin-bottom: 16px;
  }

  .music-carousel {
    padding: 0 4px;
  }

  #home .carousel-arrow {
    display: none;
  }

  #home .music-carousel::before {
    left: 4px;
    width: 24px;
  }

  #home .music-carousel::after {
    right: 4px;
    width: 24px;
  }

  .music-carousel::after {
    right: 12px; /* Было 58px */
    width: 40px; /* Было 95px, уменьшаем градиент */
  }

  .music-carousel::before {
    left: 12px; /* Было 58px */
    width: 40px; /* Было 95px */
  }

  .carousel-track {
    gap: 8px;
  }

  .track-title {
    font-size: 14px;
  }

  .track-artist {
    font-size: 12px;
  }
}

.main-wave-space {
  height: 300px;
  margin-bottom: -172px;
  position: relative;
  overflow: visible;
  z-index: 0;
  margin-left: -28px; /* Убираем левый padding контента */
  margin-right: -28px; /* Убираем правый padding контента */
  width: calc(100% + 56px); /* Компенсируем оба отступа (28px * 2) */
}

#waveCanvas {
  position: absolute;
  width: 100%;
  height: calc(100% + 400px); /* Увеличиваем высоту, чтобы не обрезалось */
  left: 0;
  top: -400px; /* Было -200px, поднимаем ещё на 200px */
  display: block;
  opacity: 0.95;
  transform: translateZ(0);
  will-change: transform;
  z-index: -1;
  pointer-events: none; /* Чтобы не мешал кликам */
}

/* Section Block */
.section-block {
  margin-bottom: 64px;
}

.section-title {
  font-size: 24px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
  padding-left: 58px;
}

/* Carousel Styles */
.music-carousel {
  position: relative;
  padding: 0 58px;
}

.music-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 58px;
  width: 95px;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 45%, #000 100%);
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.music-carousel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 58px;
  width: 95px;
  height: 100%;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 45%, #000 100%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.music-carousel.has-left-gradient::before {
  opacity: 1;
}

.music-carousel.at-end::after {
  opacity: 0;
}

.carousel-window {
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  position: relative;
}

.carousel-window.dragging {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  transform: translate3d(0, 0, 0);
  transition: transform 0.45s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.carousel-window.dragging .carousel-track {
  transition: none;
}

.track-card {
  flex: 0 0 auto;
  min-width: 0;
  cursor: pointer;
}

.track-card .track-info {
  position: relative;
}

.recommendation-track-actions {
  display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .track-card .track-info {
    padding-right: 30px;
  }

  .track-card .recommendation-track-actions {
    position: absolute;
    right: -4px;
    bottom: 3px;
    display: flex;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    color: rgba(255, 255, 255, .62);
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, visibility .16s ease, background .16s ease, color .16s ease;
  }

  .track-card .recommendation-track-actions:hover,
  .track-card .recommendation-track-actions:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    outline: none;
  }

  .track-card .recommendation-track-actions svg {
    width: 20px;
    height: 20px;
  }

  .track-card:hover .recommendation-track-actions,
  .track-card:focus-within .recommendation-track-actions,
  .track-card .recommendation-track-actions:focus-visible {
    opacity: 1;
    visibility: visible;
  }
}

.track-card:focus-visible {
  outline: 2px solid #65e7d4;
  outline-offset: 4px;
  border-radius: 8px;
}

.track-card .track-cover-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .45);
  font-size: 48px;
}

.recommendations-empty {
  flex: 1 0 100%;
  padding: 24px 0;
  color: rgba(255, 255, 255, .55);
  font-size: 14px;
}

.track-card .track-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  position: relative;
  transition: filter .18s ease;
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .track-card .track-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, 0) 72%);
    transition: opacity .18s ease;
  }

  .track-card:hover .track-cover::after,
  .track-card:focus-within .track-cover::after {
    opacity: 1;
  }

  .track-card-play {
    z-index: 3;
  }
}

.track-card .track-cover > img:not(.track-card-state-icon) {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.track-card-play {
  position: absolute;
  z-index: 3;
  left: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #101010;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.track-card .track-cover .track-card-play .track-card-state-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.track-card:hover .track-card-play,
.track-card:focus-within .track-card-play {
  opacity: 1;
  transform: translateY(0);
}

.track-card-play:hover {
  background: #fff;
}

@media (hover: none), (max-width: 768px) {
  .track-card-play {
    display: none;
  }
}

.track-card .track-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.track-card .track-title-line .track-title {
  min-width: 0;
  flex: 0 1 auto;
}

.carousel-track .track-info {
  padding-top: 0;
  margin-top: 8px;
}

.track-title {
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.track-artist {
  margin-top: 3px;
  color: #777;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.track-artist-link:hover,
.track-artist-link:focus-visible {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

#home .track-card .track-artist-link {
  pointer-events: auto;
  cursor: pointer;
}

#home .track-card .track-artist-link:hover,
#home .track-card .track-artist-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.track-artist-separator {
  color: inherit;
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: var(--arrow-top, 50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #181818;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.music-carousel:hover .carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
  overflow: visible;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: #292929;
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.carousel-arrow.left {
  left: 5px;
}

.carousel-arrow.right {
  right: 5px;
}

.carousel-arrow.disabled {
  opacity: 0 !important;
  pointer-events: none;
}

@media (min-width: 769px) and (max-width: 1199px) {
  .flow-featured-carousel {
    display: none;
  }

  .flow-hero-content {
    flex: initial;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  #home .track-card .recommendation-track-actions:not(.trend-track-actions) {
    display: none;
  }

  #home .section-title {
    font-size: 18px;
    padding-left: 4px;
  }

  #home .music-carousel {
    padding: 0 4px;
  }

  #home .carousel-track {
    gap: 8px;
  }

  #home [data-recommendation-surface="trending"] .carousel-track {
    gap: 12px;
  }

  #home .trend-stack {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 10px;
  }

  #home .trend-stack .track-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100% !important;
  }

  #home .trend-stack .trend-track-actions {
    display: flex;
    position: absolute;
    top: 50%;
    right: 0;
    flex: 0 0 32px;
    width: 32px;
    height: 36px;
    margin: 0 auto;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, .62);
    opacity: 1;
  }

  #home .trend-stack .track-cover {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    aspect-ratio: auto;
    border-radius: 7px;
  }

  #home .trend-stack .track-cover-placeholder {
    font-size: 28px;
  }

  #home .trend-stack .track-info {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
    min-height: 60px;
    padding-right: 40px;
    margin: 0;
  }

  #home .trend-stack .track-title-line {
    width: 100%;
  }

  #home .trend-stack .track-title {
    font-size: 14px;
  }

  #home .trend-stack .track-artist {
    margin-top: 2px;
    font-size: 12px;
  }

  #home .carousel-arrow {
    display: none;
  }

  #home .music-carousel::before {
    left: 4px;
    width: 24px;
  }

  #home .music-carousel::after {
    right: 4px;
    width: 24px;
  }

  #home .music-carousel::before,
  #home .music-carousel::after {
    display: none;
  }
}

/* Mobile Adaptation */
@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  /* Sidebar становится нижней навигацией */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 70px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    border-right: none;
    border: 1px solid #414141;
    border-bottom: 0;
    border-radius: 32px 32px 0 0;
    background: linear-gradient(180deg, #000 0%, #0f0f0f 100%);
    box-sizing: border-box;
    z-index: 100;
  }

  .navigation {
    position: relative;
    flex-direction: row;
    gap: 0;
    margin-top: 0;
    width: 100%;
    justify-content: space-between;
    max-width: 450px;
  }

  .nav-active-indicator {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #171717;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -50%, 0);
    transition: transform .18s cubic-bezier(.2, .8, .2, 1), opacity .12s ease;
    z-index: 0;
  }

  .nav-active-indicator.is-positioned {
    opacity: 1;
  }

  /* Показываем настройки в навигации на мобильных */
  .mobile-only {
    display: flex;
  }

  /* Скрываем нижнюю кнопку настроек на мобильных */
  .desktop-only {
    display: none;
  }

  /* Все кнопки равноправны на мобильных */
  .nav-item-bottom {
    margin-bottom: 0;
  }

  .nav-item svg {
    display: none;
  }

  .nav-item .desktop-nav-icon {
    display: none;
  }

  .nav-item .mobile-nav-icon {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: grayscale(1) brightness(0) invert(1);
    opacity: .34;
    transition: width .12s ease, height .12s ease, opacity .12s ease, transform .12s ease;
  }

  .nav-item:hover .mobile-nav-icon,
  .nav-item.active .mobile-nav-icon {
    opacity: 1;
  }

  .nav-item.active .mobile-nav-icon {
    width: 30px;
    height: 30px;
    opacity: 1;
  }

  .navigation .nav-item {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    background: transparent;
    transition: color .2s ease;
  }

  .navigation .nav-item.active,
  .navigation .nav-item.active:hover {
    color: #fff;
    background: transparent;
  }

  .navigation .nav-item.active {
    transform: none;
  }

  /* Main контент занимает всю ширину */
  .main {
    margin-left: 0;
    margin-top: 56px;
    margin-bottom: 70px;
    min-height: calc(100vh - 126px);
  }

  /* Content с отступом снизу для навигации */
  .content {
    min-height: calc(100vh - 126px);
    padding: 4px; /* Было 20px, уменьшаем в 5 раз */
  }

  /* Уменьшаем размер заголовков на мобильных */
  .content-section h1 {
    font-size: 24px;
    font-family: 'Style Font', 'Akt Thin', sans-serif;
  }

  .content-section p {
    font-size: 14px;
  }

  /* Уменьшаем header на мобильных */
  .header {
    padding: 0 16px 0 12px;
    gap: 12px;
    border: 0;
    background: linear-gradient(
      180deg,
      #0c0c0c 0%,
      rgba(12, 12, 12, 0.99) 24%,
      rgba(12, 12, 12, 0.94) 45%,
      rgba(12, 12, 12, 0.78) 65%,
      rgba(12, 12, 12, 0.48) 82%,
      rgba(12, 12, 12, 0.16) 94%,
      rgba(12, 12, 12, 0) 100%
    );
  }

  .search {
    max-width: none;
    height: 34px;
    padding: 0 12px;
    gap: 10px;
  }

  .search input {
    font-size: 13px;
  }

  .notification-btn {
    width: 34px;
    height: 34px;
    margin-right: -4px;
  }

  .notification-btn svg {
    width: 18px;
    height: 18px;
  }

  .notification-btn img {
    width: 18px;
    height: 18px;
  }

  .header-settings-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    border-radius: 50%;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .header-settings-btn img {
    width: 20px;
    height: 20px;
    filter: grayscale(1) brightness(0) invert(1);
    opacity: .65;
  }

  .header-settings-btn:active img {
    opacity: 1;
  }

  /* Скрываем плеер на мобильных */
  .player {
    display: none;
  }
}


/* ===================================
   MODAL
   =================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 32px;
  max-width: 440px;
  width: calc(100% - 40px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-box {
  transform: scale(1);
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #fff;
}

.modal-message {
  font-size: 15px;
  color: #bbb;
  margin: 0 0 28px;
  line-height: 1.5;
}

.modal-buttons {
  display: flex;
  gap: 12px;
}

.premium-limit-modal {
  z-index: 12000;
  padding: 20px;
}

.premium-limit-card {
  position: relative;
  width: min(100%, 440px);
  padding: 34px 32px 26px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: radial-gradient(ellipse at 50% -12%, rgba(91, 226, 213, .18), transparent 58%), #17181c;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  transform: translateY(12px) scale(.97);
  transition: transform .25s ease;
}

.premium-limit-modal.show .premium-limit-card { transform: translateY(0) scale(1); }

.premium-limit-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 34px;
  height: 34px;
  color: #aaa;
  font-size: 28px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.premium-limit-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  object-fit: cover;
  border-radius: 20px;
  mix-blend-mode: screen;
}

.premium-limit-card h2 { margin: 0 0 10px; font-size: 25px; font-weight: 700; }
.premium-limit-message { margin: 0 auto 24px; max-width: 340px; color: #aaa; font-size: 15px; line-height: 1.55; }

.premium-limit-cta {
  width: 100%;
  min-height: 50px;
  color: #071014;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(100deg, #70e8d2, #63c6e9 58%, #a49bff);
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}

.premium-limit-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.premium-limit-later { margin-top: 14px; padding: 7px 14px; color: #92929a; font-size: 14px; background: transparent; border: 0; cursor: pointer; }
.premium-limit-later:hover, .premium-limit-close:hover { color: #fff; }

@media (max-width: 480px) {
  .premium-limit-card { padding: 30px 22px 22px; border-radius: 19px; }
  .premium-limit-card h2 { font-size: 22px; }
  .premium-limit-message { font-size: 14px; }
}

.modal-btn {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-btn-cancel {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #3a3a3a;
}

.modal-btn-cancel:hover {
  background: #333;
  border-color: #444;
}

.modal-btn-confirm {
  background: #fff;
  color: #000;
}

.modal-btn-confirm:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.modal-btn:active {
  transform: translateY(0);
}

.playlist-picker-box {
  width: min(680px, calc(100% - 32px));
  max-width: 680px;
  max-height: min(82vh, 720px);
  padding: 24px;
  overflow: hidden;
}

.playlist-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.playlist-picker-heading .modal-title {
  margin: 0;
}

.playlist-picker-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #aaa;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.playlist-picker-close:hover {
  color: #fff;
  background: #292929;
}

.playlist-picker-hint {
  margin: 8px 0 16px;
  color: #999;
  font-size: 14px;
}

.playlist-picker-status {
  color: #aaa;
  font-size: 14px;
}

.playlist-picker-status:empty {
  display: none;
}

.playlist-picker-status.is-error {
  margin: 0 0 12px;
  color: #ff6b6b;
}

.playlist-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: min(calc(58vh + 12px), 512px);
  padding: 5px 5px 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #454545 #1a1a1a;
}

.playlist-picker-grid::-webkit-scrollbar {
  width: 8px;
}

.playlist-picker-grid::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 8px;
}

.playlist-picker-grid::-webkit-scrollbar-thumb {
  background: #454545;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
}

.playlist-picker-grid::-webkit-scrollbar-thumb:hover {
  background: #626262;
}

.playlist-picker-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 12px;
  color: #999;
  text-align: center;
}

.playlist-picker-create {
  padding: 9px 14px;
  color: #111;
  background: #fff;
  border: 0;
  border-radius: 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.playlist-picker-create:hover {
  background: #e9e9e9;
}

.playlist-picker-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  color: #fff;
  text-align: left;
  background: #111;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .16s ease;
}

.playlist-picker-card:hover:not(:disabled) {
  transform: translateY(-2px);
}

.playlist-picker-card:disabled {
  cursor: wait;
  opacity: .55;
}

.playlist-picker-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 9px;
  overflow: hidden;
  color: #888;
  background: #242424;
  border-radius: 8px;
}

.playlist-picker-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-picker-cover.favorites {
  color: #a52649;
  background: linear-gradient(135deg, #ff4444, #ff6b9d);
}

.playlist-picker-cover svg {
  width: 30px;
  height: 30px;
}

.playlist-picker-name,
.playlist-picker-count {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-picker-name {
  font-size: 14px;
  font-weight: 600;
}

.playlist-picker-count {
  margin-top: 3px;
  color: #888;
  font-size: 12px;
}

.app-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(0 0 0 / 72%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.app-prompt-overlay.show {
  opacity: 1;
  visibility: visible;
}

.app-prompt-dialog {
  width: min(440px, 100%);
  padding: 24px;
  color: #fff;
  background: #171717;
  border: 1px solid #333;
  border-radius: 20px;
  box-shadow: 0 20px 70px rgb(0 0 0 / 50%);
  transform: translateY(8px) scale(.985);
  transition: transform .18s ease;
}

.app-prompt-overlay.show .app-prompt-dialog {
  transform: translateY(0) scale(1);
}

.app-prompt-title {
  margin: 0 0 10px;
  font-size: 22px;
}

.app-prompt-message {
  margin: 0 0 18px;
  color: #aaa;
  line-height: 1.5;
  white-space: pre-line;
}

.app-prompt-label {
  display: block;
  color: #aaa;
  font-size: 13px;
}

.app-prompt-textarea-label {
  margin-top: 10px;
}

.app-prompt-label[hidden],
.app-prompt-input[hidden],
.app-prompt-textarea-label[hidden] {
  display: none;
}

.app-prompt-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  color: #fff;
  background: #101010;
  border: 1px solid #383838;
  border-radius: 10px;
  font: inherit;
  outline: none;
}

.app-prompt-input:focus {
  border-color: #777;
}

.app-prompt-textarea {
  resize: vertical;
  min-height: 96px;
}

.app-prompt-input select,
select.app-prompt-input {
  color-scheme: dark;
}

.app-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.app-prompt-actions button {
  min-width: 112px;
  padding: 10px 16px;
  border: 1px solid #383838;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.app-prompt-cancel {
  background: #202020;
}

.app-prompt-submit {
  background: linear-gradient(110deg, #12cdbd, #55c0dd);
  color: #071414 !important;
}

.app-prompt-actions button:hover {
  filter: brightness(1.12);
}

.app-toast {
  position: fixed;
  z-index: 11000;
  right: 24px;
  top: 72px;
  bottom: auto;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  color: #fff;
  background: #202020;
  border: 1px solid #383838;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgb(0 0 0 / 35%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .modal-box {
    padding: 24px;
  }

  .playlist-picker-box {
    width: calc(100% - 24px);
    padding: 18px;
  }

  .playlist-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .playlist-picker-card {
    padding: 8px;
  }

  .playlist-picker-name {
    font-size: 13px;
  }

  .app-toast {
    right: 12px;
    bottom: 16px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-message {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .modal-buttons {
    flex-direction: row;
  }

  .modal-btn {
    width: auto;
    height: 42px;
    min-height: 42px;
  }

  .edit-modal-buttons {
    flex-direction: row;
    gap: 10px;
  }

  .edit-modal-btn {
    min-height: 42px;
    padding: 8px 12px;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .app-toast {
    z-index: 12000;
    left: 50%;
    right: auto;
    bottom: calc(70px + 12px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    background: rgba(28, 30, 32, .68);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .06);
    text-align: center;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease, bottom .18s ease-out;
  }

  body:has(.player.is-visible) .app-toast {
    bottom: calc(78px + 66px + 12px + env(safe-area-inset-bottom));
  }

  body.player-expanded-open .app-toast {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .app-toast.show {
    transform: translate(-50%, 0);
  }
}


/* ===================================
   FOOTER
   =================================== */

.footer {
  width: 100%;
  padding: 24px 0 80px; /* Уменьшаем нижний padding со 150px до 80px */
  margin-top: 0;
  border-top: 1px solid #1a1a1a;
  background: #0c0c0c;
}

.footer-content {
  max-width: calc(100% - 120px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Центрируем по вертикали */
  padding: 0 60px;
  height: 100%; /* Занимаем всю высоту футера */
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-copyright {
  font-size: 14px;
  color: #666;
}

.footer-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.footer-link {
  font-size: 13px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
}

@media (min-width: 769px) {
  /* Extend the footer below its content so the fixed desktop player
     does not cover the links when the page is scrolled to the bottom. */
  body:has(.player.is-visible) .footer {
    padding-bottom: 150px;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  /* Let the home page end after its actual content instead of stretching
     the whole main area to a viewport-sized minimum. */
  body:has(#home.active) .main,
  body:has(#home.active) .content {
    min-height: 0;
  }

  .footer {
    padding: 16px 0 calc(70px + env(safe-area-inset-bottom));
    margin-top: 28px;
  }

  /* Keep footer content above the fixed mini-player when it is visible. */
  body:has(.player.is-visible) .footer {
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    max-width: 100%;
    transform: translateY(-8px);
  }

  .footer-left {
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    gap: 9px 12px;
    text-align: center;
    width: 100%;
  }

  .footer-copyright {
    font-size: 12px;
  }

  .footer-link {
    font-size: 11px;
    line-height: 1.35;
  }
}

/* Search Results Dropdown */
.search {
  position: relative;
}

.search .search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.search .search-results.show {
  display: block;
}

.search-results-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2a2a2a;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #0a0a0a;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #2a2a2a;
}

.search-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00CABA, #007370);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-username {
  font-size: 13px;
  color: #666;
}

.search-result-username::before {
  content: '@';
}

.search-no-results {
  padding: 32px 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.search-loading {
  padding: 32px 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}


/* ===================================
   Library Page
   =================================== */

#library {
  max-width: calc(100% - 120px);
  margin: 0 auto;
  padding-top: 16px; /* Увеличиваем отступ сверху (было 5px) */
}

/* ===================================
   Account Page
   =================================== */

#account {
  max-width: calc(100% - 120px);
  margin: 0 auto;
  position: relative;
}

.public-profile {
  max-width: calc(100% - 120px);
  margin: 0 auto;
  position: relative;
}
.public-profile-banner { background: #1a1a1a; }
.public-profile-banner-wrap { position: relative; }
.public-profile-banner { margin-bottom: 0; }
.public-profile-banner-wrap { margin-bottom: 24px; }
.public-profile-more-btn {
  position: absolute;
  z-index: 23;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.public-profile-more-btn[hidden] { display: none !important; }
.public-profile-more-btn svg { width: 20px; height: 20px; }
.public-profile-more-btn:hover {
  background: rgba(0, 0, 0, 0.58);
  border-color: rgba(255, 255, 255, 0.18);
  transform: none;
}
.public-profile-more-btn:focus-visible { opacity: 1; pointer-events: auto; outline: 2px solid #fff; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .public-profile-banner-wrap:hover .public-profile-more-btn,
  .public-profile-more-btn:focus-visible { opacity: 1; pointer-events: auto; }
}
.public-profile-banner-wrap.is-menu-visible .public-profile-more-btn { opacity: 1; pointer-events: auto; }
.public-profile-header { top: 258px; }
.public-profile-title-row {
  display: flex;
  width: auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.public-profile-title-row .account-listeners-stat {
  position: static;
  flex: 0 0 auto;
  margin: 0;
}
.public-profile-title-row #publicProfileListeners { display: block; }
.public-profile-actions {
  position: absolute;
  z-index: 21;
  top: auto;
  right: 32px;
  bottom: 28px;
  left: auto;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.public-profile-actions[hidden] { display: none; }
.public-profile-desktop-listeners {
  display: none;
  position: static;
  flex: 0 0 auto;
  margin: 0 0 0 4px;
  color: #fff;
  font-size: 15px;
}
.public-profile-play {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #0b0b0b;
  background: #fff;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease;
}
.public-profile-play:hover:not(:disabled) { transform: scale(1.05); }
.public-profile-play:disabled { opacity: .5; cursor: default; }
.public-profile-play img { display: block; width: 16px; height: 16px; }
.public-profile-pause-icon,
.public-profile-play.is-playing .public-profile-play-icon { display: none !important; }
.public-profile-play.is-playing .public-profile-pause-icon { display: block !important; }
.public-profile-follow-btn {
  flex: 0 0 148px;
  width: 148px;
  text-align: center;
  white-space: nowrap;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #0b0b0b;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, opacity .16s ease;
}
.public-profile-follow-btn:hover:not(:disabled) { background: #e7e7e7; }
.public-profile-follow-btn.is-following {
  border-color: #444;
  color: #fff;
  background: #181818;
}
.public-profile-follow-btn.is-following:hover:not(:disabled) { background: #292929; }
.public-profile-follow-btn:disabled { opacity: .6; cursor: wait; }
.public-profile-avatar { overflow:hidden; cursor:default; pointer-events:none; }
.public-profile .account-avatar:hover { opacity:1; }
.public-profile-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:50%; }
.public-profile-track { cursor:pointer; }
.public-profile-track:focus-visible { outline:2px solid #78e8d6; outline-offset:2px; }
.public-profile-track .track-cover-play { pointer-events:none; }
.public-profile-track:focus-visible .track-cover-play { opacity:1; }
.public-profile .library-playlist-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.account-playlists-grid > .library-empty {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  text-align: center;
}

.account-banner {
  width: 100%;
  height: 380px;
  background: #1a1a1a;
  border-radius: 16px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.account-banner::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(to bottom, transparent 42%, rgba(0, 0, 0, 0.42) 100%);
  pointer-events: none;
}

.account-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.account-edit-banner-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  color: #fff;
}

.account-banner:hover .account-edit-banner-btn {
  opacity: 1;
}

.account-edit-banner-btn:hover {
  background: rgba(0, 0, 0, 0.58);
  border-color: rgba(255, 255, 255, 0.18);
  transform: none;
}

.account-edit-banner-btn svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.account-header {
  position: absolute;
  top: 252px;
  left: 32px;
  right: 32px;
  z-index: 10;
  margin: 0;
  padding: 0;
}

.account-header .account-avatar-container {
  display: none;
}

.account-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.account-track-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.account-track-sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-track-sort-wrap[hidden] {
  display: none;
}

.account-track-sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 205px;
  height: 34px;
  padding: 0 8px;
  box-sizing: border-box;
  color: #777;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.account-track-sort-trigger [data-track-sort-label] {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 15px;
}

.account-track-sort-trigger:hover,
.account-track-sort-wrap:has(.account-track-sort-menu:not([hidden])) .account-track-sort-trigger,
.account-track-sort-trigger:focus-visible {
  color: #ccc;
  background: rgba(255, 255, 255, .04);
  border-color: #303030;
  outline: none;
}

.account-track-sort-trigger svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.account-track-sort-wrap:has(.account-track-sort-menu:not([hidden])) .account-track-sort-trigger svg {
  transform: rotate(180deg);
}

.account-track-sort-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  min-width: 205px;
  padding: 5px;
  background: #1b1b1b;
  border: 1px solid #353535;
  border-radius: 11px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .48);
}

.account-track-sort-menu[hidden] {
  display: none;
}

.account-track-sort-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 9px 10px;
  color: #aaa;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.account-track-sort-menu button:hover,
.account-track-sort-menu button:focus-visible {
  color: #fff;
  background: #292929;
  outline: none;
}

.account-track-sort-menu button[aria-checked="true"] {
  color: #fff;
}

.account-track-sort-check {
  color: #00caba;
  opacity: 0;
}

.account-track-sort-menu button[aria-checked="true"] .account-track-sort-check {
  opacity: 1;
}

.account-upload-btn {
  position: relative;
  top: -11px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: none;
  border-radius: 24px;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.account-upload-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.account-upload-btn svg {
  width: 18px;
  height: 18px;
  color: #000;
}

.account-avatar-container {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.account-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00CABA, #007370);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #000;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-avatar:hover {
  opacity: 0.9;
}

.account-avatar svg {
  width: 80px;
  height: 80px;
  color: #fff;
  stroke-width: 1.5;
  transition: opacity 0.2s ease;
}

.account-edit-avatar-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  color: #fff;
}

.account-avatar:hover .account-edit-avatar-btn {
  opacity: 1;
}

.account-edit-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
}

.account-edit-avatar-btn svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.account-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
}

.account-username {
  font-size: clamp(42px, 5vw, 76px) !important;
  font-family: 'Arial Black', system-ui, sans-serif !important;
  font-weight: 900 !important;
  color: #fff;
  line-height: 1;
  margin: 0;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.account-usertag {
  font-size: 18px;
  color: #999;
  font-weight: 400;
  display: none;
}

.account-content {
  padding: 0;
}

.account-listeners-stat {
  position: relative;
  left: 3px;
  top: -7px;
  font-size: 15px;
  color: #fff;
  margin-top: -2px;
  font-weight: 400;
  text-align: left; /* Слева на десктопе */
}

.account-listeners-stat .listeners-count {
  color: inherit;
  font-weight: inherit;
}

.account-section {
  margin-bottom: 64px;
}

.account-section-title {
  font-size: 24px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.account-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 24px;
}

.account-playlists-grid .library-loading {
  grid-column: 1 / -1; /* Растягиваем на все колонки */
}

.account-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Mobile адаптация */
@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  body:has(#account.active) .content,
  body:has(#publicProfile.active) .content {
    padding-top: 0;
  }

  .public-profile { max-width:100%; padding:0 4px; }
  #account {
    max-width: 100%;
    padding: 0 4px; /* Уменьшаем отступы в 5 раз (было 20px с каждой стороны) */
  }

  /* Увеличиваем ширину контента настроек на мобильных */
  #settings {
    max-width: 100%; /* Было 50% на десктопе */
    padding: 10px 4px 0; /* Сохраняем боковые отступы и добавляем отступ от шапки */
  }

  #playlistPage {
    max-width: 100%;
    padding: 10px 4px 0;
  }

  .playlist-page-back {
    margin-bottom: 16px;
  }

  .playlist-page-header {
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
  }

  .playlist-page-cover {
    flex-basis: min(36vw, 150px);
    width: min(36vw, 150px);
    height: min(36vw, 150px);
    border-radius: 8px;
  }

  .playlist-page-heading h1 {
    margin-bottom: 8px;
    font-size: clamp(20px, 5vw, 28px);
  }

  .playlist-page-type {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .playlist-page-meta,
  .playlist-page-owner {
    flex-wrap: wrap;
    gap: 5px;
    font-size: 12px;
  }

  .playlist-page-play {
    min-height: 36px;
    margin-top: 12px;
    padding: 0 16px;
    font-size: 13px;
  }

  /* Увеличиваем ширину контента библиотеки на мобильных */
  #library {
    max-width: 100%; /* Было calc(100% - 120px) на десктопе */
    padding: 10px 4px 0; /* Добавляем отступ от шапки */
  }
  
  .account-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -4px;
    height: 264px;
    margin-bottom: 16px;
    border-radius: 0;
    overflow: hidden;
  }

  .account-banner::after {
    background:
      linear-gradient(to bottom, transparent 86%, #0c0c0c 100%),
      linear-gradient(to bottom, transparent 42%, rgba(0, 0, 0, 0.42) 100%);
  }

  #account .account-banner::after {
    background: linear-gradient(to bottom, transparent 42%, rgba(0, 0, 0, 0.42) 100%);
  }

  .public-profile-banner::after {
    background: linear-gradient(to bottom, transparent 62%, rgba(0, 0, 0, .42) 100%);
  }
  
  .account-header {
    top: 126px;
    left: 12px;
    right: 12px;
    z-index: 20;
  }

  #account .account-header { top: 201px; }
  #account .account-edit-banner-btn { top: 12px; right: 12px; opacity: 0; pointer-events: none; }
  #account .account-banner.is-menu-visible .account-edit-banner-btn { opacity: 1; pointer-events: auto; }
  #account .account-content { margin-top: -5px; }
  #account .account-actions-bar, #publicProfile .account-actions-bar { margin-bottom: 8px; }
  #account .account-upload-btn { transform: translateY(3px); }
  #account .account-info { gap: 0; }
  #account .account-listeners-stat {
    position: relative;
    left: 3px;
    margin-top: -8px;
    line-height: 1;
  }

  .public-profile-banner-wrap { display: flow-root; margin-bottom: 16px; }
  .public-profile-banner { margin-bottom: 0; }
  .public-profile-more-btn { top: 12px; right: 12px; opacity: 0; pointer-events: none; }
  .public-profile-banner-wrap.is-menu-visible .public-profile-more-btn { opacity: 1; pointer-events: auto; }
  .public-profile-header { top: 196px; bottom: auto; }
  .public-profile-title-row { width: auto; flex-direction: column; align-items: flex-start; gap: 0; }
  .public-profile-title-row .account-listeners-stat {
    position: relative;
    left: 3px;
    top: 0;
    margin: -12px 0 0;
    line-height: 1;
  }
  .public-profile-title-row #publicProfileListeners { display: block; }
  .public-profile-desktop-listeners { display: none; }
  .public-profile-actions {
    position: absolute;
    z-index: 21;
    top: auto;
    bottom: 12px;
    right: 12px;
    left: auto;
    gap: 8px;
    margin: 0;
  }
  .public-profile-play { flex-basis: 44px; width: 44px; height: 44px; }
  .public-profile-follow-btn {
    flex-basis: 116px;
    width: 116px;
    min-height: 42px;
    padding: 0 8px;
    font-size: 12px;
  }
  
  .account-avatar-container {
    display: none; /* Скрываем аватарку на мобилках */
  }
  
  .account-info {
    gap: 3px;
  }
  
  .account-listeners-stat {
    text-align: left;
    font-size: 14px;
  }
  
  .account-username {
    font-size: clamp(32px, 8vw, 48px) !important;
  }
  
  .account-usertag {
    font-size: 16px;
  }
  
  .account-content {
    padding: 0;
  }
  
  .account-section-title {
    font-size: 20px;
  }
  
  .account-playlists-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

.library-page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  margin-top: 16px; /* Добавляем отступ сверху */
  color: #fff;
}

.library-section {
  margin-bottom: 48px;
}

.library-section--reserved-empty {
  visibility: hidden;
  pointer-events: none;
}

.library-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.library-section-title {
  font-size: 18px; /* Уменьшаем с 24px на 6px (24 - 6 = 18px) */
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 700;
  color: #fff;
}

.library-create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: none;
  border-radius: 24px;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.library-create-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.library-create-btn svg {
  width: 18px;
  height: 18px;
}

.library-clear-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #999;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.library-clear-btn:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}

.library-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 16px;
}

#sharedPlaylists > .library-empty {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  text-align: center;
}

/* Карточка создания плейлиста (скрыта на десктопе, видна на мобильных) */
.library-create-card {
  display: none;
}

.library-playlist-card {
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.library-playlist-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.library-playlist-menu-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: all 0.2s ease;
  z-index: 10;
}

.library-playlist-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.library-playlist-menu-btn svg {
  width: 16px;
  height: 16px;
  color: #999;
}

.album-card-menu-btn {
  z-index: 3;
}

.album-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
}

.album-edit-dialog {
  position: relative;
  width: min(100%, 480px);
  padding: 28px;
  border: 1px solid #303030;
  border-radius: 20px;
  background: #191919;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.album-edit-dialog h2 {
  margin: 0 36px 24px 0;
  color: #fff;
  font-size: 22px;
}

.album-edit-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #aaa;
  font-size: 28px;
  cursor: pointer;
}

.album-edit-close:hover { background: #292929; color: #fff; }

.album-edit-label {
  display: block;
  margin-bottom: 8px;
  color: #c7c7c7;
  font-size: 14px;
  font-weight: 600;
}

.album-edit-name {
  width: 100%;
  height: 48px;
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid #333;
  border-radius: 10px;
  outline: none;
  background: #0b0b0b;
  color: #fff;
  font: inherit;
}

.album-edit-name:focus { border-color: #aaa; }

.album-edit-cover {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px dashed #444;
  border-radius: 12px;
  color: #ddd;
  cursor: pointer;
}

.album-edit-cover img {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 8px;
  object-fit: cover;
}

.album-edit-cover > span:first-child:not(:last-child) { font-size: 28px; }
.album-edit-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.album-edit-error { min-height: 20px; margin: 0 0 12px; color: #ff6b75; font-size: 13px; }
.album-edit-actions { display: flex; justify-content: flex-end; gap: 10px; }
.album-edit-actions button { min-height: 44px; padding: 0 18px; border: 1px solid #383838; border-radius: 999px; background: #222; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.album-edit-actions .album-edit-save { border-color: #fff; background: #fff; color: #090909; }
.album-edit-actions button:disabled { cursor: wait; opacity: .65; }

.account-album-card .library-playlist-info { padding-right: 28px; }

.library-playlist-cover {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #ff4444, #ff6b9d);
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
}

/* Кнопка плей при наведении на плейлист */
.library-playlist-play-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.library-playlist-card:hover .library-playlist-play-btn {
  opacity: 1;
  transform: translateY(0);
}

.search-album-card .search-album-play-btn {
  opacity: 0;
  transform: translateY(8px);
}

.search-album-card:hover .search-album-play-btn,
.search-album-card:focus-within .search-album-play-btn {
  opacity: 1;
  transform: translateY(0);
}

.search-album-cover .search-album-play-btn img {
  width: 16px;
  height: 16px;
}

.library-playlist-card .library-playlist-play-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.library-playlist-card .library-playlist-play-btn:active {
  transform: translateY(0);
}

.library-playlist-play-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-left: 2px;
}

.library-playlist-play-btn.is-playing img {
  margin-left: 0;
}

/* Избранное - красно-розовый градиент */
.library-playlist-cover.favorites {
  background: linear-gradient(135deg, #ff4444, #ff6b9d);
}

.library-playlist-icon {
  width: 120px;
  height: 120px;
  color: rgba(0, 0, 0, 0.3);
}

.library-playlist-cover.favorites .library-playlist-icon {
  width: 60%;
  height: 60%;
  object-fit: contain;
  filter: none;
}

/* Белая иконка с ноткой для обычных плейлистов */
.library-playlist-icon-note {
  color: #fff;
}

.library-playlist-shared-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.library-playlist-shared-badge svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

.library-playlist-info {
  padding: 0 4px;
}

.library-playlist-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-playlist-meta {
  font-size: 13px;
  color: #666;
}

.library-playlist-owner {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.library-playlist-owner::before {
  content: 'От: ';
  color: #666;
}

.library-loading {
  text-align: center;
  padding: 48px 16px;
  color: #666;
  font-size: 14px;
  width: 100%; /* Занимаем всю ширину контейнера */
}

.library-empty {
  text-align: center;
  padding: 48px 16px;
  color: #666;
  font-size: 14px;
}

.library-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: #2a2a2a;
}

/* История прослушивания */
.library-history-section {
  border-top: 1px solid #1a1a1a;
  padding-top: 48px;
}

.library-history-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.library-history-scroll {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #2a2a2a;
  border-radius: 50%;
  background: transparent;
  color: #999;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.library-history-scroll:hover {
  color: #fff;
  background: #1a1a1a;
  border-color: #444;
}

.library-history-scroll svg {
  width: 18px;
  height: 18px;
}

.library-history-list {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.library-history-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 clamp(250px, 27vw, 330px);
  min-width: 0;
  min-height: 84px;
  padding: 12px 62px 12px 14px;
  background: #1a1a1a;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  scroll-snap-align: start;
}

.library-history-item:hover {
  background: #2a2a2a;
}

.library-history-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #2a2a2a;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.library-history-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-history-cover svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.42);
}

.library-history-info {
  flex: 1;
  min-width: 0;
}

.library-history-track {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-history-artist {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-history-time {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 13px;
  color: #666;
  flex-shrink: 0;
  white-space: nowrap;
}

.library-history-list .library-empty {
  flex: 0 0 100%;
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .library-history-section .library-section-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .library-history-section .library-section-title {
    font-size: 16px;
  }

  .library-history-controls {
    gap: 6px;
  }

  .library-history-scroll {
    width: 32px;
    height: 32px;
  }

  .library-history-item {
    flex-basis: min(78vw, 310px);
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .library-playlists-grid {
    display: flex; /* Меняем с grid на flex для списка */
    flex-direction: column;
    gap: 8px; /* Было 12px */
  }

  .library-playlist-card {
    display: flex; /* Горизонтальный макет */
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
  }

  .library-playlist-card:hover {
    transform: none; /* Убираем эффект подъема */
  }

  .library-playlist-cover {
    width: 64px; /* Фиксированная ширина */
    height: 64px; /* Фиксированная высота */
    aspect-ratio: unset; /* Убираем aspect-ratio */
    margin-bottom: 0; /* Убираем отступ снизу */
    flex-shrink: 0; /* Не сжимаем обложку */
  }

  .library-playlist-info {
    flex: 1; /* Занимаем все доступное пространство */
    min-width: 0; /* Для корректного overflow */
  }

  .library-playlist-name {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .library-playlist-meta,
  .library-playlist-owner {
    font-size: 12px;
  }

  /* Кнопка меню справа */
  .library-playlist-menu-btn {
    position: static; /* Было absolute */
    width: 36px;
    height: 36px;
    opacity: 1; /* Всегда видна */
    flex-shrink: 0;
  }

  /* Убираем кнопку play на мобильных */
  .library-playlist-play-btn {
    display: none;
  }

  /* Скрываем классическую кнопку создания */
  .library-create-btn {
    display: none;
  }

  /* Карточка-кнопка создания плейлиста на мобильных */
  .library-create-card {
    display: flex !important; /* Показываем только на мобильных */
    flex-direction: row;
    align-items: center;
    justify-content: center; /* Центрируем содержимое */
    padding: 20px 12px; /* Увеличили вертикальные отступы */
    gap: 12px;
    background: transparent;
    border: 2px dashed #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .library-create-card:hover {
    border-color: #3a3a3a;
    background: rgba(255, 255, 255, 0.02);
  }

  .library-create-card-icon {
    /* Убрали внутренний квадрат - теперь просто иконка */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .library-create-card-icon svg {
    width: 32px;
    height: 32px;
    color: #666;
  }

  .library-create-card-text {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    text-align: center;
  }
  
  .library-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}


/* Create Playlist Modal */
.create-playlist-content {
  max-width: 500px;
}

.playlist-cover-upload {
  margin-bottom: 24px;
  max-width: 180px;
}

.playlist-cover-preview {
  width: 100%;
  aspect-ratio: 1;
  background: #0a0a0a;
  border: 2px dashed #2a2a2a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.playlist-cover-preview:hover {
  border-color: #3a3a3a;
  background: #0f0f0f;
}

.playlist-cover-preview svg {
  width: 32px;
  height: 32px;
  color: #fff;
  stroke: #fff;
}

.playlist-cover-preview span {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.playlist-cover-preview.has-image {
  border-style: solid;
  border-color: #2a2a2a;
}

.playlist-cover-preview.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.playlist-cover-preview.has-image:hover::before {
  opacity: 1;
}

.playlist-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-cover-preview.has-image svg,
.playlist-cover-preview.has-image span {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.playlist-cover-preview.has-image:hover svg,
.playlist-cover-preview.has-image:hover span {
  opacity: 1;
  color: #fff;
}

.playlist-form-group {
  margin-bottom: 20px;
}

.playlist-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.playlist-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.playlist-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #00CABA;
}

.playlist-checkbox span {
  font-size: 15px;
  color: #fff;
  font-weight: 500;
}

.playlist-checkbox-hint {
  font-size: 13px;
  color: #666;
  margin: 8px 0 0 32px;
  line-height: 1.4;
}


/* ===================================
   Upload Modal
   =================================== */

.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-modal.show {
  display: flex;
  opacity: 1;
}

.upload-modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

.upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #2a2a2a;
}

.upload-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 16px;
}

.upload-tab {
  padding: 8px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #999;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.upload-tab:hover {
  color: #fff;
}

.upload-tab.active {
  color: #fff;
  border-bottom-color: #00CABA;
}

.upload-modal-close {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease;
  margin-bottom: 16px;
}

.upload-modal-close:hover {
  color: #fff;
}

.upload-modal-close svg {
  width: 24px;
  height: 24px;
}

.upload-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.upload-tab-content {
  display: none;
}

.upload-tab-content.active {
  display: block;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upload-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.upload-form-group input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.upload-form-group input[type="text"]:focus {
  outline: none;
  border-color: #00CABA;
  background: #0f0f0f;
}

.upload-file-input {
  position: relative;
  width: 100%;
  height: 44px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-file-input:hover {
  border-color: #3a3a3a;
  background: #0f0f0f;
}

.upload-file-input input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-file-input span {
  font-size: 14px;
  color: #999;
}

.upload-tracks-section {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid #2a2a2a;
}

.upload-tracks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.upload-tracks-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.upload-add-track-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #2a2a2a;
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.upload-add-track-btn:hover {
  background: #3a3a3a;
  transform: translateY(-1px);
}

.upload-add-track-btn svg {
  width: 16px;
  height: 16px;
}

.upload-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-track-item {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-track-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upload-track-number {
  font-size: 13px;
  font-weight: 600;
  color: #999;
}

.upload-track-remove {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease;
}

.upload-track-remove:hover {
  color: #ff4444;
}

.upload-track-remove svg {
  width: 18px;
  height: 18px;
}

.upload-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #2a2a2a;
}

.upload-btn-cancel,
.upload-btn-submit {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.upload-btn-cancel {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #999;
}

.upload-btn-cancel:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}

.upload-btn-submit {
  background: linear-gradient(135deg, #00CABA, #007370);
  color: #fff;
}

.upload-btn-submit:hover {
  background: linear-gradient(135deg, #00E5D0, #008C87);
  transform: translateY(-1px);
}

/* Mobile адаптация */
@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .upload-modal-content {
    max-width: 95%;
    max-height: 90vh;
  }
  
  .upload-modal-header {
    padding: 20px 20px 0 20px;
  }
  
  .upload-modal-body {
    padding: 20px;
  }
  
  .upload-modal-footer {
    padding: 12px 20px;
  }
}

/* ===================================
   Upload Modal
   =================================== */

.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-modal.show {
  display: flex;
  opacity: 1;
}

.upload-modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 95%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

.upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px 24px;
}

.upload-modal-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.upload-modal-close {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease;
}

.upload-modal-close:hover {
  color: #fff;
}

.upload-modal-close svg {
  width: 24px;
  height: 24px;
}

/* Переключатель вкладок */
.upload-tabs-container {
  padding: 0 24px 16px 24px;
}

.upload-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  position: relative;
}

.upload-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: #999;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: inherit;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.upload-tab:hover {
  color: #fff;
}

.upload-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.upload-modal-body {
  padding: 0 24px 24px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Кастомный скроллбар */
.upload-modal-body::-webkit-scrollbar {
  width: 8px;
}

.upload-modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.upload-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.upload-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.upload-tracks-list::-webkit-scrollbar {
  width: 6px;
}

.upload-tracks-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}

.upload-tracks-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.upload-tracks-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.upload-tab-content {
  display: none;
}

.upload-tab-content.active {
  display: block;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-cover-preview {
  width: 120px;
  height: 120px;
  background: #0a0a0a;
  border: 2px dashed #2a2a2a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.upload-cover-preview:hover {
  border-color: #3a3a3a;
  background: #0f0f0f;
}

.upload-cover-preview input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-cover-preview svg {
  width: 32px;
  height: 32px;
  color: #666;
}

.upload-cover-preview span {
  font-size: 12px;
  color: #999;
}

.upload-cover-preview.has-image {
  border-style: solid;
  border-color: #2a2a2a;
  background-size: cover;
  background-position: center;
}

.upload-cover-preview.has-image svg,
.upload-cover-preview.has-image span {
  display: none;
}

.upload-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.upload-form-group input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.upload-form-group input[type="text"]:focus {
  outline: none;
  border-color: #00CABA;
  background: #0f0f0f;
}

.upload-file-input {
  position: relative;
  width: 100%;
  height: 40px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-file-input:hover {
  border-color: #3a3a3a;
  background: #0f0f0f;
}

.upload-file-input input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-file-input span {
  font-size: 13px;
  color: #999;
}

.upload-artists-input {
  position: relative;
}

.upload-artists-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 0;
}

.upload-artist-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #2a2a2a;
  border-radius: 16px;
  font-size: 13px;
  color: #fff;
}

.upload-artist-tag button {
  background: none;
  border: none;
  padding: 0;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.upload-artist-tag button:hover {
  color: #fff;
}

.upload-artist-tag button svg {
  width: 14px;
  height: 14px;
}

.upload-artists-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}

.upload-artists-dropdown.show {
  display: block;
}

.upload-artist-option {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 13px;
  color: #fff;
}

.upload-artist-option-username {
  color: #fff;
  font-size: 13px;
}

.upload-artist-option-name {
  color: #888;
  font-size: 12px;
}

.upload-artist-option:hover {
  background: #2a2a2a;
}

.upload-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.upload-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.upload-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #00CABA;
}

.upload-checkbox span {
  font-size: 13px;
  color: #fff;
}

.upload-tracks-section {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
}

.upload-tracks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.upload-tracks-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.upload-add-track-btn {
  width: 32px;
  height: 32px;
  background: #2a2a2a;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-add-track-btn:hover {
  background: #3a3a3a;
  transform: scale(1.05);
}

.upload-add-track-btn svg {
  width: 18px;
  height: 18px;
  color: #fff;
  stroke: #fff;
  stroke-width: 2;
}

.upload-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.upload-track-item {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-track-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upload-track-number {
  font-size: 12px;
  font-weight: 600;
  color: #999;
}

.upload-track-remove {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease;
}

.upload-track-remove:hover {
  color: #ff4444;
}

.upload-track-remove svg {
  width: 16px;
  height: 16px;
}

.upload-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #2a2a2a;
}

.upload-btn-cancel,
.upload-btn-submit {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.upload-btn-cancel {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #999;
}

.upload-btn-cancel:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}

.upload-btn-submit {
  background: linear-gradient(135deg, #00CABA, #007370);
  color: #fff;
}

.upload-btn-submit:hover {
  background: linear-gradient(135deg, #00E5D0, #008C87);
  transform: translateY(-1px);
}

/* Поэтапная загрузка одного трека */
.upload-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 16px;
}

.upload-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.upload-step-indicator:focus-visible {
  outline: 2px solid #00CABA;
  outline-offset: 4px;
  border-radius: 6px;
}

.upload-step-indicator > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #3a3a3a;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.upload-step-indicator small {
  font-size: 13px;
}

.upload-step-indicator.active,
.upload-step-indicator.complete {
  color: #fff;
}

.upload-step-indicator.active > span,
.upload-step-indicator.complete > span {
  color: #000;
  background: #00CABA;
  border-color: #00CABA;
}

.upload-step-connector {
  flex: 1;
  height: 1px;
  background: #333;
}

.upload-wizard-body {
  min-height: 220px;
}

.upload-step-panel {
  display: none;
}

.upload-step-panel.active {
  display: block;
  animation: uploadStepIn .18s ease-out;
}

@keyframes uploadStepIn {
  from { opacity: .65; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.upload-step-heading {
  margin-bottom: 18px;
}

.upload-step-heading h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 17px;
}

.upload-step-heading p {
  margin: 0;
  color: #999;
  font-size: 13px;
  line-height: 1.45;
}

.upload-mode-panel[hidden] { display: none !important; }
#uploadModeChooser[hidden], #uploadStepper[hidden], #uploadWizardBody[hidden], #uploadWizardFooter[hidden] { display: none !important; }
.upload-mode-chooser { padding: 32px; }
.upload-mode-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.upload-mode-choice {
  min-height: 118px; display: flex; align-items: center; gap: 15px; padding: 20px;
  border: 1px solid #303030; border-radius: 14px; background: #111; color: #fff;
  font: inherit; text-align: left; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.upload-mode-choice:hover { transform: translateY(-2px); border-color: #00a99d; background: #141a19; }
.upload-mode-choice-icon { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(0,202,186,.11); color: #00caba; }
.upload-mode-choice-icon svg { width: 24px; height: 24px; }
.upload-mode-choice-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 5px; }
.upload-mode-choice-copy strong { color: #f5f5f5; font-size: 16px; }
.upload-mode-choice-copy small { color: #929292; font-size: 12px; line-height: 1.4; }
.upload-mode-choice-arrow { color: #00caba; font-size: 22px; transition: transform .18s ease; }
.upload-mode-choice:hover .upload-mode-choice-arrow { transform: translateX(3px); }
.upload-album-settings {
  display: grid;
  grid-template-columns: minmax(0, 380px);
  justify-content: center;
  gap: 22px;
  align-items: start;
}
.upload-album-settings .upload-album-cover-preview {
  grid-area: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
}
.upload-album-fields { display: grid; gap: 18px; width: 100%; }
.upload-album-fields .upload-form-group label { font-size: 14px; }
.upload-album-fields input[type="text"] { height: 48px; font-size: 16px; }
.upload-album-fields input[type="date"] {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #2a2a2a; border-radius: 8px;
  background: #0a0a0a; color: #fff; font: inherit; color-scheme: dark;
}
.upload-genre-select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #0a0a0a;
  color: #eee;
  font: inherit;
  color-scheme: dark;
}
.upload-genre-select:focus { outline: none; border-color: rgba(255, 255, 255, .78); }
.upload-genre-select option,
.upload-genre-select optgroup { background: #111; color: #eee; }
.upload-track-genre-group { grid-area: genre; }
.upload-optional, .upload-field-hint { color: #858585; font-size: 12px; font-weight: 400; }
.upload-album-track-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.upload-album-track-count { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #303030; border-radius: 999px; color: #aaa; font-size: 12px; }
.upload-review-track-list strong { white-space: pre-line; }
.upload-album-tracks { display: flex; flex-direction: column; gap: 10px; }
.upload-track-item {
  display: block; padding: 0; overflow: visible;
  border: 1px solid #303030; border-radius: 12px; background: #121212;
  transition: border-color .18s ease, background .18s ease;
}
.upload-track-item.needs-attention { border-color: #ff5263; }
.upload-track-item[draggable="true"] { cursor: grab; }
.upload-track-item.is-dragging { opacity: .48; border-color: #00caba; cursor: grabbing; }
.upload-track-item-header { min-height: 58px; padding: 10px 12px 10px 16px; gap: 12px; justify-content: flex-start; }
.upload-track-drag-handle { align-self: center; color: #666; font-size: 20px; line-height: 1; cursor: grab; }
.upload-track-heading-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; text-align: left; }
.upload-track-number { color: #00caba; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.upload-track-summary { overflow: hidden; color: #f5f5f5; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.upload-track-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; margin-left: auto; }
.upload-track-order, .upload-track-collapse, .upload-track-remove {
  height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px; border: 1px solid #303030; border-radius: 8px; background: #1a1a1a;
  color: #c5c5c5; font: inherit; font-size: 12px; cursor: pointer;
}
.upload-track-order { font-size: 17px; }
.upload-track-order:disabled { opacity: .35; cursor: default; }
.upload-track-collapse:hover, .upload-track-order:not(:disabled):hover { color: #fff; border-color: #555; }
.upload-track-collapse { width: 36px; min-width: 36px; padding: 0; }
.upload-track-collapse svg { width: 17px; height: 17px; fill: currentColor; transition: transform .16s ease; }
.upload-track-collapse[aria-expanded="true"] svg { transform: rotate(180deg); }
.upload-track-remove { padding: 0; color: #aaa; }
.upload-track-remove:hover { color: #ff5263; border-color: #74313a; }
.upload-track-remove svg { width: 16px; height: 16px; }
.upload-track-details {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .95fr);
  grid-template-areas: "audio title" "artists checks" "genre genre";
  align-items: start;
  gap: 14px 18px;
  padding: 0 16px 16px;
}
.upload-track-audio-field { grid-area: audio; min-width: 0; }
.upload-track-title-group { grid-area: title; min-width: 0; }
.upload-track-artists-group { grid-area: artists; min-width: 0; }
.upload-track-checkboxes { grid-area: checks; min-width: 0; padding-top: 0; }
.upload-track-item.is-collapsed .upload-track-details { display: none; }
.upload-track-file {
  position: relative; min-height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px dashed #3a3a3a; border-radius: 10px; background: #0c0c0c; cursor: pointer;
}
.upload-track-file:hover { border-color: #00a99d; background: #101515; }
.upload-track-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-track-file-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(0,202,186,.12); color: #00caba; font-size: 22px; }
.upload-track-file-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.upload-track-file-copy strong { color: #eee; font-size: 13px; }
.upload-track-file-copy small { overflow: hidden; color: #858585; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upload-track-file-action { color: #00caba; font-size: 12px; font-weight: 600; }
.upload-track-details .upload-form-group { gap: 6px; }
.upload-track-details .upload-form-group label { color: #c9c9c9; font-size: 12px; }
.upload-track-details .upload-form-group input[type="text"] { height: 38px; }
.upload-track-details .upload-artists-list { display: flex; flex-wrap: wrap; gap: 6px; }
.upload-add-track {
  width: 100%; min-height: 48px; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px dashed #3c5553; border-radius: 11px; background: rgba(0,202,186,.045); color: #00caba;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .18s ease, border-color .18s ease;
}
.upload-add-track:hover { border-color: #00caba; background: rgba(0,202,186,.1); }
.upload-add-track span { font-size: 23px; font-weight: 300; line-height: 1; }

@media (max-width: 640px) {
  .upload-mode-chooser { padding: 24px 18px; }
  .upload-mode-choices { grid-template-columns: 1fr; }
  .upload-mode-choice { min-height: 90px; padding: 16px; }
  .upload-album-settings { grid-template-columns: minmax(0, min(100%, 340px)); justify-items: center; gap: 16px; }
  .upload-album-settings .upload-album-cover-preview { width: 100%; height: auto; }
  .upload-album-fields { max-width: 520px; }
  .upload-track-item-header { align-items: flex-start; padding-left: 12px; }
  .upload-track-actions { gap: 3px; }
  .upload-track-order, .upload-track-collapse, .upload-track-remove { height: 30px; min-width: 30px; padding-left: 6px; padding-right: 6px; }
  .upload-track-collapse { width: 32px; min-width: 32px; padding: 0; }
  .upload-track-collapse { font-size: 11px; }
  .upload-track-details {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "audio" "title" "artists" "genre" "checks";
    gap: 12px;
    padding: 0 12px 12px;
  }
}

.upload-audio-drop {
  position: relative;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px dashed #3a3a3a;
  border-radius: 12px;
  color: #999;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.upload-audio-drop:hover,
.upload-audio-drop.dragging,
.upload-audio-drop.has-file {
  background: #101414;
  border-color: #00CABA;
}

.upload-audio-drop.has-file .upload-audio-hint,
.upload-audio-drop.has-file .upload-audio-formats {
  display: none;
}

.upload-audio-drop.has-file {
  justify-content: center;
  gap: 10px;
}

.upload-audio-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-drop-icon {
  color: #00CABA;
  font-size: 36px;
  line-height: 1;
}

.upload-audio-file-name {
  max-width: 100%;
  overflow: hidden;
  color: #eee;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-audio-hint,
.upload-audio-formats {
  font-size: 13px;
}

.upload-audio-formats {
  color: #666;
}

.upload-step-error {
  min-height: 0;
  margin: 8px 0 0;
  color: #ff7777;
  font-size: 13px;
}

.upload-review-card {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
  padding: 4px 16px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
}

.upload-review-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #252525;
  font-size: 13px;
}

.upload-review-row[hidden] {
  display: none !important;
}

.upload-review-row:last-child {
  border-bottom: 0;
}

.upload-review-row > span {
  color: #888;
}

.upload-review-row strong {
  overflow: hidden;
  color: #eee;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-rights-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.upload-rights-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: #00CABA;
}

.upload-btn-back,
.upload-btn-next {
  flex: 1;
  height: 44px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #242424;
  color: #eee;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}

.upload-btn-back:hover,
.upload-btn-next:hover:not(:disabled) {
  background: #303030;
  border-color: #4a4a4a;
}

.upload-btn-next {
  background: #00a99c;
  border-color: transparent;
  color: #fff;
}

.upload-btn-next:hover:not(:disabled) {
  background: #00bbae;
}

.upload-btn-back:disabled,
.upload-btn-next:disabled,
.upload-btn-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.upload-wizard-footer [hidden] {
  display: none !important;
}

.upload-progress-view {
  display: none;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  text-align: center;
}

.upload-modal-content.upload-is-loading > :not(.upload-progress-view) {
  display: none !important;
}

.upload-modal-content.upload-is-loading .upload-progress-view {
  display: flex;
}

.upload-modal-content.upload-is-loading {
  width: min(90%, 520px);
  min-height: 400px;
  max-height: 90vh;
}

.upload-progress-animation {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}

.upload-progress-animation span {
  width: 6px;
  height: 18px;
  background: #00CABA;
  border-radius: 5px;
  animation: uploadEqualizer .9s ease-in-out infinite;
}

.upload-progress-animation span:nth-child(2),
.upload-progress-animation span:nth-child(4) {
  animation-delay: .15s;
}

.upload-progress-animation span:nth-child(3) {
  animation-delay: .3s;
}

.upload-progress-animation span:nth-child(5) {
  animation-delay: .45s;
}

@keyframes uploadEqualizer {
  0%, 100% { height: 14px; opacity: .55; }
  50% { height: 48px; opacity: 1; }
}

.upload-progress-view h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
}

.upload-progress-status {
  min-height: 20px;
  margin: 0 0 24px;
  color: #999;
  font-size: 14px;
}

.upload-progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  background: #303030;
  border-radius: 10px;
}

.upload-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00CABA, #00BBFF);
  border-radius: inherit;
  transition: width .22s ease-out;
}

.upload-progress-percent {
  margin-top: 12px;
  color: #eee;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* Компактная компоновка загрузки на широких экранах */
@media (min-width: 969px) {
  .upload-modal-content {
    width: min(92%, 820px);
    max-height: min(90vh, 820px);
  }

  .upload-modal-header {
    padding: 18px 22px 12px;
  }

  .upload-stepper {
    padding: 10px 22px 14px;
  }

  .upload-modal-header h2 {
    font-size: 20px;
  }

  .upload-modal-close {
    margin: 0;
  }

  .upload-tabs-container {
    padding: 0 22px 12px;
  }

  .upload-tab {
    padding: 8px 16px;
  }

  .upload-modal-body {
    padding: 0 22px 16px;
  }

  .upload-wizard-body {
    min-height: 270px;
  }

  .upload-form {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-areas:
      "cover title"
      "cover artists"
      "audio audio"
      "tags tags"
      "checks checks";
    gap: 12px 16px;
    align-items: start;
  }

  .upload-track-metadata {
    grid-template-areas:
      "cover title"
      "cover artists"
      "tags tags"
      "checks checks";
  }

  .upload-cover-field {
    grid-area: cover;
    width: 132px;
    height: 132px;
  }

  .upload-title-field {
    grid-area: title;
  }

  .upload-artists-field {
    grid-area: artists;
  }

  .upload-audio-field,
  .upload-tracks-section {
    grid-area: audio;
  }

  .upload-tags-field {
    grid-area: tags;
  }

  .upload-checkboxes {
    grid-area: checks;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding-top: 0;
  }

  .upload-form-group {
    gap: 6px;
  }

  .upload-form-group input[type="text"] {
    height: 38px;
  }

  .upload-file-input {
    height: 58px;
    border-style: dashed;
  }

  .upload-audio-drop {
    min-height: 250px;
  }

  .upload-tracks-section {
    margin-top: 0;
    padding-top: 12px;
  }

  .upload-modal-footer {
    gap: 10px;
    padding: 12px 22px 16px;
  }

  .upload-btn-cancel,
  .upload-btn-submit {
    height: 42px;
  }
}

/* Mobile */
@media (max-width: 968px) {
  .upload-modal-content {
    max-width: 95%;
  }
  
  .upload-tabs {
    grid-template-columns: 1fr 1fr;
  }
}


/* ============================================================
   ACCOUNT TRACKS LIST
   ============================================================ */

.account-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 36px;
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 10px 14px 10px 12px;
  background: transparent;
  border-radius: 8px;
  transition: background 0.2s;
}

.track-item:hover {
  background: #1a1a1a;
}

.track-item .track-cover {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-cover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.track-item:hover .track-cover-play,
.track-item:focus-within .track-cover-play,
.track-cover-play:focus-visible {
  opacity: 1;
}

.track-cover-play:hover {
  background: rgba(0, 0, 0, 0.62);
}

.track-item .track-cover .track-cover-play-icon,
.track-item .track-cover .track-cover-pause-icon {
  width: 25px;
  height: 25px;
  color: #fff;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.track-cover-pause-icon,
.track-cover-play.is-playing .track-cover-play-icon {
  display: none;
}

.track-cover-play.is-playing .track-cover-pause-icon {
  display: block;
}

@media (hover: none) {
  .track-item:hover .track-cover-play,
  .track-item:focus-within .track-cover-play,
  .search-track-item:hover .search-track-play,
  .search-track-item:focus-within .search-track-play {
    opacity: 0;
    pointer-events: none;
  }

  .track-item .track-cover-play:focus-visible,
  .search-track-item .search-track-play:focus-visible {
    opacity: 1;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.32);
  }

  .track-item .track-cover-play.is-current,
  .search-track-item .search-track-play.is-current {
    opacity: 0.88;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.32);
  }
}

.track-item .track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-item .track-cover svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.3);
}

.track-item .track-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.track-item .track-name {
  font-size: 15px;
  font-family: 'Akt Thin', sans-serif;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.track-title-line .track-name {
  flex: 0 1 auto;
  min-width: 0;
}

.track-item .track-artist {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-tags-mini {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.tag-mini {
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(0, 202, 186, 0.15);
  color: #00CABA;
  border-radius: 3px;
  white-space: nowrap;
}

.track-badges {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
}

.track-duration {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.track-metadata {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 76px;
  white-space: nowrap;
}

@media (min-width: 769px) {
  #account .track-metadata,
  .public-profile .track-metadata {
    gap: 152px;
    margin-right: 46px;
  }
}

.track-play-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.track-play-count svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-badge {
  min-width: 19px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.track-badge-ai {
  border: 1px solid rgba(77, 222, 203, 0.22);
  background: rgba(77, 222, 203, 0.08);
  color: #82e7d8;
}

.track-badge-explicit {
  min-width: 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  border-radius: 4px;
  font-weight: 700;
}

.track-actions {
  display: flex;
  gap: 8px;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #191919;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.track-actions-menu {
  position: relative;
  justify-self: end;
}

.track-actions-trigger {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  opacity: 0;
  cursor: pointer;
  list-style: none;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.track-item:hover .track-actions-trigger,
.track-item:focus-within .track-actions-trigger,
.track-actions-trigger:focus-visible,
.track-actions-menu[open] .track-actions-trigger {
  opacity: 1;
}

.track-actions-trigger:hover,
.track-actions-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

.track-context-menu {
  min-width: 190px;
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  body:has(.playlist-context-menu.mobile-bottom-sheet.show)::before {
    content: "";
    position: fixed;
    z-index: 2147482999;
    inset: 0;
    background: rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 1;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .playlist-context-menu {
    z-index: 2147483000;
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: 100vw;
    max-width: none;
    max-height: min(82dvh, 680px);
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    border: 1px solid #303030;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: #1a1a1a;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(100%);
    transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
    pointer-events: none;
  }

  .playlist-context-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .playlist-context-menu .playlist-menu-item {
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 12px;
    gap: 14px;
    font-size: 16px;
  }

  .mobile-context-menu-handle {
    width: 44px;
    height: 5px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: #666;
    touch-action: none;
    cursor: grab;
    user-select: none;
  }
}

.track-actions-trigger::-webkit-details-marker {
  display: none;
}

.track-actions-trigger:hover,
.track-actions-menu[open] .track-actions-trigger {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.track-actions-trigger svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.track-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255, 255, 255, 0.6);
}

.track-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.track-play-btn:hover {
  background: linear-gradient(135deg, #00CABA 0%, #007370 100%);
  color: #fff;
}

.track-delete-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #ef4444;
}

.track-action-btn svg {
  width: 16px;
  height: 16px;
}

.library-loading,
.library-empty,
.library-error {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
}

.library-error {
  color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .track-item:hover {
    background: transparent;
  }

  .track-actions-trigger {
    opacity: 1;
  }

  .track-item {
    grid-template-columns: 56px minmax(0, 1fr) auto 36px;
    column-gap: 8px;
    row-gap: 4px;
  }
  
  .track-item .track-cover {
    width: 56px;
    height: 56px;
  }
  
  .track-duration {
    font-size: 12px;
  }

  .track-metadata {
    grid-column: 3;
    grid-row: 1;
    gap: 14px;
  }

  .track-play-count { gap: 3px; font-size: 11px; }
  .track-play-count svg { width: 13px; height: 13px; }

  .track-actions-trigger {
    grid-column: 4;
    grid-row: 1;
  }
}


/* ============================================================
   ACCOUNT AVATAR & BANNER - UPLOAD STATES
   ============================================================ */

.account-avatar {
  transition: opacity 0.3s ease;
}

.account-avatar:has(> div) {
  background: rgba(255, 255, 255, 0.05);
}

.account-edit-banner-btn:active {
  transform: none;
}

/* Loading animation for avatar/banner upload */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.account-avatar.loading,
.account-banner.loading {
  animation: pulse 1.5s ease-in-out infinite;
}


/* ============================================================
   UPLOAD SPINNER
   ============================================================ */

.upload-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.upload-spinner svg {
  width: 100%;
  height: 100%;
  color: rgba(0, 202, 186, 1);
}

.banner-upload-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
}

.banner-upload-spinner svg {
  width: 64px;
  height: 64px;
  color: rgba(0, 202, 186, 1);
}


/* ============================================================
   SEARCH PAGE
   ============================================================ */

.search-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Search filters container - centered at top */
.search-filters-container {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
  padding-top: 0;
}

/* Search filters */
.search-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-filter-carousel {
  display: flex;
  gap: 12px;
}

.search-filter-btn {
  padding: 10px 24px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 24px;
  color: #999;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-filter-btn:hover {
  background: #2a2a2a;
  color: #fff;
  border-color: #3a3a3a;
}

.search-filter-btn.active {
  background: linear-gradient(135deg, #00CABA, #007370);
  border-color: #00CABA;
  color: #fff;
}

/* Search results container */
.search-results-container {
  min-height: 400px;
}

/* Empty state */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.search-empty-icon {
  width: 80px;
  height: 80px;
  color: #2a2a2a;
  margin-bottom: 24px;
}

.search-empty-state h3 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.search-empty-state p {
  font-size: 16px;
  color: #666;
  max-width: 400px;
}

.search-history-state {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 0;
}

.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-history-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.search-history-header > button {
  border: 0;
  padding: 6px 0;
  color: #929aa2;
  background: none;
  font: inherit;
  cursor: pointer;
}

.search-history-header > button:hover {
  color: #fff;
}

.search-history-row {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.search-history-query,
.search-history-remove {
  display: flex;
  align-items: center;
  border: 0;
  color: #b4bac0;
  background: transparent;
  cursor: pointer;
}

.search-history-query {
  flex: 1;
  gap: 14px;
  min-width: 0;
  padding: 10px 8px;
  text-align: left;
  font: inherit;
}

.search-history-query:hover {
  color: #fff;
}

.search-history-query span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-history-query svg,
.search-history-remove svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-history-remove {
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.search-history-remove:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

/* Keep the recent-search block aligned with result sections below filters. */
.search-page .search-filters-container {
  margin-bottom: 0;
}

.search-history-state {
  padding-top: 0;
}

.search-history-header h3 {
  font-family: 'Style Font', 'Akt Thin', sans-serif;
}

/* Loading state */
.search-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.search-spinner {
  width: 64px;
  height: 64px;
  color: #00CABA;
}

/* Search results */
.search-results {
  animation: fadeIn 0.3s ease;
}

.search-section {
  margin-bottom: 56px;
}

.search-section-title {
  font-size: 28px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
}

/* Tracks list */
.search-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-track-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-track-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-track-cover {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-track-cover svg {
  width: 28px;
  height: 28px;
  color: #3a3a3a;
}

.search-track-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.search-track-name {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-track-artist {
  font-size: 14px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-track-duration {
  font-size: 14px;
  color: #666;
  font-variant-numeric: tabular-nums;
}

/* Albums grid */
.search-albums-grid,
.search-artists-grid,
.search-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.search-album-card,
.search-artist-card,
.search-playlist-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-album-card:hover,
.search-artist-card:hover,
.search-playlist-card:hover {
  transform: translateY(-4px);
}

.search-album-cover,
.search-artist-cover,
.search-playlist-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  margin-bottom: 12px;
  position: relative;
}

.search-artist-cover {
  border-radius: 50%;
}

.search-album-cover img,
.search-artist-cover img,
.search-playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}



.search-album-name,
.search-artist-name,
.search-playlist-name {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.search-album-artist,
.search-artist-followers,
.search-playlist-creator {
  font-size: 14px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Users list */
.search-users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-user-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-user-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00CABA, #007370);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.search-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.search-user-name {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-user-username {
  font-size: 14px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-user-username::before {
  content: '@';
  color: #666;
}

/* No results */
.search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.search-no-results-icon {
  width: 80px;
  height: 80px;
  color: #2a2a2a;
  margin-bottom: 24px;
}

.search-no-results h3 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.search-no-results p {
  font-size: 16px;
  color: #666;
  max-width: 400px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .search-page {
    padding: 0 20px;
  }
  
  .search-filters-container {
    margin-bottom: 32px;
    padding-top: 10px;
  }
  
  .search-filters {
    gap: 8px;
  }
  
  .search-filter-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .search-section-title {
    font-size: 22px;
    margin-bottom: 16px;
  }
  
  .search-track-item {
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
  }
  
  .search-track-cover {
    width: 48px;
    height: 48px;
  }
  
  .search-albums-grid,
  .search-artists-grid,
  .search-playlists-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
}

/* ===================================
   CREATE PLAYLIST MODAL
   =================================== */

.create-playlist-content {
  max-width: 500px;
}

.edit-modal-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Обложка плейлиста по центру */
.playlist-cover-upload {
  display: flex;
  justify-content: center;
  align-self: center;
  margin-bottom: 24px;
  width: 100%;
}

.playlist-cover-preview {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  background: #0a0a0a;
  border: 2px dashed #2a2a2a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.playlist-cover-preview:hover {
  border-color: #3a3a3a;
  background: #0f0f0f;
}

.playlist-cover-preview svg {
  width: 40px;
  height: 40px;
  color: #666;
  transition: color 0.2s ease;
}

.playlist-cover-preview:hover svg {
  color: #999;
}

.playlist-cover-preview span {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  transition: color 0.2s ease;
}

.playlist-cover-preview:hover span {
  color: #999;
}

.playlist-cover-preview img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
}

.playlist-cover-preview.has-image {
  border-style: solid;
  border-color: #2a2a2a;
}

.playlist-cover-preview.has-image:hover {
  border-color: #00CABA;
}

/* Form groups */
.playlist-form-group {
  margin-bottom: 20px;
}

.playlist-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

/* Checkbox */
.playlist-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.playlist-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #00CABA;
  cursor: pointer;
}

.playlist-checkbox span {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}

.playlist-checkbox-hint {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  margin-left: 32px;
  line-height: 1.4;
}

/* ===================================
   SEARCH PAGE
   =================================== */

.search-page {
  width: 58%;
  max-width: 1120px;
  min-width: 680px;
  margin: 0 auto; /* Центрируем */
  min-height: calc(100vh - 56px);
  padding: 0;
}

/* Search Filters */
.search-filters-container {
  padding: 0 0 16px;
  display: flex;
  justify-content: center;
}

.search-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-filter-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-filter-btn:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}

.search-filter-btn.active {
  background: #fff;
  border-color: #fff;
  color: #000;
}

/* Search Results Container */
.search-results-container {
  width: 100%;
  padding: 0;
}

/* Empty State */
.search-empty-state {
  display: none; /* По умолчанию скрыто */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.search-empty-icon {
  width: 64px;
  height: 64px;
  color: #666;
  margin-bottom: 24px;
}

.search-empty-state h3 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.search-empty-state p {
  font-size: 16px;
  color: #999;
}

/* Loading State */
.search-loading-state {
  display: none; /* По умолчанию скрыто */
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.search-spinner {
  width: 48px;
  height: 48px;
  color: #00CABA;
}

.search-spinner svg {
  width: 100%;
  height: 100%;
}

/* No Results */
.search-no-results {
  display: none; /* По умолчанию скрыто */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.search-no-results-icon {
  width: 64px;
  height: 64px;
  color: #666;
  margin-bottom: 24px;
}

.search-no-results h3 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.search-no-results p {
  font-size: 16px;
  color: #999;
}

/* Search Results */
.search-results {
  width: 100%;
  position: static;
  max-height: none;
  overflow: visible;
}

.search-section {
  margin-bottom: 28px;
}

.search-section-title {
  font-size: 20px; /* Было 24px, уменьшаем */
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  padding-left: 0; /* Убираем левый отступ */
}

/* Search Tracks List */
.search-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0; /* Убираем отступы */
}

/* Search Albums/Artists/Playlists Grid */
.search-albums-grid,
.search-artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 0;
}

.search-playlists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Фиксированно 3 в ряд */
  gap: 16px;
  padding: 0;
}

/* Search Users List */
.search-users-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0; /* Убираем отступы */
}

.search-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-user-item:hover {
  background: #1a1a1a;
}

.search-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00CABA, #007370);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px; /* Было 18px */
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.search-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.search-user-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-user-username {
  font-size: 14px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-user-username::before {
  content: '@';
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .search-page {
    width: 100%;
    min-width: 0;
    padding: 0 4px; /* Уменьшаем отступы в 5 раз */
  }

  .search-section-title {
    padding-left: 4px;
  }

  /* Фильтр «Всё» остаётся на месте, остальные фильтры прокручиваются отдельно. */
  .search-filters-container {
    padding: 10px 0 16px 0;
    margin: 0 -4px 0 -4px; /* Компенсируем padding родителя .search-page */
    overflow: visible;
  }

  .search-filters {
    display: flex;
    width: 100%;
    min-width: 0;
    padding: 0 4px 0 8px;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .search-filter-carousel {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .search-filter-carousel::-webkit-scrollbar {
    display: none;
  }

  .search-filter-btn[data-filter="all"] {
    flex: 0 0 auto;
  }

  .search-filter-carousel .search-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .search-tracks-list,
  .search-albums-grid,
  .search-artists-grid,
  .search-playlists-grid,
  .search-users-list {
    padding: 0 4px;
  }

  /* Плейлисты списком как в библиотеке */
  .search-playlists-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Карточки плейлистов - горизонтальные прямоугольники */
  .search-playlists-grid .search-playlist-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    padding: 12px;
    gap: 12px;
    background: #0f0f0f;
    border-radius: 8px;
  }

  .search-playlists-grid .library-playlist-card:hover {
    transform: none;
  }

  .search-playlists-grid .search-playlist-cover,
  .search-playlists-grid .library-playlist-cover {
    width: 64px !important;
    height: 64px !important;
    aspect-ratio: unset !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }

  .search-playlists-grid .library-playlist-info {
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .search-playlists-grid .library-playlist-name {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .search-playlists-grid .search-playlist-creator {
    font-size: 12px;
    color: #666;
  }

  /* Кнопка меню справа */
  .search-playlists-grid .library-playlist-menu-btn {
    position: static !important;
    width: 36px;
    height: 36px;
    opacity: 1 !important;
    flex-shrink: 0;
  }

  /* Убираем кнопку play на мобильных */
  .search-playlists-grid .library-playlist-play-btn {
    display: none !important;
  }

  /* Album results use the same compact mobile row layout as playlists. */
  .search-albums-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .search-albums-grid .search-album-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 12px;
    background: #0f0f0f;
    border-radius: 8px;
  }

  .search-albums-grid .search-album-card:hover { transform: none; }

  .search-albums-grid .search-album-cover {
    width: 64px !important;
    height: 64px !important;
    aspect-ratio: unset !important;
    margin: 0 !important;
    flex: 0 0 64px;
  }

  .search-albums-grid .search-album-play-btn { display: none !important; }

  .search-album-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .search-albums-grid .search-album-name { margin: 0; font-size: 14px; }
  .search-albums-grid .search-album-artist { font-size: 12px; }

  .search-albums-grid .search-album-menu-btn,
  .account-playlists-grid .account-album-card .album-card-menu-btn {
    position: static !important;
    width: 36px;
    height: 36px;
    opacity: 1 !important;
    flex: 0 0 36px;
    transform: none !important;
  }

  /* Profile albums also become full-width rows instead of narrow cover tiles. */
  .account-playlists-grid .account-album-card {
    display: flex;
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
  }

  .account-playlists-grid .account-album-card .library-playlist-cover {
    width: 64px;
    height: 64px;
    aspect-ratio: unset;
    margin: 0;
    flex: 0 0 64px;
  }

  .account-playlists-grid .account-album-card .library-playlist-info {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
    text-align: left;
  }

  .account-playlists-grid .account-album-card .library-playlist-name { margin-bottom: 2px; }
  .account-playlists-grid .account-album-card .library-playlist-meta { font-size: 12px; }
  
  .search-albums-grid,
  .search-artists-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
}

/* Search Track Item */
.search-track-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-track-item:hover {
  background: #1a1a1a;
}

.search-track-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #0a0a0a;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-track-cover svg {
  width: 24px;
  height: 24px;
  color: #666;
}

.search-track-info {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-track-name {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-track-artist {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-track-duration {
  font-size: 13px;
  color: #666;
  flex-shrink: 0;
}

/* Search Album/Playlist Cards */
.search-album-card,
.search-playlist-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
  padding: 12px;
  background: #0f0f0f;
  position: relative;
}

.search-album-card:hover,
.search-playlist-card:hover {
  transform: translateY(-2px); /* Только приподнимаем */
}

.search-album-cover,
.search-playlist-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.search-album-cover img,
.search-playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-album-name,
.search-playlist-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-album-artist,
.search-playlist-creator {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search Artist Card */
.search-artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-artist-card:hover {
  opacity: 0.8;
}

.search-artist-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #00CABA, #007370);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: #fff;
}

.search-artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-artist-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.search-artist-followers {
  font-size: 13px;
  color: #999;
  text-align: center;
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .search-artist-avatar {
    width: 140px;
    height: 140px;
    font-size: 36px;
  }
}

/* Consistent section heading sizes across pages */
.section-title,
.library-section-title,
.account-section-title,
.search-section-title {
  font-size: 24px;
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .section-title,
  .library-section-title,
  .account-section-title,
  .search-section-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  body.player-expanded-open {
    overflow: hidden;
  }

  .player {
    touch-action: none;
  }

  /* The expanded player is position:fixed but nested inside the mini-player.
     A transform on that parent makes fixed descendants relative to the tiny
     mini-player instead of the viewport. Remove it while the overlay is open. */
  body.player-expanded-open .player {
    transform: none !important;
  }

  .main {
    margin-bottom: 130px;
  }

  .player {
    display: flex;
    left: 10px;
    bottom: 78px;
    transform: none;
    width: calc(100% - 20px);
    max-width: none;
    height: 66px;
    padding: 0 12px;
    gap: 4px;
    border: 1px solid #414141;
    border-radius: 999px;
    background: linear-gradient(180deg, #1b1b1b 0%, #121212 100%);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .42);
    z-index: 300;
  }

  .player .mini-progress {
    position: absolute;
    right: 22px;
    bottom: 0;
    left: 22px;
    display: block;
    height: 2px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, .16);
    pointer-events: none;
  }

  .player .mini-progress-fill {
    position: relative;
    z-index: 1;
    width: 0;
    height: 100%;
    background: #fff;
    transition: width .2s linear;
  }

  .player .mini-progress-buffered-fill {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, .42);
    transition: width .25s ease;
  }

  .player .player-controls {
    display: contents;
  }

  .player .playback-mode,
  .player .control-prev,
  .player .control-next,
  .player .progress-container,
  .player .volume-control {
    display: none;
  }

  .player .like-btn {
    order: 2;
    display: flex;
    width: 34px;
    height: 40px;
    flex: 0 0 34px;
    margin: 0;
    color: #aaa;
    border-radius: 50%;
    background: transparent;
    transform: translateX(-5px);
  }

  .player .like-btn:hover,
  .player .like-btn:active {
    background: transparent;
  }

  .player .like-btn img {
    width: 20px;
    height: 20px;
  }

  .player .control-play {
    order: 3;
    width: 34px;
    height: 40px;
    flex: 0 0 34px;
    margin: 0;
  }

  .player .control-play {
    background: transparent;
    color: #fff;
  }

  .player .control-play .transport-state-icon {
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1);
  }

  .player .more-btn {
    order: 4;
    width: 34px;
    height: 40px;
    flex: 0 0 34px;
    margin: 0;
    color: #999;
  }

  .player .track-info {
    order: 1;
    width: auto;
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    transform: translateX(5px);
  }

  .player .track-cover {
    width: 40px;
    height: 40px;
    border-radius: 5px;
  }

  .player .track-details {
    width: auto;
    min-width: 0;
    flex: 1;
    gap: 2px;
  }

  .player .track-name {
    font-size: 13px;
  }

  .player .track-artist {
    font-size: 11px;
  }

  .player .more-menu {
    right: 10px;
    bottom: calc(100% + 4px);
    margin-bottom: 0;
  }

  .mobile-player-expanded {
    isolation: isolate;
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    scrollbar-width: none;
    padding: max(12px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    color: #fff;
    background: linear-gradient(180deg, #101113 0%, #090a0c 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 360ms cubic-bezier(.2, .75, .25, 1), opacity 220ms ease-out, visibility 360ms;
    will-change: transform;
  }

  .mobile-player-expanded::-webkit-scrollbar {
    display: none;
  }

  .expanded-player-ambient {
    position: absolute;
    z-index: 0;
    top: 46%;
    left: 50%;
    width: min(134vw, 670px);
    height: min(122vh, 1030px);
    border-radius: 50%;
    opacity: 0;
    filter: blur(38px);
    transform: translate(-50%, -50%);
    mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .72) 34%, transparent 70%);
    pointer-events: none;
    transition: opacity 650ms ease;
  }

  .expanded-player-ambient.has-color {
    opacity: .44;
  }

  .expanded-player-ambient-layer {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transform: scale(.94) rotate(-3deg);
    background:
      radial-gradient(ellipse at 30% 34%, var(--ambient-color-a, #162126) 0%, transparent 58%),
      radial-gradient(ellipse at 72% 66%, var(--ambient-color-b, #162126) 0%, transparent 62%);
    opacity: 0;
    transition: opacity 900ms ease;
  }

  .expanded-player-ambient-layer.is-active {
    opacity: 1;
    animation: expanded-ambient-shape 18s ease-in-out infinite alternate;
  }

  @keyframes expanded-ambient-shape {
    from { transform: scale(.94) rotate(-3deg); }
    to { transform: scale(1.06) rotate(3deg); }
  }

  .mobile-player-expanded > :not(.expanded-player-ambient) {
    position: relative;
    z-index: 1;
  }

  .expanded-player-cover-stage {
    position: relative;
    flex: 0 0 auto;
    --expanded-player-cover-size: min(86.1vw, 46.2vh, 462px);
    --expanded-player-slide-size: min(74.046vw, 39.732vh, 397.32px);
    width: 100vw;
    height: var(--expanded-player-cover-size);
    margin: clamp(18px, 5vh, 48px) 0 clamp(28px, 7vh, 64px);
    overflow: hidden;
    transform: translateY(10px);
    background: transparent;
    touch-action: pan-y;
  }

  .mobile-player-expanded.is-swiping-track {
    user-select: none;
    -webkit-user-select: none;
  }

  .expanded-player-cover {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: block;
    width: var(--expanded-player-cover-size);
    height: var(--expanded-player-cover-size);
    margin: 0 auto;
    object-fit: cover;
    border-radius: 12px;
    background: #151515;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
  }

  .expanded-player-cover {
    z-index: 1;
    transition: none;
  }

  /* One Swiper track moves the center and neighboring artwork as a single unit. */
  .expanded-player-cover-stage.swiper {
    display: block;
    overflow: hidden;
    touch-action: pan-y;
  }

  .expanded-player-cover-stage.swiper .swiper-wrapper {
    align-items: center;
  }

  .expanded-player-cover-stage.swiper .swiper-slide {
    position: relative;
    flex: 0 0 var(--expanded-player-slide-size);
    width: var(--expanded-player-slide-size);
    height: var(--expanded-player-slide-size);
    opacity: .78;
    transition: opacity 180ms cubic-bezier(.2, .75, .25, 1);
  }

  .expanded-player-cover-stage.swiper .swiper-slide:first-child,
  .expanded-player-cover-stage.swiper .swiper-slide:last-child {
    opacity: 0;
  }

  .expanded-player-cover-stage.swiper .swiper-slide-active {
    opacity: 1;
  }

  .expanded-player-cover-stage.swiper.is-swiping .swiper-slide {
    transition: none;
  }

  .expanded-player-cover-stage.swiper .swiper-slide .expanded-player-cover {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    transform: scale(.976744);
    box-shadow: none;
    /* The scale follows Swiper progress frame by frame. A CSS transform
       transition here creates a second animation during slide rebasing. */
    transition: none;
  }

  .mobile-player-expanded.playing .expanded-player-cover-stage.swiper .swiper-slide {
    opacity: 0;
    transition: none !important;
  }

  .mobile-player-expanded.playing .expanded-player-cover-stage.swiper .swiper-slide-active {
    opacity: 1;
  }

  .mobile-player-expanded.playing .expanded-player-cover-stage.swiper .swiper-slide-active .expanded-player-cover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
  }

  .mobile-player-expanded:not(.playing) .expanded-player-cover-stage.swiper.is-playing-transition .swiper-slide-active .expanded-player-cover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
  }

  .mobile-player-expanded .expanded-player-cover-stage.swiper.is-playing-transition:not(.is-swiping) .swiper-slide:not(.swiper-slide-active) {
    opacity: 0 !important;
    transition: none !important;
  }

  .mobile-player-expanded.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .expanded-player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 460px;
    min-height: 44px;
  }

  .expanded-player-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
  }

  .expanded-player-close svg {
    width: 26px;
    height: 26px;
  }

  .expanded-player-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
  }

  .expanded-player-more svg {
    width: 26px;
    height: 26px;
  }

  .expanded-player-track-info {
    width: min(92%, 420px);
    transform: translateY(clamp(24px, calc(2.5vh + 10px), 34px));
  }

  .expanded-player-progress {
    width: min(92%, 420px);
    transform: translateY(clamp(24px, calc(2.5vh + 10px), 34px));
  }

  .expanded-player-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
  }

  .expanded-player-copy {
    flex: 1;
    min-width: 0;
  }

  .expanded-player-controls .expanded-player-like {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 50%;
    opacity: .35;
  }

  .expanded-player-controls .expanded-player-like img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }

  .expanded-player-like .expanded-like-icon { filter: brightness(0) invert(1); }
  .expanded-player-like .expanded-like-icon-filled { display: none; filter: brightness(0) saturate(100%) invert(35%) sepia(98%) saturate(3240%) hue-rotate(333deg) brightness(102%) contrast(101%); }

  .expanded-player-like.liked {
    color: #ff4444;
    opacity: 1;
  }

  .expanded-player-like.liked .expanded-like-icon { display: none; }
  .expanded-player-like.liked .expanded-like-icon-filled { display: block; }

  .expanded-player-like.liked path {
    fill: currentColor;
  }

  .expanded-player-track-name {
    overflow: hidden;
    margin-bottom: 5px;
    font-size: 22px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .expanded-player-track-artist {
    overflow: hidden;
    color: #aaa;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .expanded-player-progress-bar {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    touch-action: none;
  }

  .expanded-player-progress-bar::before {
    position: absolute;
    right: 0;
    left: 0;
    height: 4px;
    content: "";
    background: #555;
    border-radius: 4px;
  }

  .expanded-player-progress-fill {
    position: absolute;
    left: 0;
    height: 4px;
    width: 0;
    background: #fff;
    border-radius: 4px;
    pointer-events: none;
  }

  .expanded-player-buffered-fill {
    position: absolute;
    left: 0;
    height: 4px;
    width: 0;
    background: #929292;
    border-radius: 4px;
    pointer-events: none;
    transition: width .25s ease;
  }

  .expanded-player-progress-handle {
    position: absolute;
    left: 0;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .expanded-player-progress-bar.is-seeking .expanded-player-progress-fill,
  .expanded-player-progress-bar.is-seeking .expanded-player-progress-handle {
    transition: none;
  }

  .expanded-player-progress-bar.is-seeking::before {
    height: 6px;
  }

  .expanded-player-progress-bar.is-seeking .expanded-player-progress-fill {
    height: 6px;
  }

  .expanded-player-progress-bar.is-seeking .expanded-player-progress-handle {
    transform: translateX(-50%) scale(1.25);
  }

  .expanded-player-times {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 12px;
  }

  .expanded-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 340px);
    gap: 0;
    margin-top: auto;
    margin-bottom: auto;
  }

  .expanded-player-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
  }

  .expanded-player-skip {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .expanded-player-skip .transport-skip-icon {
    width: 26px;
    height: 26px;
    filter: brightness(0) invert(1);
  }

  .expanded-player-play {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    color: #fff !important;
    background: transparent !important;
    border-radius: 50% !important;
    opacity: 1;
  }

  .expanded-player-play .transport-state-icon {
    position: absolute;
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }

  .expanded-player-mode {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: #aaa !important;
    background: transparent !important;
    opacity: 1;
  }

  .expanded-player-mode .expanded-mode-icon {
    position: absolute;
    width: 23px;
    height: 23px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .expanded-player-mode[data-mode="normal"] .expanded-mode-normal,
  .expanded-player-mode[data-mode="shuffle"] .expanded-mode-shuffle,
  .expanded-player-mode[data-mode="repeat"] .expanded-mode-repeat {
    opacity: 1;
  }

  .expanded-player-mode[data-mode="shuffle"],
  .expanded-player-mode[data-mode="repeat"] {
    color: #fff !important;
  }

  .expanded-player-mode[data-mode="shuffle"] .expanded-mode-shuffle,
  .expanded-player-mode[data-mode="repeat"] .expanded-mode-repeat {
    filter: brightness(0) invert(1);
  }

  .expanded-pause-icon,
  .mobile-player-expanded.playing .expanded-play-icon {
    display: none;
  }

  .mobile-player-expanded.playing .expanded-pause-icon {
    display: block;
  }

  body.player-expanded-open .more-menu.active {
    position: fixed;
    top: 64px;
    right: 24px;
    bottom: auto;
    z-index: 400;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .equalizer-bands {
    gap: 8px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .eq-slider-custom {
    width: 24px;
    touch-action: none;
  }

  .eq-track-bg,
  .eq-track-fill {
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .expanded-player-ambient {
    transition-duration: 1ms;
  }
  .expanded-player-ambient-layer {
    transition-duration: 1ms;
    animation: none !important;
    transform: none;
  }
}

@media (max-width: 768px) and (max-height: 760px) {
  .mobile-player-expanded {
    padding: max(8px, env(safe-area-inset-top)) 20px max(12px, env(safe-area-inset-bottom));
  }

  .expanded-player-topbar {
    min-height: 40px;
  }

  .expanded-player-cover-stage {
    --expanded-player-cover-size: min(79.8vw, 39.9vh, 399px);
    --expanded-player-slide-size: min(68.628vw, 34.314vh, 342.3px);
    width: 100vw;
    height: var(--expanded-player-cover-size);
    margin: 2vh 0 3vh;
  }

  .expanded-player-track-info {
    margin-bottom: 20px;
  }

  .expanded-player-track-name {
    font-size: 20px;
  }

  .expanded-player-controls {
    margin-top: auto;
    margin-bottom: auto;
  }

  .expanded-player-play {
    width: 72px;
    height: 72px;
  }

  .expanded-player-play .transport-state-icon {
    width: 42px;
    height: 42px;
  }
}

@media (min-width: 769px) {
  .mobile-player-expanded {
    display: none;
  }
}

/* Search result track controls */
.search-track-cover {
  position: relative;
}

.search-track-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .52);
  color: #fff;
  opacity: 0;
  cursor: pointer;
  transition: opacity .18s ease, background .18s ease;
}

.search-track-item:hover .search-track-play,
.search-track-item:focus-within .search-track-play,
.search-track-play:focus-visible {
  opacity: 1;
}

.search-track-play:hover {
  background: rgba(0, 0, 0, .66);
}

.search-track-cover .search-track-play-icon,
.search-track-cover .search-track-pause-icon {
  width: 24px;
  height: 24px;
  color: #fff;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.search-track-pause-icon,
.search-track-play.is-playing .search-track-play-icon {
  display: none;
}

.search-track-play.is-playing .search-track-pause-icon {
  display: block;
}

.search-track-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  opacity: 0;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.search-track-menu-trigger svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.search-track-item:hover .search-track-menu-trigger,
.search-track-item:focus-within .search-track-menu-trigger,
.search-track-menu-trigger:focus-visible {
  opacity: 1;
}

.search-track-menu-trigger:hover,
.search-track-menu-trigger:focus-visible {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  outline: none;
}

@media (hover: none) {
  .search-track-play {
    opacity: 0;
    pointer-events: none;
  }

  .search-track-menu-trigger {
    opacity: 1;
  }
}

/* FLOW Premium */
.premium-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  margin-left: auto;
  padding: 0 2px;
  color: transparent;
  background: linear-gradient(100deg, #63efd2 0%, #56cce8 54%, #a193ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: 'Akt Bold', sans-serif;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: .025em;
  transition: filter .2s ease, opacity .2s ease;
}

.premium-nav-button {
  width: 34px;
  min-height: 36px;
  padding: 0;
  font-size: 0;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.premium-nav-icon {
  display: block;
  width: 21px;
  height: 21px;
  background: rgba(255, 255, 255, .65);
  -webkit-mask: url('/img/icons/diamond.svg') center / contain no-repeat;
  mask: url('/img/icons/diamond.svg') center / contain no-repeat;
}

.premium-nav-button.is-premium-active .premium-nav-icon {
  background: linear-gradient(100deg, #63efd2 0%, #56cce8 54%, #a193ff 100%);
}

.premium-nav-button:hover { filter: brightness(1.22) saturate(1.12); }
.header .notification-btn { margin-left: 0; }
.premium-nav-button:focus-visible, .premium-cta:focus-visible, .premium-buy-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.premium-page {
  position:relative;
  isolation:isolate;
  width: min(1480px, calc(100% - 72px));
  margin: 0 auto;
  padding: 42px 0 100px;
  color: #f7f8fa;
}
.premium-page::before { content:none; }

.premium-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 680px;
  overflow: visible;
  padding: clamp(36px, 6vw, 84px) clamp(28px, 5vw, 72px);
  background: transparent;
}

.premium-hero::before,
.premium-hero::after { content:""; position:absolute; pointer-events:none; }
.premium-hero::before { width:39%; aspect-ratio:1; right:5%; top:50%; border-radius:38% 62% 59% 41% / 42% 40% 60% 58%; background:linear-gradient(145deg,rgba(72,236,211,.22),rgba(63,120,193,.1) 52%,rgba(153,116,255,.19)); filter:blur(1px); transform:translateY(-50%) rotate(-19deg); box-shadow:0 0 130px rgba(62,211,206,.14),inset 0 0 65px rgba(255,255,255,.035); }
.premium-hero::after { width:33%; aspect-ratio:1; right:8%; top:50%; border:1px solid rgba(127,225,218,.2); border-radius:42% 58% 53% 47% / 38% 44% 56% 62%; transform:translateY(-50%) rotate(28deg) scaleY(.68); box-shadow:0 0 0 34px rgba(130,126,255,.035),0 0 0 70px rgba(83,222,203,.025); }
.premium-hero-copy { position: relative; z-index: 1; width: 100%; }
.premium-eyebrow, .premium-section-label { color:transparent; background:linear-gradient(100deg,#63efd2 0%,#56cce8 54%,#a193ff 100%); background-clip:text; -webkit-background-clip:text; font-family:'Akt Bold',sans-serif; font-size:11px; letter-spacing:.2em; }
.premium-eyebrow { display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.premium-hero h1 { max-width:1200px; margin:0; font-family:'Flow Style Font',sans-serif !important; font-size:clamp(52px,6.8vw,118px); font-weight:600; line-height:1.03; letter-spacing:-.035em; }
.premium-hero h1 span { white-space:nowrap; }
.premium-hero h1 span { color:transparent; background:linear-gradient(100deg,#dffff8 0%,#62e9d3 44%,#9f91ff 100%); background-clip:text; -webkit-background-clip:text; }
.premium-hero-copy > p { max-width:580px; margin:24px 0 0; color:#a8afb4; font-size:clamp(15px,1.45vw,19px); line-height:1.7; }
.premium-cta { display:inline-flex; align-items:center; gap:22px; min-height:52px; padding:0 22px; border-radius:999px; color:#071211; background:linear-gradient(105deg,#7cf0da,#6dcfe7 58%,#aaa0ff); font-family:'Akt Bold',sans-serif; font-size:14px; text-decoration:none; box-shadow:0 8px 32px rgba(76,221,211,.19); transition:transform .2s ease, box-shadow .2s ease; }
.premium-cta:hover { transform:translateY(-2px); box-shadow:0 12px 36px rgba(76,221,211,.28); }
.premium-cta span { font-size:18px; }
.premium-trust-note { margin-top:17px; color:#6e787b; font-size:12px; letter-spacing:.04em; }

.premium-art { position:absolute; top:50%; right:7%; width:min(36vw,370px); aspect-ratio:1; transform:translateY(-50%); }
.premium-art::before { content:""; position:absolute; inset:13%; border-radius:50%; background:radial-gradient(circle,rgba(64,231,207,.23),rgba(89,115,255,.1) 48%,transparent 70%); filter:blur(12px); }
.premium-art-orbit { position:absolute; inset:10%; border:1px solid rgba(105,235,218,.22); border-radius:50%; transform:rotate(-28deg) scaleY(.72); }
.premium-art-orbit-two { inset:1%; border-color:rgba(151,133,255,.19); transform:rotate(45deg) scaleY(.64); }
.premium-art-core { position:absolute; inset:25%; display:flex; align-items:center; justify-content:center; gap:8px; border:1px solid rgba(151,249,233,.38); border-radius:31%; color:#eafffb; background:linear-gradient(145deg,rgba(43,187,170,.32),rgba(77,94,187,.2) 62%,rgba(30,31,48,.8)); box-shadow:0 0 65px rgba(46,220,200,.19),inset 0 1px rgba(255,255,255,.2); transform:rotate(-9deg); }
.premium-art-core span { font-family:'Style Font','Akt Bold',sans-serif; font-size:clamp(30px,4vw,55px); letter-spacing:-.07em; transform:rotate(9deg); }
.premium-art-core i { color:#7cf0da; font-size:22px; font-style:normal; transform:rotate(9deg) translateY(-15px); }
.premium-art-spark { position:absolute; color:#9af4e3; text-shadow:0 0 20px rgba(97,243,219,.85); }
.premium-art-spark-one { top:13%; right:17%; font-size:22px; }
.premium-art-spark-two { bottom:18%; left:11%; color:#b3a7ff; font-size:30px; }

.premium-benefits { position:relative; isolation:isolate; margin-top:260px; padding:68px 0 64px; }
.premium-benefits-heading, .premium-benefit-grid { position:relative; z-index:1; }
.premium-benefits-heading { margin-bottom:25px; }
.premium-benefits-heading .premium-section-label { margin-bottom:12px; }
.premium-benefits-heading h2 { font-family:'Style Font','Akt Bold',sans-serif; font-size:clamp(27px,3.3vw,42px); font-weight:500; letter-spacing:-.025em; }
.premium-benefits-heading h2 span { color:transparent; background:linear-gradient(100deg,#70e8d3,#79cce7 58%,#a193ff); background-clip:text; -webkit-background-clip:text; }
.premium-wave-art { position:absolute; z-index:0; top:2px; left:-7%; width:114%; height:245px; overflow:visible; opacity:.48; }
.premium-wave-art path { fill:none; stroke:url(#premiumWaveGradient); stroke-width:1.4; }
.premium-benefit-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.premium-benefit-card { min-height:220px; padding:23px; border:1px solid rgba(255,255,255,.075); border-radius:19px; background:#101112; }
.premium-benefit-icon { display:grid; width:50px; height:50px; place-items:center; margin-bottom:20px; border:0; border-radius:0; color:#78e8d6; background:transparent; }
.premium-benefit-icon svg, .premium-benefit-icon img { display:block; width:27px; height:27px; object-fit:contain; overflow:visible; }
.premium-benefit-card h3 { margin-bottom:9px; font-family:'Akt Bold',sans-serif; font-size:16px; font-weight:400; line-height:1.35; }
.premium-benefit-card p { max-width:290px; color:#899195; font-size:13px; line-height:1.65; }

.premium-plan-wrap { position:relative; z-index:2; isolation:isolate; display:flex; align-items:center; justify-content:center; min-height:470px; margin-top:190px; margin-bottom:0; padding:64px 36px 0; overflow:hidden; border:0; border-radius:30px; scroll-margin-top:80px; }
.premium-plan-wrap::before { content:""; position:absolute; z-index:0; inset:7% 10%; border-radius:48% 52% 56% 44% / 53% 43% 57% 47%; background:radial-gradient(ellipse at 42% 50%,rgba(88,220,207,.12),rgba(91,150,211,.065) 42%,rgba(153,139,255,.035) 62%,transparent 76%),repeating-linear-gradient(90deg,rgba(231,255,251,.038) 0 1px,transparent 1px 7px); -webkit-mask-image:radial-gradient(ellipse at center,#000 24%,transparent 74%); mask-image:radial-gradient(ellipse at center,#000 24%,transparent 74%); transform:rotate(-8deg); pointer-events:none; }
.premium-plan-copy { position:relative; z-index:2; width:min(100%,700px); text-align:center; }
.premium-plan-heading { margin:0 0 14px; color:transparent; background:linear-gradient(100deg,#63efd2 0%,#56cce8 54%,#a193ff 100%); background-clip:text; -webkit-background-clip:text; font-family:'Style Font','Akt Bold',sans-serif; font-size:clamp(34px,5vw,62px); font-weight:600; line-height:1.05; letter-spacing:.015em; }
.premium-plan-price { margin:24px 0 30px; color:#f4f6f8; font-family:'Flow Style Font',sans-serif !important; font-size:clamp(76px,11vw,138px); line-height:.96; letter-spacing:-.05em; white-space:nowrap; }
.premium-plan-price span { margin-left:8px; color:#929a9d; font-family:'Akt Thin',sans-serif; font-size:clamp(17px,2vw,23px); letter-spacing:0; }
.premium-plan-copy p { margin:0; color:#a6b0b4; font-size:clamp(15px,1.5vw,19px); line-height:1.7; }
.premium-plan-copy .premium-billing-note { margin:14px 0 0; color:#788387; font-size:12px; line-height:1.5; }
.premium-plan-card { padding:25px; border:1px solid rgba(100,229,213,.28); border-radius:18px; background:#111719; box-shadow:none; }
.premium-plan-topline { display:flex; align-items:center; justify-content:space-between; color:#9cefe0; font-family:'Akt Bold',sans-serif; font-size:11px; letter-spacing:.15em; }
.premium-plan-badge { padding:6px 9px; border:1px solid rgba(113,231,214,.23); border-radius:999px; color:#83e7dc; background:rgba(87,224,203,.08); font-size:9px; }
.premium-plan-name { margin:20px 0 22px; font-family:'Akt Bold',sans-serif; font-size:19px; }
.premium-buy-button { width:min(100%,420px); min-height:58px; padding:0 22px; border:0; border-radius:12px; color:#071211; background:linear-gradient(100deg,#7cf0da,#6dcfe7 58%,#aaa0ff); font-family:'Akt Bold',sans-serif; font-size:15px; cursor:pointer; transition:filter .2s ease, transform .2s ease; }
.premium-buy-button:hover { filter:brightness(1.08); transform:translateY(-1px); }
.premium-buy-button:disabled { cursor:wait; opacity:.7; }

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .premium-nav-button { min-height:34px; padding:0 2px; font-size:12px; }
  .premium-page { width:calc(100% - 28px); padding:22px 0 100px; }
  .premium-hero {
    min-height: min(700px, calc(100svh - 110px));
    align-items: center;
    padding: 42px 14px;
  }
  .premium-hero h1 {
    max-width: 100%;
    font-size: clamp(43px, 11vw, 68px);
    line-height: 1.08;
    letter-spacing: -.045em;
    text-wrap: balance;
  }
  .premium-hero h1 span { display:inline; white-space:normal; }
  .premium-hero-copy > p {
    max-width: 350px;
    margin-top: 22px;
    font-size: clamp(16px, 4.3vw, 18px);
    line-height: 1.6;
    text-wrap: pretty;
  }
  .premium-hero::before {
    width: 112%;
    right: -39%;
    top: 54%;
    transform: translateY(-50%) rotate(-19deg);
  }
  .premium-hero::after {
    width: 92%;
    right: -28%;
    top: 54%;
    transform: translateY(-50%) rotate(28deg) scaleY(.68);
  }
  .premium-benefits { margin-top:160px; padding:50px 0 42px; }
  .premium-benefit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .premium-benefit-card { min-height:205px; padding:17px; }
  .premium-benefit-icon { width:44px; height:44px; margin-bottom:16px; }
  .premium-benefit-icon svg, .premium-benefit-icon img { width:24px; height:24px; }
  .premium-wave-art { top:35px; left:-14%; width:128%; height:180px; }
  .premium-plan-wrap { min-height:0; margin-top:110px; padding:46px 18px; }
  .premium-plan-wrap::before { inset:10% 3%; }
  .premium-plan-copy { width:100%; text-align:center; }
  .premium-plan-heading { margin-bottom:14px; font-size:clamp(34px,8vw,46px); line-height:1.08; text-wrap:balance; }
  .premium-plan-price { margin:24px 0 26px; font-size:clamp(58px,16vw,88px); }
  .premium-plan-price span { display:block; margin:8px 0 0; font-size:16px; }
  .premium-plan-copy p { max-width:340px; margin-inline:auto; font-size:15px; }
  .premium-buy-button { width:min(100%,420px); min-height:58px; }
}

@media (max-width: 420px) {
  .premium-benefit-card { min-height:225px; padding:14px; }
  .premium-benefit-card h3 { font-size:15px; line-height:1.4; }
  .premium-benefit-card p { font-size:14px; line-height:1.55; }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .premium-hero { min-height:min(560px,72svh); padding-block:38px 30px; }
  .premium-hero h1 { font-size:clamp(56px,15vw,88px); line-height:1.02; }
  .premium-hero-copy > p { max-width:360px; margin-top:24px; font-size:clamp(14px,3.6vw,16px); line-height:1.55; }
  .premium-benefits { margin-top:96px; padding-top:42px; }
  .premium-eyebrow, .premium-section-label { font-size:12px; }
  .premium-benefits-heading h2 { font-size:clamp(29px,7.6vw,38px); line-height:1.15; }
  .premium-benefit-card h3 { font-size:16px; }
  .premium-benefit-card p { font-size:14px; line-height:1.58; }
  .premium-plan-wrap { margin-top:90px; padding:48px 16px; }
  .premium-plan-heading { font-size:clamp(36px,9vw,48px); }
  .premium-plan-price { font-size:clamp(66px,18vw,92px); }
  .premium-plan-copy p { font-size:17px; line-height:1.6; }
  .premium-plan-copy .premium-billing-note { font-size:14px; line-height:1.55; }
  .premium-buy-button { min-height:62px; font-size:17px; }
}

@media (max-width: 380px) {
  .premium-page { width:calc(100% - 24px); }
  .premium-hero { min-height:min(520px,68svh); padding:34px 10px 26px; }
  .premium-hero h1 { font-size:clamp(50px,14vw,60px); }
  .premium-hero-copy > p { font-size:14px; }
  .premium-benefit-grid { grid-template-columns:1fr; gap:12px; }
  .premium-benefit-card { min-height:0; padding:18px; }
}

@media (max-width: 380px) {
  .header { gap:9px; padding-right:9px; }
  .premium-nav-button { font-size:11px; }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .header .premium-nav-button {
    display: inline-flex;
    width: 34px;
    min-height: 34px;
    flex: 0 0 34px;
    margin-left: 0;
  }
}

@media (min-width: 769px) {
  .main-wave-space {
    height: 204px;
    margin-bottom: -172px;
  }
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .main-wave-space {
    height: 88px;
    margin-bottom: -72px;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }
}

/* Flow preferences: swipeable color tiles and a palette-matched banner. */
.flow-hero {
  background-color: var(--flow-banner-bg, #06151d);
  transition: background-color .55s ease;
}

.flow-settings-card {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}

@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  #home .main-wave-space {
    margin-bottom: -82px;
  }
  #home .main-wave-space + .section-block {
    position: relative;
    z-index: 2;
  }
  #home .main-wave-space + .section-block .section-title {
    position: relative;
    top: -10px;
    margin-bottom: 6px;
  }
  .flow-hero {
    margin-top: -60px;
    height: calc(clamp(240px, calc(100svh - 386px), 374px) + 70px);
    padding-bottom: 0;
  }
  #home .main-wave-space {
    height: 98px;
  }
  .flow-hero-content {
    top: 4px;
  }
}

@media (max-width: 768px) and (max-height: 620px) {
  .flow-hero {
    height: 302px;
  }
}

.flow-preference-field {
  cursor: default;
}

.flow-choice-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 1px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.flow-choice-carousel::-webkit-scrollbar {
  display: none;
}

.flow-choice-tile {
  position: relative;
  display: flex;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  align-items: flex-end;
  justify-content: center;
  padding: 7px 5px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  color: #fff;
  background: var(--tile-color);
  font: inherit;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .75);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.flow-choice-tile::before {
  display: none;
}

.flow-choice-tile span {
  position: relative;
  z-index: 1;
}

.flow-choice-icon {
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 50%;
  width: 27px;
  height: 27px;
  color: color-mix(in srgb, var(--tile-color), #000 48%);
  filter: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.flow-choice-tile[data-color] { --tile-color: #35c9c4; }

.flow-choice-tile[data-color="#35c9c4"] { --tile-color: #35c9c4; }
.flow-choice-tile[data-color="#39c9ad"] { --tile-color: #39c9ad; }
.flow-choice-tile[data-color="#ff714f"] { --tile-color: #ff714f; }
.flow-choice-tile[data-color="#5485ed"] { --tile-color: #5485ed; }
.flow-choice-tile[data-color="#e66fa6"] { --tile-color: #e66fa6; }
.flow-choice-tile[data-color="#9a7bee"] { --tile-color: #9a7bee; }
.flow-choice-tile[data-color="#f05e99"] { --tile-color: #f05e99; }
.flow-choice-tile[data-color="#a279e8"] { --tile-color: #a279e8; }
.flow-choice-tile[data-color="#f15e4f"] { --tile-color: #f15e4f; }
.flow-choice-tile[data-color="#41a9ed"] { --tile-color: #41a9ed; }
.flow-choice-tile[data-color="#d56db5"] { --tile-color: #d56db5; }
.flow-choice-tile[data-color="#7eae68"] { --tile-color: #7eae68; }
.flow-choice-tile[data-color="#d2a34e"] { --tile-color: #d2a34e; }
.flow-choice-tile[data-color="#8c9be8"] { --tile-color: #8c9be8; }

.flow-choice-tile:hover {
  transform: none;
}

.flow-choice-tile.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 5px 20px rgba(0, 0, 0, .35);
}

.flow-choice-tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .flow-settings-card {
    padding: 18px;
    border-radius: 17px;
  }

  .flow-choice-tile {
    flex-basis: 70px;
    width: 70px;
    height: 70px;
  }
}

/* Upload UI uses white as its accent instead of the global Flow teal. */
.upload-modal-content .upload-mode-choice:hover {
  border-color: rgba(255, 255, 255, .72);
  background: #191919;
}
.upload-modal-content .upload-mode-choice-icon,
.upload-modal-content .upload-track-file-icon {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}
.upload-modal-content .upload-mode-choice-arrow,
.upload-modal-content .upload-track-number,
.upload-modal-content .upload-track-file-action,
.upload-modal-content .upload-drop-icon {
  color: #fff;
}
.upload-modal-content .upload-step-indicator:focus-visible {
  outline-color: #fff;
}
.upload-modal-content .upload-step-indicator.active > span,
.upload-modal-content .upload-step-indicator.complete > span {
  color: #111;
  background: #fff;
  border-color: #fff;
}
.upload-modal-content .upload-mode-choice:focus-visible,
.upload-modal-content .upload-add-track:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.upload-modal-content .upload-track-item.is-dragging,
.upload-modal-content .upload-track-file:hover,
.upload-modal-content .upload-track-file:focus-within,
.upload-modal-content .upload-audio-drop:hover,
.upload-modal-content .upload-audio-drop.dragging,
.upload-modal-content .upload-audio-drop.has-file {
  border-color: rgba(255, 255, 255, .72);
}
.upload-modal-content .upload-track-item.needs-attention {
  border-color: #ff5263;
}
.upload-modal-content .upload-track-file:hover,
.upload-modal-content .upload-audio-drop:hover,
.upload-modal-content .upload-audio-drop.dragging,
.upload-modal-content .upload-audio-drop.has-file {
  background: #151515;
}
.upload-modal-content .upload-add-track {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .035);
  color: #fff;
}
.upload-modal-content .upload-add-track:hover {
  border-color: rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .08);
}
.upload-modal-content .upload-form-group input:focus,
.upload-modal-content .upload-album-fields input:focus {
  border-color: rgba(255, 255, 255, .78);
  outline-color: rgba(255, 255, 255, .55);
}
.upload-modal-content .upload-rights-check input {
  accent-color: #fff;
}
.upload-modal-content .upload-btn-next,
.upload-modal-content .upload-btn-submit {
  border-color: #fff;
  background: #fff;
  color: #111;
}
.upload-modal-content .upload-btn-next:hover:not(:disabled),
.upload-modal-content .upload-btn-submit:hover:not(:disabled) {
  border-color: #e5e5e5;
  background: #e5e5e5;
}
.upload-modal-content .upload-progress-animation span {
  background: #fff;
}
.upload-modal-content .upload-progress-fill {
  background: linear-gradient(90deg, #fff, #bdbdbd);
}
.flow-skeleton,
.flow-skeleton::after {
  box-sizing: border-box;
}
.flow-skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #1b1b1b;
}
.flow-skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.075), transparent);
  animation: flow-skeleton-shimmer 1.35s ease-in-out infinite;
}
@keyframes flow-skeleton-shimmer {
  to { transform: translateX(100%); }
}
.flow-skeleton-list {
  display: grid;
  gap: 14px;
  width: 100%;
}
.flow-skeleton-row {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 14px;
  padding: 8px 4px;
}
.flow-skeleton-cover { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 8px; }
.flow-skeleton-copy { display: grid; flex: 1; gap: 10px; min-width: 0; }
.flow-skeleton-line { height: 13px; width: min(240px, 62%); }
.flow-skeleton-line-short { width: min(140px, 38%); height: 11px; }
.flow-skeleton-action { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; }
.flow-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(170px, 42vw), 1fr));
  gap: 16px;
  width: 100%;
}
.flow-skeleton-card { min-width: 0; display: grid; gap: 11px; padding: 12px; border-radius: 14px; background: #111; }
.flow-skeleton-card-cover { width: 100%; aspect-ratio: 1; border-radius: 10px; }
.flow-skeleton-card .flow-skeleton-line { width: 74%; }
.flow-skeleton-card .flow-skeleton-line-short { width: 45%; }
.library-playlists-grid > .flow-skeleton-grid,
.account-playlists-grid > .flow-skeleton-grid { display: contents; }
.flow-skeleton-detail { display: flex; align-items: center; gap: 28px; margin-bottom: 34px; min-height: 240px; }
.flow-skeleton-detail-cover { width: min(240px, 38vw); aspect-ratio: 1; flex: 0 0 min(240px, 38vw); border-radius: 16px; }
.flow-skeleton-detail-copy { display: grid; gap: 16px; flex: 1; }
.flow-skeleton-detail-copy .flow-skeleton-line { width: min(380px, 80%); height: 24px; }
.flow-skeleton-detail-copy .flow-skeleton-line-short { width: min(220px, 55%); height: 16px; }
.flow-skeleton-button { width: 150px; height: 48px; margin-top: 10px; border-radius: 28px; }
@media (max-width: 600px) {
  .flow-skeleton-row { min-height: 64px; gap: 11px; }
  .flow-skeleton-cover { width: 48px; height: 48px; flex-basis: 48px; }
  .flow-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .flow-skeleton-card { padding: 9px; }
  .flow-skeleton-detail { min-height: 130px; gap: 16px; margin-bottom: 24px; }
  .flow-skeleton-detail-cover { width: 34vw; flex-basis: 34vw; border-radius: 12px; }
  .flow-skeleton-detail-copy .flow-skeleton-line { height: 18px; }
  .flow-skeleton-button { width: 120px; height: 40px; }
}
@media (max-width: 768px) {
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .header { display: none; }
  body:not(:has(#home.active, #search.active, #notifications.active, #mobileNotifications.active, #premium.active)) .main { margin-top: 0; }
  .library-playlists-grid > .flow-skeleton-grid,
  .account-playlists-grid > .flow-skeleton-grid { display: contents; }
  .library-playlists-grid .flow-skeleton-card,
  .account-playlists-grid .flow-skeleton-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 88px;
    gap: 12px;
    padding: 12px;
  }
  .library-playlists-grid .flow-skeleton-card-cover,
  .account-playlists-grid .flow-skeleton-card-cover {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    aspect-ratio: auto;
  }
  .library-playlists-grid .flow-skeleton-card .flow-skeleton-line,
  .account-playlists-grid .flow-skeleton-card .flow-skeleton-line { flex: 0 1 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-skeleton::after { animation: none; transform: none; opacity: .35; }
}
.profile-context-menu img[src*="settings.svg"] { filter: brightness(0) invert(1); }
.profile-context-menu { background: #1a1a1a; border-color: #2a2a2a; }
.public-profile-play[hidden] { display: none !important; }
