.aap-embed {
  max-width: 1000px;
  margin: auto;
}



.aap-player{
  position: relative;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  font-family: Roboto, Arial, sans-serif;
  overflow: hidden;
}

.aap-volume-range {
  display: none !important;
}

.aap-brand{
  /* Part of the layout (not an absolute overlay) so it stays responsive and never covers UI.
     Rendered at the bottom-left of the player in normal flow (so it follows playlist height). */
  width: auto;
  margin-top: 12px;
  display: none;
  pointer-events: none;
  padding-left: 2px;
}

/* Footer row: brand on the left, social links on the right (no dependency on album art). */
.aap-footer{
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.aap-footer-social{
  margin-left: auto;
  width: 260px;
  max-width: 100%;
}

.aap-brand.is-visible{
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

.aap-brand img{
  display: block;
  height: auto;
  max-width: 100%;
}

.aap-main{
  display:flex;
  gap: 12px;
  align-items: stretch;
}

.aap-art-wrap{
  flex: 0 0 auto;
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.aap-art{
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
  display:flex;
  align-items:center;
  justify-content:center;
}
.aap-art-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.aap-social-links{
  display: flex;
  justify-content: flex-end; 
  align-items: center;
  width: 100%;
  margin-top: 14px;
  flex-wrap: nowrap;
  gap: 4px;
}




.aap-social-link{
  width: 32px;
  height: 32px;
  border-radius: 7px;
  
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  box-shadow: 0 0 0 1px #dfdfdf, 0 0 6px rgba(144, 144, 144, 0.45);
}
.aap-social-link:hover{transform: translateY(-1px); filter: brightness(1.05); background: #ffffff24; box-shadow: 0 0 0 2px #dfdfdf, 0 0 6px rgba(181, 181, 181, 0.45);}
.aap-social-link svg{display:block;}

.aap-social-spotify{color:#1DB954;}
.aap-social-facebook{color:#1877F2;}
.aap-social-instagram{color:#E4405F;}
.aap-social-youtube{color:#FF0000;}
.aap-social-tiktok{color:#69C9D0;}
.aap-social-x{color:#111;}

.aap-body{flex:1; min-width:0;}

.aap-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: radial-gradient(circle at center, rgb(0, 80, 151) 0%, rgb(7, 76, 136) 75%);
    padding: 5px;
    border-radius: 5px;
}
.aap-track-meta{min-width: 0; flex-wrap: nowrap; display: flex; flex-direction: row-reverse; gap: 10px;}
.aap-title{font-weight: 700; font-size: 16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color: #399de4; text-shadow: 0 0 6px rgba(57,157,228,.65); margin-left: 5px;}
.aap-artist{font-size: 18px; opacity: .95; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color: #399de4; text-shadow: 0 0 6px rgba(57,157,228,.65); margin-left: 5px; }
.aap-btn,
.aap-control-btn{
  border: 1px solid rgba(0,0,0,.15);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  
  padding: 8px 10px 9px 10px;
  cursor:pointer;
  line-height: 1;
  
  border: 1px solid #b0b0b0;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), inset 0 -1px 2px rgba(0,0,0,0.4), 0 3px 8px rgba(0,0,0,0.3);
  
  transition: all 0.2s ease;
  
  width: 46px;
  height: 32px;

  border-radius: .5em;
  background-image: -webkit-repeating-linear-gradient(left, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,0) 6%, hsla(0,0%,100%, .1) 7.5%), -webkit-repeating-linear-gradient(left, hsla(0,0%, 0%,0) 0%, hsla(0,0%, 0%,0) 4%, hsla(0,0%, 0%,.03) 4.5%), -webkit-repeating-linear-gradient(left, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,0) 1.2%, hsla(0,0%,100%,.15) 2.2%), linear-gradient(180deg, hsl(0,0%,78%) 0%, hsl(0,0%,90%) 47%, hsl(0,0%,78%) 53%, hsl(0,0%,70%)100%);

}
.aap-btn:hover{filter: brightness(0.98); color: #76d2ff;}
.aap-btn-play{font-size: 18px; padding: 10px 12px 12px 12px;}

.aap-btn-icon.aap-icon-play:hover {
  color: #76d2ff;
}

.aap-control-btn.aap-btn-play:hover {
  color: #76d2ff;
}

.aap-control-btn.aap-btn-play:active {
  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.25);
}



.aap-btn:active {
  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.25);
}

.aap-progress{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top: 10px;
}
.aap-time{font-variant-numeric: tabular-nums; font-size: 14px; opacity: .75; width: 44px; text-align:center; background: black; border-radius: 5px;}
.aap-progress-track{
  position:relative;
  height: 8px;
  flex:1;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  overflow:hidden;
  cursor:pointer;
}
.aap-progress-fill{
  position:absolute;
  inset:0;
  width: 0%;
  background: rgba(0,0,0,.35);
}

.aap-controls{
  display:flex;
  gap: 6px;
  align-items:center;
  margin-top: 12px;
  flex-wrap:wrap;
}
.aap-volume{display:flex; gap:8px; align-items:center;}
.aap-volume-range{width: 140px;}

.aap-playlist{
  margin-top: 12px;
  border-top: 1px solid rgba(0,0,0,.1);
  padding-top: 10px;
}
.aap-playlist-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.aap-playlist-items{
  display:flex;
  flex-direction:column;
  gap: 6px;
  max-height: 260px;
  overflow:auto;
}
.aap-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  cursor:pointer;
  background: radial-gradient(ellipse at center, #531010 0%, #351111 100%);
  box-shadow:
  inset 0 0 0 1px rgba(0,0,0,.45),
  inset 0 2px 6px rgba(0,0,0,.55);
}

.aap-btn.aap-control-btn.aap-btn-close-list {
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
}


.aap-item:hover{background: radial-gradient(ellipse at center, #833 0%, #260b0b 100%);}
.aap-item.is-active{background: radial-gradient(ellipse at center, #a63b3b 0%, #621c1c 100%);}

@media (max-width: 640px){
  .aap-main{flex-direction:column;}
  .aap-art{width: 100%; height: 180px;}
  .aap-volume-range{width: 110px;}
}

.aap-visualizer{
  width: 100%;
  height: 70px;
  margin-bottom: 10px;
  border-radius: 12px;
  overflow:hidden;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.08);
}
.aap-visualizer canvas{
  width: 100%;
  height: 100%;
  display:block;
  background: radial-gradient( circle at center, #4a4a4a 0%, #2a2a2a 50%, #000 100% ), linear-gradient( 135deg, #c0c0c0 0%, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%, #c0c0c0 100% );
  background-blend-mode: multiply;
  position: relative;
  overflow: hidden;
}

/* ===== Lyrics panel ===== */
.aap-lyrics-panel{
  width: 100%;
  margin: 0 0 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.05);
}
.aap-lyrics-panel[hidden]{
  display: none;
}
.aap-lyrics-lines{
  padding: 12px 14px;
  text-align: center;
  height: var(--aap-lyrics-max-height, 260px);
  max-height: var(--aap-lyrics-max-height, 260px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: var(--aap-lyrics-font-family, inherit);
  font-size: var(--aap-lyrics-font-size, 16px);
  line-height: 1.4;
  color: var(--aap-lyrics-text-color, #fff);
  background: rgba(0,0,0,var(--aap-lyrics-bg-opacity, .6));
  background-color: var(--aap-lyrics-bg-color, #000);
  background-blend-mode: multiply;
}
.aap-lyrics-line{
  padding: 4px 0;
  transition: opacity .18s ease, transform .18s ease;
}
.aap-lyrics-line.is-current{
  font-weight: 700;
  transform: scale(1.02);
}
.aap-lyrics-line.is-dim{
  opacity: .45;
}
.aap-lyrics-line.aap-lyrics-pad{
  opacity: 0;
  transform: none;
  pointer-events: none;
  user-select: none;
}
.aap-lyrics-empty{
  opacity: .75;
  padding: 6px 0;
}

.aap-item-left{min-width:0; color: #e1e1e1; flex-wrap: nowrap; display: flex; flex-direction: row-reverse; gap: 10px;}
.aap-item-right{display:flex;align-items:center;gap:8px;}
.aap-download{
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.85);
  border-radius: 10px;
  padding: 6px 8px;
  cursor:pointer;
  line-height: 1;
}
.aap-download:hover{filter: brightness(.98); color: #00cfff;}


/* ===== Frontend Knobs (Volume/Balance/Bass/Treble) ===== */
.aap-controls{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.aap-knobs{
  display:flex;
  align-items:flex-end;
  gap:6px;
  margin-left:auto;
}

.aap-knob{
  width:44px;
  height:64px;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  user-select:none;
  touch-action:none;
}

.aap-knob-ring{
  width:44px;
  height:44px;
  border-radius:50%;
  background: conic-gradient(from 225deg, rgba(255,255,255,.25) 0deg, rgba(255,255,255,.25) 270deg, rgba(255,255,255,.08) 270deg, rgba(255,255,255,.08) 360deg);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.25);
  position:relative;
  overflow:hidden;
}

.aap-knob-fill{
  position:absolute;
  inset:0;
  border-radius:50%;
  background: conic-gradient(from 225deg, rgba(74,144,226,.9) 0deg, rgba(74,144,226,.9) 0deg, rgba(255,255,255,0) 0deg, rgba(255,255,255,0) 360deg);
}

.aap-knob-cap{
  position:absolute;
  top:6px;
  width:32px;
  height:32px;
  border-radius:50%;
  background: linear-gradient( 0deg, #bfbcbc 0%, #f0eded 50%, #c3c3c3 100% );
  background-size: auto;
  background-size: 100% 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25), inset 0 1px 1px rgba(255,255,255,.5);
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(91, 91, 91, 0.5);
}

.aap-knob-cap::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #4080b9;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(255, 255, 255, 0.2);
}

.aap-knob-cap:hover::after {
  background: #60a0d9; /* Lighter blue on hover */
}

.aap-knob-indicator{
  width:2px;
  height:12px;
  background: rgba(0,0,0,.55);
  border-radius:1px;
  transform: translateY(-8px);
}

.aap-knob-label{
  margin-top:6px;
  font-size:11px;
  opacity:.85;
  line-height:1;
}

@media (max-width:768px){
  .aap-knobs{ gap:8px; }
  .aap-knob{ width:40px; height:60px; }
  .aap-knob-ring{ width:40px; height:40px; }
  .aap-knob-cap{ width:30px; height:30px; }
}

/* Center album art on smaller screens */
.aap-art-wrap {
    margin-left: auto;
    margin-right: auto;
}

.aap-footer{
   flex-wrap: nowrap;
}

/* Play/Pause icon visibility */
.aap-btn-play .aap-btn-icon.aap-icon-pause { display: none; }
.aap-player.is-playing .aap-btn-play .aap-btn-icon.aap-icon-play { display: none; }
.aap-player.is-playing .aap-btn-play .aap-btn-icon.aap-icon-pause { display: inline-flex; }

/* Inline SVG icons (controls) */
.aap-control-btn .aap-btn-icon { display:inline-flex; align-items:center; justify-content:center; }
.aap-control-btn .aap-btn-icon svg { fill: currentColor; }

.aap-btn-play .aap-btn-icon { display:inline-flex; align-items:center; justify-content:center; }
.aap-btn-play .aap-btn-icon svg { fill: currentColor; }

/* Mute/Unmute icon visibility */
.aap-btn-mute .aap-icon-muted { display: none; }
.aap-player.is-muted .aap-btn-mute .aap-icon-volume { display: none; }
.aap-player.is-muted .aap-btn-mute .aap-icon-muted { display: inline-flex; }

/* Maximize/Minimize icon visibility */
.aap-btn-maximize .aap-icon-minimize { display: none; }
.aap-player.aap-is-maximized .aap-btn-maximize .aap-icon-maximize { display: none; }
.aap-player.aap-is-maximized .aap-btn-maximize .aap-icon-minimize { display: inline-flex; }


/* Ensure play button is stable at first render */
.aap-btn-play {
  width: 48px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
    
}

/* Maximize mode (CSS overlay)
   - Uses fixed positioning with a large inset (200px) for a “stage” look.
   - Keeps the player DOM intact so whatever is open stays open.
*/
.aap-maximize-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 999998;
}

html.aap-maximize-lock .aap-maximize-backdrop,
body.aap-maximize-lock .aap-maximize-backdrop{
  opacity: 1;
  pointer-events: auto;
}

html.aap-maximize-lock,
body.aap-maximize-lock{
  overflow: hidden !important;
}

.aap-player.aap-is-maximized{
  position: fixed;
  top: 50px;
  right: 200px;
  bottom: 50px;
  left: 200px;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  z-index: 999999;
  overflow: auto;
}

@media (max-width: 980px){
  .aap-player.aap-is-maximized{
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;
  }
}


/* Maximize mode: give lyrics more room (karaoke focus) */
.aap-player.aap-is-maximized .aap-lyrics-lines{
  height: auto;
  max-height: none;
}

.aap-playlist-header-text {
  background: black;
  border-radius: 5px;
  padding-left: 8px;
  padding-right: 8px;
}

.aap-btn-close-list {
  display: none !important;
}
