/* Player Controls Styles */
@media (max-width: 768px) {
  .playerControls {
    gap: 0.75rem;
  }

  .playerControls > .button {
    width: 3.25rem;
    height: 3.25rem;
  }

  .playerControls > .button .play-pause {
    width: 5rem;
    height: 5rem;
  }
}

.playerControls .btn svg {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

/* Button System — sizes for playback, actions, close, navbar */
.btn {
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--btn-bdr, transparent);
  background: var(--btn-bg, transparent);
  border-radius: 12px;
  line-height: 1;
  text-decoration: none;
  user-select: none;
  cursor: pointer;
  position: relative;
  outline: none;
  box-shadow: var(--btn-shadow, none);
  transition: transform 180ms cubic-bezier(0.2, 0.6, 0.2, 1),
              box-shadow 180ms cubic-bezier(0.2, 0.6, 0.2, 1),
              background-color 180ms cubic-bezier(0.2, 0.6, 0.2, 1),
              border-color 180ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.btn svg, .btn .icon { 
  width: 20px; 
  height: 20px; 
}

.btn svg { 
  fill: var(--btn-icon, currentColor); 
}

.btn .icon-stroke { 
  stroke: var(--btn-icon, currentColor); 
  fill: none; 
}

.btn:hover { 
  transform: translateY(-1px); 
}

.btn:active { 
  transform: translateY(0); 
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 139, 253, 0.35), var(--btn-shadow, none);
}

.btn[disabled], 
.btn.is-disabled {
  opacity: 0.6; 
  cursor: not-allowed; 
  pointer-events: none;
}

/* Size variants */
.btn--playback { 
  width: 48px; 
  height: 48px; 
  padding: 0; 
  border-radius: 9999px; 
}

.btn--playback svg { 
  width: 22px; 
  height: 22px; 
}

.btn--action { 
  height: 44px; 
  min-width: 132px; 
  padding: 0 18px; 
  border-radius: 14px; 
  font-weight: 600; 
}

.btn--action .label { 
  white-space: nowrap; 
}

.btn--close { 
  width: 32px; 
  height: 32px; 
  padding: 0; 
  border-radius: 9999px; 
}

.btn--close svg { 
  width: 14px; 
  height: 14px; 
}

.btn--nav { 
  height: 34px; 
  min-width: 34px; 
  padding: 0 10px; 
  border-radius: 10px; 
}

.btn--nav svg { 
  width: 18px; 
  height: 18px; 
}

.btn--ghost { 
  background: transparent; 
}

.btn--subtle { 
  background: var(--btn-bg, transparent); 
  border-color: var(--btn-bdr, transparent); 
}

.btn::after {
  content: "";
  position: absolute; 
  inset: 0;
  border-radius: inherit;
  opacity: 0; 
  transition: opacity 180ms ease;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,0.06), rgba(0,0,0,0) 60%);
}

.btn:hover::after { 
  opacity: 1; 
}

.btn:active::after { 
  background: rgba(0,0,0,0.06); 
  opacity: 1; 
}

.btn.use-site-colors {
  --btn-bg: var(--button-background);
  --btn-bdr: var(--border-400);
  --btn-icon: var(--text-200);
  --btn-shadow: var(--shadow-sm);
}

.btn.use-site-colors:hover { 
  --btn-bg: var(--button-hover); 
}

.btn.use-site-colors:active { 
  --btn-bg: var(--button-active); 
}

.btn.is-confirm { 
  --btn-bg: var(--accent-success); 
  --btn-bdr: var(--accent-success); 
  --btn-icon: var(--text-on-accent); 
  --btn-shadow: var(--shadow-md); 
}

.btn.is-confirm:hover { 
  --btn-bg: var(--accent-success-hover); 
}

.btn.is-cancel { 
  --btn-bg: var(--accent-danger); 
  --btn-bdr: var(--accent-danger); 
  --btn-icon: var(--text-on-accent); 
  --btn-shadow: var(--shadow-md); 
}

.btn.is-cancel:hover { 
  --btn-bg: var(--accent-danger-hover); 
}

.btn.is-primary { 
  --btn-bg: var(--accent-primary); 
  --btn-bdr: var(--accent-primary); 
  --btn-icon: var(--text-on-accent); 
  --btn-shadow: var(--shadow-md); 
}

.btn.is-primary:hover { 
  --btn-bg: var(--accent-primary-hover); 
}

.btn.is-primary:active { 
  --btn-bg: var(--accent-primary-active); 
}

.btn.is-secondary { 
  --btn-bg: var(--accent-info); 
  --btn-bdr: var(--accent-info); 
  --btn-icon: var(--text-on-accent); 
  --btn-shadow: var(--shadow-sm); 
}

.btn--icon-only { 
  padding: 0; 
  width: 40px; 
  height: 40px; 
  border-radius: 12px; 
}

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

.btn .label { 
  font-size: 14px; 
  letter-spacing: 0.2px; 
}

.btn .kbd { 
  font-size: 11px; 
  padding: 2px 6px; 
  border-radius: 6px; 
  border: 1px solid currentColor; 
  opacity: 0.65; 
}

.btn.elevate:hover { 
  box-shadow: var(--btn-shadow, none), 0 2px 10px rgba(0,0,0,0.12); 
}

.btn-group { 
  display: inline-flex; 
  gap: 8px; 
}

.playback-bar { 
  display: inline-flex; 
  gap: 10px; 
  align-items: center; 
}

.playback-bar .btn--playback.primary { 
  width: 56px; 
  height: 56px; 
}

.playback-bar .btn--playback.primary svg { 
  width: 26px; 
  height: 26px; 
}

.icon {
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent !important;
}

/* Modals */
.modal {
  position: fixed;
  bottom: 15% !important; 
  left: auto; 
  right: auto;
  margin: auto;
}

/* Scrolling hierarchy */
html, body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

#pageWrapper {
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mainArea,
.content-container,
#contentWrapper,
#dynamic-content {
  overflow: visible !important;
}

#content-loading {
  transition: all 1.5s forwards;
  pointer-events: none;
  overscroll-behavior-y: contain;
}

.entrance {
  -webkit-animation: entrance 0.7s cubic-bezier(0.470, 0.000, 0.745, 0.715) both;
  animation: entrance 0.7s cubic-bezier(0.470, 0.000, 0.745, 0.715) both;
}

@keyframes entrance {
  0% {
    transform: scale(2);
    filter: blur(4px);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    filter: blur(0px);
    opacity: 1;
  }
}

.exit {
  -webkit-animation: exit 1s cubic-bezier(0.165, 0.840, 0.440, 1.000) both;
  animation: exit 1s cubic-bezier(0.165, 0.840, 0.440, 1.000) both;
}

@keyframes exit {
  0% {
    transform: scale(1);
    filter: blur(0px);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    filter: blur(4px);
    opacity: 0;
  }
}

.card-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--bg-default-rgb, 0, 0, 0), 0.85);
  backdrop-filter: blur(4px);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.card-loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.card-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card-loading-overlay.fade-out {
  animation: overlayFadeOut 0.4s ease forwards;
}

@keyframes overlayFadeOut {
  to {
    opacity: 0;
  }
}

[data-loader="true"] {
  position: relative;
}

/* Search Modal Animations */
.search-modal-overlay.show {
  opacity: 1 !important;
}

.search-modal-overlay.show .search-content {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background 0.3s;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Filter Chips */
.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.filter-chip.active {
  background: var(--accent-primary, #3b82f6);
  color: white;
  border-color: var(--accent-primary, #3b82f6);
}

/* Search Results Hover Effects */
.search-result-item {
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-item.selected {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--accent-primary, #3b82f6);
}

/* Recent Search Item */
.recent-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.03);
}

.recent-search-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.recent-search-item .remove-btn {
  opacity: 0;
  transition: opacity 0.2s;
}

.recent-search-item:hover .remove-btn {
  opacity: 1;
}

/* Backdrop Blur Animation */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .search-backdrop {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

/* Album Card in Search */
.album-card-search {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.album-card-search:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.3s ease-out;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/**
.progress {
  --bg: var(--background-700, #2b2f36);
  --bg2: var(--background-600, #353a42);
  --fill: var(--accent-primary, #3b82f6);
  --fill2: var(--accent-primary-hover, #2563eb);
  --buf: color-mix(in oklab, var(--fill) 25%, transparent);
  --thumb-bg: var(--text-on-accent, #fff);
  --ring: color-mix(in oklab, var(--fill) 40%, transparent);
  width: 100%;
  user-select: none;
}

.progress .time {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-400, #9aa4b2);
}

.progressBar {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0)) border-box, linear-gradient(180deg, var(--bg), var(--bg2));
  overflow: visible;
  cursor: pointer;
  touch-action: none;
  outline: 0;
}

.progressBuffer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: var(--buf);
  pointer-events: none;
}

.progressFill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fill), var(--fill2));
  pointer-events: none;
  transition: width 0.08s linear;
}

.progressThumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 0, 0, 0.08), transparent 55%), var(--thumb-bg);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), 0 0 0 3px var(--ring);
  pointer-events: none;
  z-index: 2;
  will-change: left, transform;
}

.progressBar:focus-visible {
  box-shadow: 0 0 0 4px var(--ring);
}

.progressBar:active .progressThumb {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 6px var(--ring);
}

.progressShadow {
  position: absolute;
  inset: -10px 0 -10px 0;
  border-radius: inherit;
  pointer-events: none;
}
**/
.nav-controls button {
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

.nav-controls button:hover {
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

.fragments .similar {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.album-buttons {
  margin-top: 1rem;
}

/* Modal Overlay Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: #1f2937;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #374151;
  background-color: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.artist-count {
  color: #9ca3af;
  font-size: 14px;
  margin-top: 4px;
}

.close-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.artists-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.artist-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background-color 0.2s;
  cursor: pointer;
  position: relative;
}

.artist-item:hover {
  background-color: #374151;
}

.artist-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 16px;
  position: relative;
  flex-shrink: 0;
}

.artist-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 8px;
}

.artist-item:hover .artist-image::after {
  opacity: 1;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #3b82f6;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s;
  z-index: 2;
}

.artist-item:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.play-btn:hover {
  background-color: #2563eb;
  transform: translate(-50%, -50%) scale(1.1);
}

.artist-info {
  flex: 1;
  min-width: 0;
}

.artist-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-count {
  font-size: 14px;
  color: #9ca3af;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #6b7280;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

.empty-text {
  color: #9ca3af;
  margin-bottom: 4px;
}

.empty-subtext {
  font-size: 14px;
  color: #6b7280;
}

.artists-list::-webkit-scrollbar {
  width: 8px;
}

.artists-list::-webkit-scrollbar-track {
  background: #1f2937;
}

.artists-list::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

.artists-list::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

.demo-button {
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.demo-button:hover {
  background-color: #2563eb;
}
