:root {
  --background: #000000;
  --foreground: #ffffff;
  --card: #0a0a0a;
  --card-foreground: #fafafa;
  --popover: #0a0a0a;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #171717;
  --secondary: #262626;
  --secondary-foreground: #fafafa;
  --muted: #262626;
  --muted-foreground: #AFAFB6;
  --accent: #262626;
  --accent-foreground: #fafafa;
  --destructive: #7f1d1d;
  --destructive-foreground: #fafafa;
  --border: #262626;
  --input: #262626;
  --ring: #d4d4d4;
  --radius: 0.15rem;
  }
  
  * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
  }
  
  body {
  font-family: "Square Sans Text VF", "Square Sans Text", Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  }
  
  body.no-scroll {
  overflow: hidden;
  }
  
  .antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  }
  
  .flex { display: flex; }
  .flex-col { flex-direction: column; }
  .items-center { align-items: center; }
  .justify-center { justify-content: center; }
  .justify-between { justify-content: space-between; }
  .gap-2 { gap: 0.5rem; }
  .gap-4 { gap: 1rem; }
  .space-y-4 > * + * { margin-top: 1rem; }
  .space-y-1 > * + * { margin-top: 0.25rem; }
  .space-y-0\.5 > * + * { margin-top: 0.125rem; }
  .w-full { width: 100%; }
  .h-full { height: 100%; }
  .relative { position: relative; }
  .absolute { position: absolute; }
  .top-0 { top: 0; }
  .left-0 { left: 0; }
  .z-\[3\] { z-index: 3; }
  .p-4 { padding: 1rem; }
  .p-2 { padding: 0.5rem; }
  .text-center { text-align: center; }
  .font-bold { font-weight: 700; }
  .font-medium { font-weight: 500; }
  .font-semibold { font-weight: 600; }
  .text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .text-md { font-size: 1rem; }
  .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .text-xs { font-size: 0.75rem; line-height: 1rem; }
  .text-\[10px\] { font-size: 10px; }
  .text-muted-foreground { color: var(--muted-foreground); }
  .text-destructive { color: #f87171; }
  .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  }
  
  .rounded-sm { border-radius: calc(var(--radius) - 0.125rem); }
  .rounded-md { border-radius: var(--radius); }
  .aspect-square { aspect-ratio: 1 / 1; }
  .overflow-hidden { overflow: hidden; }
  .cursor-pointer { cursor: pointer; }
  .select-none { user-select: none; }
  .transition-all { transition: all 0.15s ease-in-out; }
  .shrink-0 { flex-shrink: 0; }
  .max-w-\[600px\] { max-width: 600px; }
  
  .main-content {
  padding: 4rem 1.5rem 3rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 100vw;
  overflow-x: hidden;
  transition: padding-top 0.6s cubic-bezier(.4,0,.2,1);
  }
  
  .main-content.initial-state {
  padding-top: 0;
  justify-content: center;
  }
  
  .main-content.initial-state .results-wrapper {
  display: none;
  }
  
  @media (min-width: 768px) {
  .main-content {
  padding-top: 6rem;
  }
  .main-content.initial-state {
  padding-top: 0;
  }
  }
  
  .header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  }
  
  .header-title {
    display: flex;
    flex-direction: column;
    

    align-items: flex-start;
  
    cursor: pointer;
    user-select: none;
    width: 100%;
    max-width: 600px;
  

    padding-left: 3.8rem;
  }
  
  .header-logo {
    width: 75%;
    height: auto;
    max-height: 200px;
    max-width: 100%;
  }
  
  .search-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 600px;
  }
  
  .filter-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  max-width: 600px;
  gap: 0.75rem;
  justify-content: space-between;
  }
  
  .search-tabs {
  position: relative;
  display: flex;
  background-color: var(--secondary);
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
  }
  
  .search-tabs::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  transform: translateX(var(--glider-left, 4px));
  width: var(--glider-width, 0px);
  height: calc(100% - 8px);
  background-color: var(--primary);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), width 0.3s cubic-bezier(.4,0,.2,1);
  }
  
  .search-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  background-color: transparent;
  color: var(--muted-foreground);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.25s ease;
  user-select: none;
  z-index: 1;
  }
  
  .search-tab-btn .tab-icon,
  .search-tabs-trigger .tab-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }
  
  .search-tab-btn.active {
  color: var(--primary-foreground);
  }
  
  #settingsBtn.btn-icon {
  height: 2.25rem;
  width: 2.25rem;
  background-color: var(--secondary);
  flex-shrink: 0;
  border-radius: 50%;
  }
  
  .max-quality-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: rgba(60, 53, 20, 0.5);
  border: 1px solid #5a4d1e;
  color: #f5c82f;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
  text-align: center;
  }
  
  .max-quality-notice .lucide {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  }
  
  .max-quality-notice span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }
  
  .max-quality-notice span strong {
  font-weight: 700;
  background-color: #3c3514;
  padding: 2px 4px;
  border-radius: 4px;
  margin-right: 4px;
  }
  
  .token-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 500px;
  }
  
  .token-actions {
  display: flex;
  gap: 0.75rem;
  }
  
  #tokenStatus a {
  color: var(--primary);
  text-decoration: underline;
  }
  
  .search-bar-container {
  background-color: var(--background);
  border: 1px solid #404040;
  position: relative;
  width: 100%;
  border-radius: 12px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.25rem 0.75rem;
  height: 2.5rem;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  }
  
  .search-bar-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(250, 250, 250, 0.15);
  }
  
  .search-bar-container label {
  display: flex;
  align-items: center;
  color: var(--muted-foreground);
  }
  
  .search-input {
  flex: 1;
  height: 2rem;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  font-weight: 600;
  }
  
  .search-input::placeholder {
  color: var(--muted-foreground);
  font-weight: 700;
  }
  
  .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  outline: none;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  }
  
  .btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  }
  
  .btn svg {
  width: 1rem;
  height: 1rem;
  }
  
  .btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  }
  
  .btn-primary:hover {
  opacity: 0.9;
  }
  
  .btn-outline {
  border-color: var(--input);
  background-color: var(--background);
  color: var(--foreground);
  }
  
  .btn-outline:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
  }
  
  .btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  }
  
  .btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
  }
  
  .btn-icon {
  height: 2.25rem;
  width: 2.25rem;
  padding: 0;
  }
  
  .btn-icon:hover {
  border-radius: 50%;
  }
  
  #searchBtn {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 12px;
  }
  
  #loadingMessage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  overflow: visible;
  min-height: 80px;
  }
  
  .loading-svg {
  width: 60px;
  height: 60px;
  color: white;
  animation: spin 4s linear infinite;
  transform-origin: center center;
  }
  
  .loading-svg path {
  fill: currentColor;
  transform-origin: center center;
  animation: float 1.5s ease-in-out infinite alternate;
  }
  
  .loading-svg path:nth-child(1) { animation-delay: 0s; }
  .loading-svg path:nth-child(2) { animation-delay: 0.4s; }
  .loading-svg path:nth-child(3) { animation-delay: 0.8s; }
  .loading-svg path:nth-child(4) { animation-delay: 1.2s; }
  
  .loading-more-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 250px;
  }
  
  #errorMessage {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  }
  
  @keyframes spin {
  100% { transform: rotate(360deg); }
  }
  
  @keyframes float {
  0% { transform: translate(0,0) rotate(0deg) scale(1); }
  50% { transform: translate(5px,-5px) rotate(10deg) scale(1.1); }
  100% { transform: translate(-5px,5px) rotate(-10deg) scale(1); }
  }
  
  @keyframes rotate-cog {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
  }
  
  .modal-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  }
  
  .modal-loader .loading-svg {
  width: 80px;
  height: 80px;
  }
  
  .results-wrapper {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 1600px;
  padding-bottom: 5rem;
  overflow-x: hidden;
  min-height: 100vh;
  }
  
  .results-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  width: 100%;
  max-width: 100%;
  grid-auto-rows: max-content;
  margin-bottom: 200px;
  }
  
  .results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  }
  
  .track-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background-color 0.2s;
  }
  
  .track-result-item:hover {
  background-color: var(--secondary);
  }
  
  .track-result-cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  }
  
  .track-result-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  flex-grow: 1;
  }
  
  .track-result-title {
  font-size: 1rem;
  font-weight: 600;
  }
  
  .track-result-artists, .track-result-album {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  }
  
  .track-result-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  }
  
  .track-result-actions {
  flex-shrink: 0;
  }
  
  .release-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  will-change: transform;
  contain: layout style paint;
  transition: transform 0.2s ease;
  }
  
  .release-card:hover {
  transform: translateY(-4px);
  }
  
  .results-grid.initial-load .release-card {
  transform: translateY(100px);
  opacity: 0;
  animation: card-entry 0.6s cubic-bezier(.4,0,.2,1) forwards;
  animation-delay: var(--card-delay);
  }
  
  @keyframes card-entry {
  to {
  transform: translateY(0);
  opacity: 1;
  }
  }
  
  .card-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  perspective: 1000px;
  overflow: hidden;
  border-radius: var(--radius);
  user-select: none;
  flex-shrink: 0;
  background-color: var(--muted);
  }
  
  .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 500ms cubic-bezier(.2,.6,.2,1);
  }
  
  .card-inner[data-flipped="true"] { transform: rotateY(180deg); }
  .card-inner[data-flipped="false"] { transform: rotateY(0deg); }
  
  .card-front,
  .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  }
  
  .card-front { transform: rotateY(0deg); z-index: 2; }
  .card-back {
  transform: rotateY(180deg);
  z-index: 1;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  justify-content: flex-start;
  overflow: hidden;
  }
  
  .card-back { pointer-events: none; }
  .card-inner[data-flipped="true"] .card-back { pointer-events: auto; }
  
  .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.2s ease;
  background-color: var(--muted);
  opacity: 0;
  }
  
  .card-image.loading {
  opacity: 0;
  background: linear-gradient(
  90deg,
  var(--muted) 0%,
  var(--secondary) 50%,
  var(--muted) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  }
  
  .card-image.loaded {
  opacity: 1;
  }
  
  .card-tags-top {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  }
  
  .hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: linear-gradient(
  to top,
  rgba(0, 0, 0, 0.6) 0%,
  transparent 94%
  );
  opacity: 0;
  transition: opacity 0.15s ease-out;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  pointer-events: none;
  }
  
  .release-card:hover .hover-overlay {
  opacity: 1;
  pointer-events: auto;
  will-change: opacity;
  }
  
  .card-inner[data-flipped="true"] .hover-overlay {
  opacity: 0 !important;
  pointer-events: none !important;
  }
  
  .overlay-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  }
  
  .overlay-right-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  }
  
  .overlay-bottom-actions .btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  }
  
  .overlay-bottom-actions .btn-icon svg {
  width: 24px;
  height: 24px;
  }
  
  .track-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  }
  
  .release-card:hover .track-count {
  opacity: 1;
  visibility: visible;
  }
  
  .quality-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: wrap;
  }
  
  .quality-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  border: none;
  backdrop-filter: none;
  }
  
  .quality-tag.atmos {
  background: rgba(127, 29, 29, 0.9);
  color: white;
  border: 1px solid rgba(255, 100, 100, 0.3);
  }
  
  .quality-tag.max {
  background-color: #3c3514;
  color: #f5c82f;
  border: 1px solid #5a4d1e;
  }
  
  .quality-tag.high {
  background-color: #2E494E;
  color: #6AF2F2;
  border: 1px solid #3a5c61;
  }
  
  .card-text-info {
  position: relative;
  z-index: 1;
  background: var(--background);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-height: 5rem;
  max-height: 5rem;
  flex-grow: 0;
  flex-shrink: 0;
  padding: 0;
  }
  
  .card-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  }
  
  .card-title-line h1 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--foreground);
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  }
  
  .explicit-tag {
  background-color: #303036;
  color: #AFAFB6;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 16px;
  flex-shrink: 0;
  align-self: center;
  }
  
  .card-text-info p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.25rem;
  line-height: 1.25rem;
  margin: 0;
  padding: 0;
  font-weight: 600;
  }
  
  .card-text-info .card-year {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-weight: 400;
  text-transform: uppercase;
  height: auto;
  }
  
  .card-back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
  }
  
  .card-back-header h3 {
  font-size: 1rem;
  font-weight: 600;
  }
  
  .card-back-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
  flex-grow: 1;
  }
  
  .info-item-card {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.2rem;
  line-height: 1;
  }
  
  .info-label-card {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-foreground);
  flex-shrink: 0;
  white-space: nowrap;
  }
  
  .info-value-card {
  position: relative;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground);
  }
  
  .marquee {
  text-overflow: clip;
  }
  
  .marquee .marquee-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-left var(--marquee-duration, 15s) linear infinite;
  animation-delay: var(--marquee-delay, 1s);
  }
  
  .marquee .marquee-text {
  padding-right: 2rem;
  }
  
  @keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
  }
  
  .close-button {
  position: absolute;
  top: .4rem;
  right: .4rem;
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.8);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  }
  
  .dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  }
  
  .dialog-content {
  position: relative;
  background-color: var(--background);
  border: 1px solid var(--border);
  padding: 1.5rem;
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }
  
  .dialog-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius);
  z-index: 60;
  }
  
  .dialog-close:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
  }
  
  .album-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background-color: rgba(38, 38, 38, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(64, 64, 64, 0.5);
  }
  
  .album-cover-modal {
  width: 80px;
  min-width: 80px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  }
  
  .album-cover-modal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  }
  
  .album-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  overflow: hidden;
  }
  
  .album-details h2 {
  font-size: 1.125rem;
  font-weight: 600;
  }
  
  .album-details p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  }
  
  .track-list {
  display: flex;
  flex-direction: column;
  }
  
  .volume-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  padding: 1rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
  }
  
  .track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: background-color 0.15s;
  }
  
  .track-item:hover, .track-item.active {
  background-color: #2a2a2a;
  }
  
  .track-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  flex-grow: 1;
  }
  
  .track-number {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  }
  
  .track-title-artist {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  }
  
  .track-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  }
  
  .track-title-line p {
  font-weight: 500;
  color: var(--foreground);
  }
  
  .track-qualities {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
  }
  
  .track-artist {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  }
  
  .track-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  }
  
  .track-actions-btn {
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s;
  color: var(--muted-foreground);
  }
  
  .track-item:hover .track-actions-btn, .track-item.active .track-actions-btn {
  opacity: 1;
  visibility: visible;
  }
  
  .track-actions-btn:hover {
  color: var(--foreground);
  }
  
  .track-details-container {
  padding: 1rem 1rem 1rem 3.5rem;
  background-color: #1a1a1a;
  border-radius: var(--radius);
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  }
  
  .credit-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #303036;
  }
  
  .credit-item:last-child {
  border-bottom: none;
  }
  
  .credit-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
  }
  
  .credit-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  }
  
  .download-queue-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 100%;
  background-color: rgba(18, 18, 18, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  
  .download-queue-panel.open {
  transform: translateX(0);
  }
  
  .queue-toggle-button {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  height: 70px;
  width: 35px;
  background-color: #121212;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  }
  
  .queue-toggle-button:hover {
  transform: translateY(-50%) scale(1.08);
  border-radius: var(--radius);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  }
  
  .queue-toggle-button svg {
  transition: transform 0.3s ease;
  transform: rotate(0deg);
  }
  
  .download-queue-panel.open .queue-toggle-button svg {
  transform: rotate(180deg);
  }
  
  .queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  }
  
  .queue-header h3 {
  font-size: 1rem;
  font-weight: 600;
  }
  
  .queue-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.5rem;
  }
  
  .queue-empty-message {
  color: var(--muted-foreground);
  text-align: center;
  padding: 2rem;
  }
  
  .queue-item-cover {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--muted);
  }
  
  .queue-item.completed .queue-item-status-text {
  color: #4ade80;
  }
  
  .queue-item.failed {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
  }
  
  .queue-item.failed .queue-item-status-text {
  color: #ef4444;
  }
  
  .queue-item.paused {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.05);
  }
  
  .queue-item.paused .queue-item-status-text {
  color: #fbbf24;
  }
  
  #tokenStatus, #engineStatus {
  display: flex;
  align-items: center;
  justify-content: center;
  }
  
  .status-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
  vertical-align: -0.125em;
  }
  
  .status-icon.success {
  color: #4ade80;
  }
  
  .status-icon.error {
  color: #f87171;
  }
  
  .settings-dialog {
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  }
  
  .settings-dialog.open {
  opacity: 1;
  visibility: visible;
  }
  
  .settings-dialog .dialog-content {
  width: 100%;
  max-width: 700px;
  background-color: rgba(18, 18, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: scale(0.95) translateY(1rem);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.4s cubic-bezier(.4,0,.2,1);
  }
  
  .settings-dialog.open .dialog-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  }
  
  .settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.02);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  }
  
  .settings-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  }
  
  .settings-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem 0.5rem;
  }
  
  .settings-section {
  border-bottom: 1px solid var(--border);
  }
  
  .settings-section:last-child {
  border-bottom: none;
  }
  
  .settings-section-toggle {
  background: none;
  border: none;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem;
  cursor: pointer;
  color: #787887;
  transition: color 0.2s ease;
  }
  
  .settings-section-toggle:hover,
  .settings-section-toggle.active {
  color: var(--foreground);
  }
  
  .settings-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
  position: relative;
  }
  
  .settings-section-header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--foreground);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
  }
  
  .settings-section-toggle:hover .settings-section-header::after,
  .settings-section-toggle.active .settings-section-header::after {
  transform: scaleX(1);
  }
  
  .settings-section-header .lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  }
  
  .settings-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  }
  
  .settings-section-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease-out;
  }
  
  .settings-section-toggle.active .settings-section-arrow {
  transform: rotate(180deg);
  }
  
  .settings-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height;
    contain: layout paint;
  }
  
  .settings-section-toggle:not(.active) + .settings-section-content {
    will-change: auto;
  }
  
  .settings-section-content-inner {
  padding: 0.5rem 1rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  }
  
  .input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  }
  
  .input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  }
  
  .settings-input {
  background-color: var(--secondary);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 44px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
  }
  
  .settings-input::placeholder {
  color: #555;
  font-style: italic;
  }
  
  .settings-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.2);
  }
  
  .settings-input:disabled {
  background-color: #1a1a1a;
  color: #555;
  cursor: not-allowed;
  border-color: #2a2a2a;
  }
  
  .settings-help-text {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.5;
  }
  
  .placeholder-help {
  margin-top: 0.75rem;
  }
  
  .placeholder-toggle {
  background: none;
  border: none;
  color: #787887;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 4px;
  width: auto;
  justify-content: flex-start;
  }
  
  .placeholder-toggle:hover {
  color: var(--foreground);
  }
  
  .placeholder-toggle .settings-section-arrow {
  width: 14px;
  height: 14px;
  }
  
  .placeholder-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .placeholder-capsules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(0,0,0,0.2);
  border-radius: 6px;
  }
  
  .placeholder-capsule {
  background-color: var(--secondary);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #333;
  }
  
  .placeholder-capsule:hover {
  background-color: #333;
  color: var(--foreground);
  }
  
  .placeholder-capsule.copied {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  }
  
  .settings-subsection-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .settings-subsection-title:first-child {
    margin-top: 0;
  }

  .settings-tag-toggle-all {
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
  }

  .settings-tag-toggle-all:hover {
    color: var(--foreground);
    background-color: var(--secondary);
  }

  .tag-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  #tagSelectionContainer {
    contain: layout style paint;
    backface-visibility: hidden;
    transform: translateZ(0);
  }
  
  .tag-selection-grid {
    will-change: contents;
  }
  
  .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  color: var(--muted-foreground);
  transition: color 0.2s;
  white-space: normal;
  word-break: break-word;
  }
  
  .checkbox-label:hover {
  color: var(--foreground);
  }
  
  .checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background-color: var(--secondary);
  border-radius: 50%;
  border: 1px solid #444;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  }
  
  .checkbox-label input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  }
  
  .checkbox-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 7px;
  width: 4px;
  height: 8px;
  border: solid var(--primary-foreground);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  }
  
  .checkbox-label input[type="checkbox"]:hover {
  border-color: #888;
  }
  
  .checkbox-label input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.3);
  }

  .radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    color: var(--muted-foreground);
    transition: color 0.2s;
  }

  .radio-label:hover {
    color: var(--foreground);
  }

  .radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #444;
    background-color: var(--secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
  }

  .radio-label input[type="radio"]:checked {
    border-color: var(--primary);
  }

  .radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
  }
  
  .settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background-color: rgba(10, 10, 10, 0.8);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  .telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s ease;
  }
  
  .telegram-link:hover {
    color: var(--foreground);
  }
  
  .telegram-link i {
    font-size: 1.125rem;
  }
  
  .lucide-info-icon {
  width: 16px;
  height: 16px;
  color: #787887;
  margin-left: 8px;
  pointer-events: all;
  cursor: pointer;
  }
  
  .lucide-info-icon:hover {
  color: var(--foreground);
  }
  
  .info-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.7);
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  }
  
  .info-modal-content {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 500px;
  position: relative;
  }
  
  .info-modal-content h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  }
  
  .info-modal-content p {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 1rem;
  }
  
  .info-modal-content code {
  background-color: var(--secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--foreground);
  }
  
  .lucide {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  }
  
  #settingsBtn .lucide {
  width: 18px;
  height: 18px;
  animation: rotate-cog 4s linear;
  }
  
  html, body {
  overflow-x: hidden;
  max-width: 100vw;
  }
  
  .results-grid > * {
  min-width: 0;
  max-width: 100%;
  }
  
  ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  }
  
  ::-webkit-scrollbar-track {
  background: var(--background);
  }
  
  ::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 5px;
  border: 2px solid var(--background);
  }
  
  ::-webkit-scrollbar-thumb:hover {
  background: #404040;
  }
  
  .toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 100px) scale(0.95);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border: 1px solid transparent;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .toast-notification.show {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
  
  .toast-notification.toast-success {
    background-color: #7fd968;
  }
  
  .toast-notification.toast-error {
    background-color: #ef4444;
    color: #fff;
  }
  
  .toast-notification.toast-info {
    background-color: #454745;
    color: #fff;
  }
  
  @media (max-width: 640px) {
    .results-grid {
      gap: 1rem;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .main-content {
      padding-left: 1rem;
      padding-right: 1rem;
      padding-top: 2rem;
      transition: none;
    }
    .main-content.initial-state {
      padding-top: 2rem;
      justify-content: center;
    }
    .header-container {
      gap: 0.75rem;
    }

    .header-title {
      align-items: center; 
      padding-left: 0; 
    }

    .header-logo {
      height: 45px;
      width: 93%; 
      max-height: none; 
    }

    .download-queue-panel {
      width: calc(100% - 35px);
    }
    .filter-controls {
      flex-wrap: nowrap;
      justify-content: center;
      gap: 0.5rem;
    }
    .search-tab-btn {
      padding: 0.5rem 0.75rem;
    }
    #settingsBtn {
      height: 38px;
      width: 38px;
    }
    .card-title-line h1 {
      font-size: 0.875rem;
    }
    .card-text-info p {
      font-size: 0.75rem;
    }
    .card-text-info {
      min-height: 4.5rem;
      max-height: 4.5rem;
    }
    .quality-selector-wrapper {
      flex-grow: 1;
      min-width: 0;
    }
    .quality-selector-trigger {
      height: 38px;
      padding: 0.2rem 0.4rem;
      min-height: 38px;
    }
    .quality-selector-trigger .description {
      display: none;
    }
    .quality-selector-trigger .title {
      font-size: 0.8rem;
      font-weight: 700;
    }
    .quality-selector-options {
      width: 200px;
      left: 0;
      right: auto;
    }
    .quality-option .description {
      font-size: 0.75rem;
    }
    .quality-option .title {
      font-size: 0.875rem;
    }


    .results-grid.initial-load .release-card {
      animation: card-entry 0.6s cubic-bezier(.4,0,.2,1) forwards;
    }


    .queue-toggle-button {
      top: 35%;
    }


    .settings-dialog .dialog-content {
      width: calc(100% - 2rem);
      max-width: 500px;
      max-height: 85vh;
    }
    .settings-header {
      padding: 0.75rem 1rem;
    }
    .settings-header h3 {
      font-size: 1.1rem;
    }
    .settings-content {
      padding: 0.75rem;
    }
    .settings-section-content-inner {
      gap: 1rem;
      padding: 0.5rem 0.5rem 1rem 0.5rem;
    }
    .input-group label {
      font-size: 0.8rem;
    }
    .settings-input {
      height: 40px;
      font-size: 0.8rem;
    }
    .tag-selection-grid {
      grid-template-columns: 1fr;
      gap: 0.5rem;
    }
    .search-tabs::before {
      display: none;
    }
    .search-tabs .search-tab-btn.hidden-in-dropdown {
      display: none;
    }
    .search-tabs .search-tab-btn:hover {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }
    .toast-notification {
      width: 90vw;
      box-sizing: border-box;
      text-align: center;
      justify-content: center;
    }
  }
  
  @media (min-width: 1536px) {
  .results-wrapper {
  max-width: 1800px;
  }
  }
  
  .quality-selector-wrapper {
    position: relative;
    flex-grow: 1;
    min-width: 0;
    transition: all 0.3s ease;
  }
  
  .quality-selector-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background-color: var(--secondary);
    text-align: left;
    width: 100%;
    transition: background-color 0.2s;
    position: relative;
    height: auto;
    min-height: 38.4px;
  }
  
  .quality-selector-trigger:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .quality-selector-trigger::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    border-radius: 8px;
  }
  
  .quality-selector-wrapper:not(.open) .quality-selector-trigger[data-quality="HIGH"]::before {
    opacity: 1;
    background-image: radial-gradient(100% 100% at 1.6% 50%, rgba(46, 73, 78, 0.5), rgba(46, 73, 78, 0));
  }
  
  .quality-selector-wrapper:not(.open) .quality-selector-trigger[data-quality="MAX"]::before {
    opacity: 1;
    background-image: radial-gradient(100% 100% at 1.6% 50%, rgba(60, 53, 20, 0.5), rgba(60, 53, 20, 0));
  }
  
  .quality-selector-trigger .option-text, .quality-selector-trigger .quality-selector-arrow {
    position: relative;
    z-index: 1;
  }
  
  .quality-selector-trigger .option-text {
    justify-content: center;
    flex-grow: 1;
    text-align: center;
  }
  
  .quality-selector-trigger .description {
    display: none;
  }
  
  .quality-option .description {
    display: block;
  }
  
  .quality-selector-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
  }
  
  .quality-selector-wrapper.open .quality-selector-arrow {
    transform: rotate(180deg);
  }
  
  .quality-selector-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 4px;
    z-index: 10;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scaleY(0.95);
    transform-origin: top;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease-out,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
    border: 1px solid var(--border);
  }
  
  .quality-selector-wrapper.open .quality-selector-options {
    max-height: 200px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
  }
  
  .quality-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    text-align: left;
    width: 100%;
    transition: background-color 0.2s;
    position: relative;
    overflow: hidden;
  }
  
  .quality-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .quality-option::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease-in;
    z-index: 0;
  }
  
  .quality-option.active::before {
    opacity: 1;
  }
  
  .radio-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--muted-foreground);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
    z-index: 1;
  }
  
  .radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: transform 0.2s;
  }
  
  .quality-option.active .radio-indicator::after {
    transform: translate(-50%, -50%) scale(1);
  }
  
  .quality-option[data-value="HIGH"].active .radio-indicator {
    border-color: #6AF2F2;
  }
  .quality-option[data-value="HIGH"].active .radio-indicator::after {
    background-color: #6AF2F2;
  }
  .quality-option[data-value="HIGH"].active::before {
    background-image: radial-gradient(100% 100% at 1.6% 50%, rgba(46, 73, 78, 0.5), rgba(46, 73, 78, 0));
  }
  
  .quality-option[data-value="MAX"].active .radio-indicator {
    border-color: #f5c82f;
  }
  .quality-option[data-value="MAX"].active .radio-indicator::after {
    background-color: #f5c82f;
  }
  .quality-option[data-value="MAX"].active::before {
    background-image: radial-gradient(100% 100% at 1.6% 50%, rgba(60, 53, 20, 0.5), rgba(60, 53, 20, 0));
  }
  
  .option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
  }
  
  .option-text .title {
    color: var(--foreground);
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.2;
  }
  
  .option-text .description {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1;
  }
  
  .w-4 { width: 1rem; }
  .h-4 { height: 1rem; }
  
  .queue-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
  }
  
  .queue-item.paused {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
  }
  
  .queue-item.failed {
    border-color: var(--destructive);
    background: rgba(239, 68, 68, 0.05);
  }
  
  .queue-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    min-width: 0;
  }
  
  .queue-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .queue-item-title {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }
  
  .queue-item-header .quality-tag {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    line-height: 1;
  }
  
  .status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    letter-spacing: 0.5px;
  }
  
  .status-badge.paused {
    background: #f59e0b;
    color: #000;
  }
  
  .status-badge.failed {
    background: var(--destructive);
    color: white;
  }
  
  .queue-item-artist {
    font-size: 12px;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }
  
  .queue-item-current-track {
    font-size: 11px;
    color: var(--accent-foreground);
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .queue-item-progress-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
  }
  
  .queue-item-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11px;
  }
  
  .queue-item-status-text {
    color: var(--muted-foreground);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .queue-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-weight: 500;
  }
  
  .queue-item-percentage {
    color: var(--accent-foreground);
  }
  
  .queue-item-size {
    color: var(--muted-foreground);
    font-size: 11px;
    white-space: nowrap;
  }
  
  .queue-item-progress-container {
    width: 100%;
    height: 4px;
    background: var(--muted);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
  }
  
  .queue-item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 4px;
  }
  
  .queue-item-actions .btn {
    padding: 0;
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  
  .queue-item-actions .btn svg {
    width: 20px;
    height: 20px;
  }
  
  .queue-item-actions .btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
  }
  
  .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
  }
  
  .audio-specs {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted-foreground);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .queue-item-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e0e0e0, #ffffff);
    transition: width 0.1s linear;
    transform: none !important;
    border-radius: 2px;
  }
  
  .queue-item.completed .queue-item-progress-bar {
    background: linear-gradient(90deg, #4ade80, #22c55e);
  }
  
  .queue-item.paused .queue-item-progress-bar {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
  }
  
  .queue-item.failed .queue-item-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
  }
  
  .queue-item-actions:empty {
    width: 24px;
    height: 24px;
    background: transparent;
  }

  .search-tabs-container {
    position: relative;
  }
  .search-tabs-trigger {
    display: none;
  }
  .search-tabs-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
  }

  @media (max-width: 640px) {
    .search-tabs-container {
      flex-grow: 0;
      flex-shrink: 0;
      width: auto;
      min-width: 140px;
    }
    .search-tabs-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.25rem;
      padding: 0.5rem 0.75rem;
      border-radius: 8px;
      cursor: pointer;
      border: none;
      background-color: var(--secondary);
      text-align: left;
      width: 100%;
      height: 38px;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--foreground);
    }
    .search-tabs-trigger .title {
      flex-grow: 1;
      text-align: center;
    }
    .search-tabs {
      display: none;
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      flex-direction: column;
      padding: 4px;
      z-index: 10;
      border: 1px solid var(--border);
    }
    .search-tabs-container.open .search-tabs {
      display: flex;
    }
    .search-tabs-container.open .search-tabs-arrow {
      transform: rotate(180deg);
    }
    .search-tabs .search-tab-btn {
      width: 100%;
      justify-content: flex-start;
    }
  }

.load-more-container {
    display: none;
    justify-content: center;
    padding: 2rem;
    margin-top: 1rem;
    grid-column: 1 / -1;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.load-more-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn .loading-svg {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.settings-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--secondary);
    color: var(--foreground);
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23787887' 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 0.75rem center;
    background-size: 1em;
}

.settings-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.2);
}

.quality-filter-wrapper {
  position: relative;
  flex-shrink: 0;
}

#qualityFilterTrigger {
  color: var(--muted-foreground);
}

#qualityFilterTrigger.active {
  color: var(--primary);
  background-color: transparent;
}

.quality-filter-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 200px;
  background-color: var(--secondary);
  border-radius: 12px;
  padding: 4px;
  z-index: 10;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transform-origin: top right;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease-out,
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s;
  border: 1px solid var(--border);
}

.quality-filter-wrapper.open .quality-filter-options {
  max-height: 250px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.quality-filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background-color: transparent;
  text-align: left;
  width: 100%;
  transition: background-color 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.quality-filter-option:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.quality-filter-option.active {
  color: var(--primary);
  font-weight: 600;
  background-color: rgba(250, 250, 250, 0.05);
}

@media (max-width: 640px) {
  .filter-controls {
    gap: 0.25rem;
  }
  #qualityFilterTrigger, #settingsBtn {
    height: 38px;
    width: 38px;
  }
  .toast-notification {
    width: 90vw;
    box-sizing: border-box;
    text-align: center;
    justify-content: center;
  }
}
