/* Global selection disabling */
:root,
body,
body * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
.allow-text-selection {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}
  .try-now {
      text-align: center;
      margin-top: 5%;
      padding: 80px 20px;
      background: rgba(0, 0, 0, 0.4);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .upload-box {
      margin: 30px auto;
      max-width: 500px;
      border: 2px dashed rgba(255, 255, 255, 0.5);
      border-radius: 12px;
      padding: 40px 20px;
      cursor: pointer;
      transition: all 0.3s ease;
  }

  .upload-box:hover {
      border-color: #00B2FF;
      background: rgba(0, 178, 255, 0.05);
  }

  .upload-icon {
      font-size: 40px;
      margin-bottom: 10px;
  }

  .demo-container {
      margin-top: 20px;
  }

  .demo-btn {
      background: linear-gradient(90deg, #FF5E00, #00B2FF);
      border: none;
      border-radius: 8px;
      padding: 10px 18px;
      margin: 5px;
      font-size: 1rem;
      cursor: pointer;
      color: #fff;
      transition: transform 0.2s ease;
  }

  .demo-btn:hover {
      transform: scale(1.05);
  }

  .playlist {
      margin: 60px auto;
      max-width: 800px;
      padding: 20px;
      background: rgba(0, 0, 0, 0.4);
      border-radius: 12px;
  }

  .playlist-container {
      display: flex;
      flex-direction: column;
      gap: 15px;
  }

  .custom-player {
      padding: 12px;
      background: rgba(0, 0, 0, 0.4);
      border-radius: 8px;
      color: #fff;
      font-size: 0.9rem;
  }

  .controls {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }

  .player-btn {
      background: linear-gradient(90deg, #FF5E00, #00B2FF);
      border: none;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      font-size: 1rem;
      cursor: pointer;
      color: #fff;
  }

  .progress-container {
      margin: 10px 0;
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 3px;
      cursor: pointer;
  }

  .progress {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #00B2FF, #FF5E00);
      border-radius: 3px;
  }

  .volume {
      margin-top: 6px;
  }

  .volume input[type=range] {
      width: 100%;
  }

  .track {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(255, 255, 255, 0.05);
      padding: 12px 16px;
      border-radius: 8px;
      transition: background 0.3s ease;
  }

  .track:hover {
      background: rgba(0, 178, 255, 0.1);
  }

  .track-info {
      display: flex;
      align-items: center;
      gap: 12px;
  }

  .track-cover img {
      width: 48px;
      height: 48px;
      border-radius: 6px;
      object-fit: cover;
  }

  /* vurgulama sürükle-bırak sırasında */
  .upload-box.dragover {
      border-color: #00E0FF;
      box-shadow: 0 6px 24px rgba(0, 178, 255, 0.08);
      transform: translateY(-2px);
  }

  /* preview stil */
  .upload-preview audio {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 6px;
      padding: 4px;
  }

  .track-title {
      margin: 0;
      font-size: 1rem;
      color: #fff;
  }

  .track-artist {
      margin: 0;
      font-size: 0.85rem;
      opacity: 0.7;
  }

  .play-btn {
      background: linear-gradient(90deg, #FF5E00, #00B2FF);
      border: none;
      border-radius: 6px;
      padding: 6px 14px;
      cursor: pointer;
      color: #fff;
      font-size: 0.9rem;
      transition: transform 0.2s ease;
  }

  .play-btn:hover {
      transform: scale(1.05);
  }

  .play-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.5);
      /* yarı saydam arka plan */
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      font-size: 18px;
      cursor: pointer;
      opacity: 0.8;
      transition: opacity 0.3s ease;
  }

  .play-overlay:hover {
      opacity: 1;
      background: rgba(0, 0, 0, 0.7);
  }

  #separatedTracks {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
      margin-top: 30px;
  }

  .track-card {
      background: rgba(255, 255, 255, 0.05);
      padding: 15px;
      border-radius: 10px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }

  .track-card h4 {
      margin-bottom: 8px;
      font-size: 1.1rem;
  }

  .player-btn {
      background: #07d9d0;
      color: #111;
      border: none;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      font-size: 16px;
      cursor: pointer;
      transition: 0.3s;
  }

  .player-btn:hover {
      background: #05bdb4;
  }

  .player-btn.danger {
      background: #e45d76;
      color: #fff;
  }

  .player-btn.danger:hover {
      background: #c63c59;
  }

  #progressBar {
      -webkit-appearance: none;
      appearance: none;
      background: #333;
      /* boş kısım koyu */
      border-radius: 4px;
      height: 6px;
      overflow: hidden;
  }

  /* Chrome / Safari / Edge */
  #progressBar::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #07d9d0;
      /* thumb rengi */
      cursor: pointer;
      box-shadow: -9999px 0 0 9999px #07d9d0;
      /* 🔑 dolu kısmı renklendir */
  }

  /* Firefox */
  #progressBar::-moz-range-track {
      background: #333;
      height: 6px;
      border-radius: 4px;
  }

  #progressBar::-moz-range-progress {
      background: #07d9d0;
      /* dolu kısım */
      height: 6px;
      border-radius: 4px;
  }

  #progressBar::-moz-range-thumb {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #07d9d0;
      border: none;
      cursor: pointer;
  }

  /* Genel slider stil */
  input[type="range"] {
      -webkit-appearance: none;
      width: 100%;
      height: 18px;
      border-radius: 4px;
      background: #333;
      overflow: hidden;
  }

  /* WebKit (Safari/Chrome) */
  input[type="range"]::-webkit-slider-runnable-track {
      height: 18px;
      background: linear-gradient(to right,
              var(--fill-color, #07d9d0) 0%,
              var(--fill-color, #07d9d0) calc(var(--val, 0) * 1%),
              #333 calc(var(--val, 0) * 1%),
              #333 100%);
      border-radius: 4px;
  }

  input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #fff;
      border: 2px solid var(--fill-color, #07d9d0);
      cursor: pointer;
      position: relative;
  }

  /* Firefox */
  input[type="range"]::-moz-range-track {
      height: 18px;
      background: #333;
      border-radius: 4px;
  }

  input[type="range"]::-moz-range-progress {
      height: 18px;
      background: var(--fill-color, #07d9d0);
      border-radius: 4px;
  }

  input[type="range"]::-moz-range-thumb {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #fff;
      border: 2px solid var(--fill-color, #07d9d0);
      cursor: pointer;
  }

  .stem-btn {
      background: #111;
      /* siyah / koyu arka plan */
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.85rem;
      transition: box-shadow 0.2s, transform 0.2s;
      box-shadow: 0 0 6px var(--stem-color, #666);
  }

  .stem-btn:hover {
      box-shadow: 0 0 12px var(--stem-color, #666);
      transform: translateY(-2px);
  }

  .stem-analysis-status {
     overflow: auto;
     max-height: 120px;
  }
