@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-color: #ea580c;
  --scrollbar-thumb: #a8a29e;
  --scrollbar-track: #f5f5f4;
}

body {
  font-family: 'GmarketSans', sans-serif;
  accent-color: var(--brand-color);
}

/* Custom Scrollbar (Standard + Legacy Fallback) */
.playlist-scroller {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@supports not (scrollbar-color: auto) {
  .playlist-scroller {
    scrollbar-width: auto;
  }

  .playlist-scroller::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .playlist-scroller::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
  }

  .playlist-scroller::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 9999px;
  }
}

/* Range Slider Fallback for browsers without accent-color */
@supports not (accent-color: #ea580c) {
  input[type='range'].volume-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }

  input[type='range'].volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: linear-gradient(
      to right,
      var(--brand-color) var(--progress, 65%),
      #e7e5e4 var(--progress, 65%)
    );
    border-radius: 9999px;
  }

  input[type='range'].volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    background: var(--brand-color);
    cursor: pointer;
    margin-top: -4px;
  }

  input[type='range'].volume-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #e7e5e4;
    border-radius: 9999px;
  }

  input[type='range'].volume-slider::-moz-range-progress {
    height: 6px;
    background: var(--brand-color);
    border-radius: 9999px;
  }

  input[type='range'].volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 9999px;
    background: var(--brand-color);
    cursor: pointer;
  }
}

/* Playing vinyl animation */
@keyframes slow-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.disc-spinning {
  animation: slow-spin 10s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .disc-spinning {
    animation: none;
  }
}
