.spector-video-playlist,
.spector-video-playlist * {
box-sizing: border-box;
}

.spector-video-playlist {
width: 100%;
max-width: 1080px;
margin: 0 auto;
font-family: inherit;
}

.svp__shell {
position: relative;
overflow: hidden;
padding: 28px;
background:
linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
#252631;
border: 1px solid rgba(186, 175, 124, 0.34);
border-radius: 10px;
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.svp__shell::before,
.svp__shell::after {
content: "";
position: absolute;
pointer-events: none;
opacity: 0.28;
}

.svp__shell::before {
inset: 0;
background:
radial-gradient(circle at 20% 0%, rgba(186, 175, 124, 0.20), transparent 32%),
radial-gradient(circle at 90% 100%, rgba(255, 255, 255, 0.10), transparent 36%);
}

.svp__shell::after {
right: -80px;
bottom: -90px;
width: 260px;
height: 260px;
border-radius: 50%;
border: 1px solid rgba(186, 175, 124, 0.22);
}

.svp__header,
.svp__grid {
position: relative;
z-index: 1;
}

.svp__header {
margin-bottom: 22px;
text-align: center;
}

.svp__title {
margin: 0 0 8px;
color: #ffffff;
font-size: 28px;
line-height: 1.15;
letter-spacing: 0.02em;
text-transform: uppercase;
}

.svp__subtitle {
max-width: 760px;
margin: 0 auto;
color: rgba(255, 255, 255, 0.72);
font-size: 15px;
line-height: 1.7;
}

.svp__grid {
display: grid;
grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.45fr);
gap: 24px;
align-items: stretch;
}

.spector-video-playlist--layout-left .svp__grid {
grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
}

.spector-video-playlist--layout-left .svp__video-panel {
order: 1;
}

.spector-video-playlist--layout-left .svp__playlist {
order: 2;
}

.spector-video-playlist--layout-right .svp__playlist {
order: 1;
}

.spector-video-playlist--layout-right .svp__video-panel {
order: 2;
}

.spector-video-playlist--layout-bottom .svp__grid {
grid-template-columns: 1fr;
}

.spector-video-playlist--layout-bottom .svp__video-panel {
order: 1;
}

.spector-video-playlist--layout-bottom .svp__playlist {
order: 2;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
max-height: none;
}

.svp__video-panel {
min-width: 0;
}

.svp__video-frame {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
overflow: hidden;
background: #050505;
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.svp__iframe {
position: absolute;
inset: 0;
display: block;
width: 100% !important;
height: 100% !important;
max-width: 100%;
border: 0;
}

.svp__playlist {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
max-height: 500px;
overflow: auto;
padding-right: 4px;
}

.svp__playlist::-webkit-scrollbar {
width: 6px;
}

.svp__playlist::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.06);
border-radius: 999px;
}

.svp__playlist::-webkit-scrollbar-thumb {
background: rgba(186, 175, 124, 0.78);
border-radius: 999px;
}

.svp__item {
position: relative;
display: grid;
grid-template-columns: 38px 24px 1fr;
gap: 10px;
align-items: center;
width: 100%;
min-height: 52px;
padding: 12px 14px;
text-align: left;
color: #2c2c32;
background: rgba(255, 255, 255, 0.96);
border: 1px solid rgba(255, 255, 255, 0.14);
border-left: 4px solid rgba(186, 175, 124, 0.78);
border-radius: 6px;
cursor: pointer;
transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.svp__item:hover,
.svp__item:focus {
outline: none;
transform: translateY(-1px);
background: #ffffff;
border-left-color: #c9b977;
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.svp__item.is-active {
background: #c4b574;
border-left-color: #ffffff;
color: #1f2028;
box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.svp__item-index {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
color: rgba(44, 44, 50, 0.62);
}

.svp__item.is-active .svp__item-index {
color: rgba(31, 32, 40, 0.82);
}

.svp__item-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 50%;
background: #252631;
}

.svp__item-icon::before {
content: "";
display: block;
width: 0;
height: 0;
margin-left: 2px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 8px solid #ffffff;
}

.svp__item.is-active .svp__item-icon {
background: #ffffff;
}

.svp__item.is-active .svp__item-icon::before {
border-left-color: #252631;
}

.svp__item-title {
display: block;
font-size: 14px;
font-weight: 700;
line-height: 1.35;
}

@media (max-width: 991px) {
.svp__shell {
padding: 22px;
}

.svp__grid,
.spector-video-playlist--layout-left .svp__grid,
.spector-video-playlist--layout-right .svp__grid,
.spector-video-playlist--layout-bottom .svp__grid {
grid-template-columns: 1fr;
}

.svp__video-panel {
order: 1 !important;
}

.svp__playlist {
order: 2 !important;
max-height: none;
padding-right: 0;
}

.spector-video-playlist--layout-bottom .svp__playlist {
grid-template-columns: 1fr;
}
}

@media (max-width: 575px) {
.svp__shell {
padding: 16px;
border-radius: 8px;
}

.svp__title {
font-size: 22px;
}

.svp__subtitle {
font-size: 14px;
}

.svp__item {
grid-template-columns: 30px 22px 1fr;
padding: 11px 12px;
}

.svp__item-title {
font-size: 13px;
}
}

/* Phase 1-B — Alignment Fix + Player Equalizer */
.svp__item {
align-items: flex-start;
grid-template-columns: 38px 24px minmax(0, 1fr);
}

.svp__item-index,
.svp__item-icon {
margin-top: 2px;
flex-shrink: 0;
}

.svp__item-title {
padding-top: 1px;
}

.svp__equalizer {
position: relative;
overflow: hidden;
min-height: 148px;
margin-top: 14px;
padding: 20px 22px 18px;
background:
linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
radial-gradient(circle at 50% 0%, rgba(196,181,116,0.12), transparent 44%),
radial-gradient(circle at 15% 100%, rgba(255,255,255,0.07), transparent 36%),
#252631;
border: 1px solid rgba(186, 175, 124, 0.26);
border-radius: 8px;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.svp__equalizer::before {
content: "";
position: absolute;
inset: 0;
opacity: 0.18;
background-image:
linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
background-size: 26px 26px;
pointer-events: none;
}

.svp__equalizer::after {
content: "";
position: absolute;
left: 24px;
right: 24px;
bottom: 28px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(196,181,116,0.55), transparent);
opacity: 0.7;
}

.svp__equalizer-glow {
position: absolute;
left: 50%;
bottom: -80px;
width: 360px;
height: 160px;
transform: translateX(-50%);
border-radius: 50%;
background: radial-gradient(circle, rgba(196,181,116,0.28), transparent 64%);
opacity: 0.38;
pointer-events: none;
}

.svp__equalizer-bars {
position: relative;
z-index: 1;
display: flex;
align-items: flex-end;
justify-content: center;
gap: clamp(4px, 0.65vw, 8px);
height: 104px;
width: 100%;
}

.svp__equalizer-bar {
display: block;
width: clamp(4px, 0.55vw, 8px);
height: 18%;
min-height: 12px;
border-radius: 999px 999px 2px 2px;
background: linear-gradient(180deg, #ffffff 0%, #c4b574 42%, #7f7546 100%);
box-shadow:
0 0 10px rgba(196,181,116,0.32),
0 0 22px rgba(196,181,116,0.14);
opacity: 0.56;
transform-origin: bottom center;
animation: svpEqualizerIdle 2.8s ease-in-out infinite;
animation-delay: calc(var(--svp-bar-index) * -0.07s);
}

.spector-video-playlist.is-playing .svp__equalizer-bar {
opacity: 0.95;
animation-name: svpEqualizerLive;
animation-duration: 0.95s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-delay: calc(var(--svp-bar-index) * -0.045s);
}

.spector-video-playlist.is-buffering .svp__equalizer-bar {
opacity: 0.75;
animation-name: svpEqualizerBuffer;
animation-duration: 1.25s;
}

@keyframes svpEqualizerIdle {
0%, 100% {
height: 18%;
}
50% {
height: 32%;
}
}

@keyframes svpEqualizerBuffer {
0%, 100% {
height: 22%;
}
50% {
height: 54%;
}
}

@keyframes svpEqualizerLive {
0% {
height: 18%;
}
18% {
height: calc(28% + (var(--svp-bar-index) % 5) * 9%);
}
36% {
height: calc(45% + (var(--svp-bar-index) % 7) * 7%);
}
58% {
height: calc(24% + (var(--svp-bar-index) % 4) * 12%);
}
78% {
height: calc(52% + (var(--svp-bar-index) % 6) * 6%);
}
100% {
height: 18%;
}
}

@media (max-width: 991px) {
.svp__equalizer {
min-height: 96px;
padding: 14px 14px 12px;
}

.svp__equalizer-bars {
height: 62px;
gap: 4px;
}

.svp__equalizer-bar {
width: 5px;
}
}

@media (max-width: 575px) {
.svp__item {
align-items: flex-start;
grid-template-columns: 30px 22px minmax(0, 1fr);
}

.svp__equalizer {
display: none;
}
}

/* Phase 1-C — Title Vertical Center + Live Equalizer Fix */
.svp__item {
align-items: center;
grid-template-columns: 38px 24px minmax(0, 1fr);
}

.svp__item-index,
.svp__item-icon {
margin-top: 0;
align-self: center;
}

.svp__item-title {
display: flex;
align-items: center;
min-height: 24px;
padding-top: 0;
line-height: 1.28;
}

/* Equalizer amplitude map — valid CSS variables, no unsupported modulo */
.svp__equalizer-bar {
--svp-h1: 22%;
--svp-h2: 58%;
--svp-h3: 34%;
--svp-h4: 76%;
--svp-speed: 0.95s;
animation: svpEqualizerIdleV2 2.6s ease-in-out infinite;
animation-delay: calc(var(--svp-bar-index) * -0.055s);
will-change: height, opacity, transform;
}

.svp__equalizer-bar:nth-child(6n+1) {
--svp-h1: 18%;
--svp-h2: 72%;
--svp-h3: 30%;
--svp-h4: 88%;
--svp-speed: 0.82s;
}

.svp__equalizer-bar:nth-child(6n+2) {
--svp-h1: 26%;
--svp-h2: 46%;
--svp-h3: 68%;
--svp-h4: 38%;
--svp-speed: 1.05s;
}

.svp__equalizer-bar:nth-child(6n+3) {
--svp-h1: 14%;
--svp-h2: 84%;
--svp-h3: 44%;
--svp-h4: 62%;
--svp-speed: 0.74s;
}

.svp__equalizer-bar:nth-child(6n+4) {
--svp-h1: 32%;
--svp-h2: 60%;
--svp-h3: 24%;
--svp-h4: 78%;
--svp-speed: 0.91s;
}

.svp__equalizer-bar:nth-child(6n+5) {
--svp-h1: 20%;
--svp-h2: 36%;
--svp-h3: 82%;
--svp-h4: 52%;
--svp-speed: 1.12s;
}

.svp__equalizer-bar:nth-child(6n+6) {
--svp-h1: 28%;
--svp-h2: 66%;
--svp-h3: 38%;
--svp-h4: 92%;
--svp-speed: 0.86s;
}

.spector-video-playlist.is-playing .svp__equalizer-bar,
.spector-video-playlist.is-visualizing .svp__equalizer-bar {
opacity: 0.96;
animation-name: svpEqualizerLiveV2;
animation-duration: var(--svp-speed);
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-delay: calc(var(--svp-bar-index) * -0.042s);
}

.spector-video-playlist.is-buffering .svp__equalizer-bar {
opacity: 0.78;
animation-name: svpEqualizerBufferV2;
animation-duration: 1.05s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}

@keyframes svpEqualizerIdleV2 {
0%, 100% {
height: 16%;
opacity: 0.46;
}
50% {
height: 30%;
opacity: 0.68;
}
}

@keyframes svpEqualizerBufferV2 {
0%, 100% {
height: 22%;
}
50% {
height: 54%;
}
}

@keyframes svpEqualizerLiveV2 {
0% {
height: var(--svp-h1);
transform: scaleY(0.98);
}
20% {
height: var(--svp-h2);
transform: scaleY(1.02);
}
43% {
height: var(--svp-h3);
transform: scaleY(0.96);
}
67% {
height: var(--svp-h4);
transform: scaleY(1.04);
}
82% {
height: 42%;
transform: scaleY(0.99);
}
100% {
height: var(--svp-h1);
transform: scaleY(1);
}
}

.spector-video-playlist.is-playing .svp__equalizer {
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.08),
0 0 28px rgba(196,181,116,0.10);
}

.spector-video-playlist.is-playing .svp__equalizer-glow,
.spector-video-playlist.is-visualizing .svp__equalizer-glow {
opacity: 0.58;
animation: svpEqualizerGlowPulse 1.6s ease-in-out infinite;
}

@keyframes svpEqualizerGlowPulse {
0%, 100% {
transform: translateX(-50%) scale(0.96);
opacity: 0.38;
}
50% {
transform: translateX(-50%) scale(1.08);
opacity: 0.62;
}
}

@media (max-width: 575px) {
.svp__item {
align-items: center;
grid-template-columns: 30px 22px minmax(0, 1fr);
}

.svp__item-title {
min-height: 22px;
}
}

/* Phase 1-2-3 Final — Polished playlist alignment + optional real equalizer */
.svp__item {
align-items: center;
grid-template-columns: 38px 24px minmax(0, 1fr);
}

.svp__item-index,
.svp__item-icon {
margin-top: 0;
align-self: center;
}

.svp__item-title {
display: flex;
align-items: center;
min-height: 24px;
padding-top: 0;
line-height: 1.28;
}

.svp__equalizer-bar {
--svp-h1: 22%;
--svp-h2: 58%;
--svp-h3: 34%;
--svp-h4: 76%;
--svp-speed: 0.95s;
animation: svpEqualizerIdleFinal 2.6s ease-in-out infinite;
animation-delay: calc(var(--svp-bar-index) * -0.055s);
will-change: height, opacity, transform;
}

.svp__equalizer-bar:nth-child(6n+1) {
--svp-h1: 18%;
--svp-h2: 72%;
--svp-h3: 30%;
--svp-h4: 88%;
--svp-speed: 0.82s;
}

.svp__equalizer-bar:nth-child(6n+2) {
--svp-h1: 26%;
--svp-h2: 46%;
--svp-h3: 68%;
--svp-h4: 38%;
--svp-speed: 1.05s;
}

.svp__equalizer-bar:nth-child(6n+3) {
--svp-h1: 14%;
--svp-h2: 84%;
--svp-h3: 44%;
--svp-h4: 62%;
--svp-speed: 0.74s;
}

.svp__equalizer-bar:nth-child(6n+4) {
--svp-h1: 32%;
--svp-h2: 60%;
--svp-h3: 24%;
--svp-h4: 78%;
--svp-speed: 0.91s;
}

.svp__equalizer-bar:nth-child(6n+5) {
--svp-h1: 20%;
--svp-h2: 36%;
--svp-h3: 82%;
--svp-h4: 52%;
--svp-speed: 1.12s;
}

.svp__equalizer-bar:nth-child(6n+6) {
--svp-h1: 28%;
--svp-h2: 66%;
--svp-h3: 38%;
--svp-h4: 92%;
--svp-speed: 0.86s;
}

.spector-video-playlist.is-playing .svp__equalizer-bar,
.spector-video-playlist.is-visualizing .svp__equalizer-bar {
opacity: 0.96;
animation-name: svpEqualizerLiveFinal;
animation-duration: var(--svp-speed);
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-delay: calc(var(--svp-bar-index) * -0.042s);
}

.spector-video-playlist.has-real-equalizer .svp__equalizer-bar {
animation: none !important;
transition: height 0.08s linear, opacity 0.08s linear;
}

.spector-video-playlist.is-buffering .svp__equalizer-bar {
opacity: 0.78;
animation-name: svpEqualizerBufferFinal;
animation-duration: 1.05s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}

@keyframes svpEqualizerIdleFinal {
0%, 100% {
height: 16%;
opacity: 0.46;
}
50% {
height: 30%;
opacity: 0.68;
}
}

@keyframes svpEqualizerBufferFinal {
0%, 100% {
height: 22%;
}
50% {
height: 54%;
}
}

@keyframes svpEqualizerLiveFinal {
0% {
height: var(--svp-h1);
transform: scaleY(0.98);
}
20% {
height: var(--svp-h2);
transform: scaleY(1.02);
}
43% {
height: var(--svp-h3);
transform: scaleY(0.96);
}
67% {
height: var(--svp-h4);
transform: scaleY(1.04);
}
82% {
height: 42%;
transform: scaleY(0.99);
}
100% {
height: var(--svp-h1);
transform: scaleY(1);
}
}

.spector-video-playlist.is-playing .svp__equalizer,
.spector-video-playlist.is-visualizing .svp__equalizer {
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.08),
0 0 28px rgba(196,181,116,0.10);
}

.spector-video-playlist.is-playing .svp__equalizer-glow,
.spector-video-playlist.is-visualizing .svp__equalizer-glow {
opacity: 0.58;
animation: svpEqualizerGlowPulseFinal 1.6s ease-in-out infinite;
}

.spector-video-playlist.has-real-equalizer .svp__equalizer-glow {
opacity: 0.72;
}

.spector-video-playlist.has-equalizer-error .svp__equalizer {
border-color: rgba(196,181,116,0.4);
}

@keyframes svpEqualizerGlowPulseFinal {
0%, 100% {
transform: translateX(-50%) scale(0.96);
opacity: 0.38;
}
50% {
transform: translateX(-50%) scale(1.08);
opacity: 0.62;
}
}

.svp__audio {
display: none;
}

@media (max-width: 575px) {
.svp__item {
align-items: center;
grid-template-columns: 30px 22px minmax(0, 1fr);
}

.svp__item-title {
min-height: 22px;
}
}

/* Phase 1-2-3 Mobile Equalizer Restore */
@media (max-width: 575px) {
.svp__equalizer {
display: block !important;
min-height: 86px;
margin-top: 12px;
padding: 12px 10px 10px;
border-radius: 7px;
}

.svp__equalizer-bars {
height: 54px;
gap: 3px;
}

.svp__equalizer-bar {
width: 4px;
min-height: 7px;
}

.svp__equalizer::after {
left: 14px;
right: 14px;
bottom: 18px;
}

.svp__equalizer-glow {
width: 220px;
height: 100px;
bottom: -54px;
}
}

/* Phase 4 — Wider Desktop Layout */
@media (min-width: 992px) {
.spector-video-playlist {
width: 100%;
max-width: 1240px;
}

.svp__shell {
padding: 30px;
}

.svp__grid {
grid-template-columns: 390px minmax(0, 1fr);
gap: 30px;
}

.spector-video-playlist--layout-left .svp__grid {
grid-template-columns: minmax(0, 1fr) 390px;
}

.spector-video-playlist--layout-bottom .svp__grid {
grid-template-columns: 1fr;
}

.svp__playlist {
max-height: 575px;
}

.svp__video-frame {
width: 100%;
}

.svp__equalizer {
width: 100%;
}
}

@media (min-width: 1400px) {
.spector-video-playlist {
max-width: 1320px;
}

.svp__grid {
grid-template-columns: 410px minmax(0, 1fr);
gap: 34px;
}

.spector-video-playlist--layout-left .svp__grid {
grid-template-columns: minmax(0, 1fr) 410px;
}

.svp__playlist {
max-height: 610px;
}
}

/* Keep tablet and mobile fully responsive */
@media (max-width: 991px) {
.spector-video-playlist {
max-width: 100%;
}

.svp__grid,
.spector-video-playlist--layout-left .svp__grid,
.spector-video-playlist--layout-right .svp__grid,
.spector-video-playlist--layout-bottom .svp__grid {
grid-template-columns: 1fr;
}
}
