/* =========================================================
   PLAK ÇALAR (sağ üst)
   ========================================================= */
.mplayer {
  --sp: #1db954;               /* Spotify yeşili */
  --beat: 1;
  position: fixed; top: 84px; right: max(16px, calc((100vw - 1120px) / 2 - 140px)); z-index: 55;
  display: flex; align-items: center; flex-direction: row-reverse; gap: 10px;
  pointer-events: none;
}
.mplayer > * { pointer-events: auto; }

/* Plak sahnesi: sütunlar (canvas) + plak + pikap kolu */
.mp-stage { position: relative; width: 124px; height: 124px; flex-shrink: 0; }
.mp-bars { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-disc {
  position: absolute; inset: 15.5%; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.04) 30.5% 31%, transparent 31.5%),
    repeating-radial-gradient(circle, #121212 0 1.4px, #1c1c1c 1.6px 2.6px),
    #111;
  box-shadow: 0 10px 30px -6px rgba(0,0,0,.9), 0 0 0 2px #0a0a0a, 0 0 24px -4px rgba(29,185,84,.0);
  animation: mpSpin 3.4s linear infinite paused;
  scale: var(--beat);
  transition: box-shadow .4s;
}
/* Sabit, yumuşak ışık yansıması (keskin çizgi yok, plakla dönmez) */
.mp-stage::after {
  content: ""; position: absolute; inset: 15.5%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.08), transparent 55%);
  scale: var(--beat);
}
@keyframes mpSpin { to { transform: rotate(360deg); } }
.mplayer.playing .mp-disc { animation-play-state: running; box-shadow: 0 10px 30px -6px rgba(0,0,0,.9), 0 0 0 2px #0a0a0a, 0 0 30px -2px rgba(29,185,84,.45); }

/* Plak etiketi */
.mp-label {
  position: absolute; inset: 31%; border-radius: 50%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 35% 30%, #ff7a59, #e8336b 45%, #7c3aed 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
  text-align: center;
}
.mp-label-artist, .mp-label-title { font: 800 5px/1.1 var(--font); letter-spacing: .04em; color: #fff; text-transform: uppercase; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-label-title { font-weight: 600; opacity: .85; }
.mp-label-hole { width: 5px; height: 5px; border-radius: 50%; background: #0b0b0b; margin: 2px 0; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }

/* Çal / durdur butonu: tüm plak tıklanabilir, simge tam ortada.
   Tarayıcının buton iç boşluğu sıfırlanır; boyut açıkça verilir (left/right ile genişleme
   bazı tarayıcılarda butonlarda çalışmadığı için). */
.mp-play {
  position: absolute; top: 15.5%; left: 15.5%; width: 69%; height: 69%;
  margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer; z-index: 3;
  background: transparent; display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none; appearance: none;
}
.mp-play:focus-visible { outline: 2px solid var(--sp); outline-offset: 3px; }
.mp-icon {
  position: relative; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--sp); box-shadow: 0 6px 16px -4px rgba(29,185,84,.8);
  transition: transform .2s, opacity .25s;
}
.mp-icon svg { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; fill: #07120b; }
.mp-i-pause { display: none; }
.mplayer.playing .mp-i-play { display: none; }
.mplayer.playing .mp-i-pause { display: block; }
.mplayer.playing .mp-icon { opacity: 0; transform: scale(.8); }
.mplayer.playing .mp-stage:hover .mp-icon, .mplayer.playing .mp-play:focus-visible .mp-icon { opacity: 1; transform: none; }
.mp-play:hover .mp-icon { transform: scale(1.08); }

/* Bilgi paneli: fareyle üzerine gelince açılır */
.mp-info {
  width: 210px; padding: 12px 14px; border-radius: 14px;
  background: rgba(14,17,24,.94); border: 1px solid var(--border-strong);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.9);
  display: grid; gap: 3px;
  opacity: 0; transform: translateX(10px); visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
}
.mplayer:hover .mp-info, .mplayer:focus-within .mp-info { opacity: 1; transform: none; visibility: visible; }
.mp-status { display: flex; align-items: center; gap: 6px; font: 700 .64rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mplayer.playing .mp-status { color: var(--sp); }
.mplayer.playing .mp-status::before { content: ""; width: 10px; height: 9px; background: linear-gradient(var(--sp), var(--sp)) 0 100% / 2px 60% no-repeat, linear-gradient(var(--sp), var(--sp)) 4px 100% / 2px 100% no-repeat, linear-gradient(var(--sp), var(--sp)) 8px 100% / 2px 40% no-repeat; animation: mpEq .8s ease-in-out infinite alternate; }
@keyframes mpEq { to { background-size: 2px 100%, 2px 35%, 2px 90%; } }
.mp-title { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.mp-progress { height: 5px; border-radius: 5px; background: rgba(255,255,255,.1); cursor: pointer; overflow: hidden; }
.mp-progress:focus-visible { outline: 2px solid var(--sp); outline-offset: 2px; }
.mp-progress i { display: block; height: 100%; width: 0; background: var(--sp); border-radius: inherit; }
.mp-time { font: .66rem var(--mono); color: var(--muted); text-align: right; }

/* Dosya yoksa */
.mplayer.broken .mp-disc { filter: grayscale(1) brightness(.7); }
.mplayer.broken .mp-icon { background: #555; box-shadow: none; }
.mplayer.broken .mp-play { cursor: not-allowed; }
.mplayer.broken .mp-status { color: #f87171; }

@media (max-width: 720px) {
  .mplayer { top: 78px; right: 8px; }
  .mp-stage { width: 88px; height: 88px; }
  .mp-icon { width: 26px; height: 26px; }
  .mp-icon svg { width: 15px; height: 15px; }
  .mp-info { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-disc { animation: none; }
}
