/* ============================================================
   SEVEN PLAYER
   ============================================================ */
.sp {
  --sp-ui: rgba(8, 14, 24, .72);
  --sp-line: rgba(140, 200, 235, .18);
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(10px, 2.5vw, 28px);
}
.sp[hidden] { display: none; }
.sp__backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 80% 100%, rgba(60,140,240,.28), transparent 70%),
    radial-gradient(40% 40% at 0% 0%, rgba(140,200,235,.14), transparent 70%),
    rgba(5, 8, 14, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: spFade .35s ease both;
}
.sp__shell {
  position: relative; width: min(1380px, 100%); max-height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  animation: spIn .5s var(--ease) both;
}
@keyframes spFade { from { opacity: 0; } }
@keyframes spIn { from { opacity: 0; transform: translateY(16px) scale(.985); } }

/* ---------- topo ---------- */
.sp__top { display: flex; align-items: center; gap: 16px; }
.sp__brand { display: inline-flex; align-items: center; gap: 12px; }
.sp__brand img { height: 18px; width: auto; }
.sp__count {
  margin-left: auto; font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: .08em;
  color: var(--tinta-suave); font-variant-numeric: tabular-nums;
}

/* ---------- botões de ícone ---------- */
.sp__icon {
  flex: none; width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 0; background: transparent; color: var(--tinta); cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.sp__icon svg { width: 20px; height: 20px; }
.sp__icon:hover { background: rgba(255,255,255,.12); }
.sp__icon:active { transform: scale(.92); }
.sp__icon:disabled { opacity: .3; pointer-events: none; }
.sp__icon[hidden] { display: none; }
.sp__close { border: 1px solid var(--sp-line); }
.sp__close:hover { background: var(--tinta); color: var(--fundo); }

/* ---------- layout ---------- */
.sp__main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; min-height: 0; }

/* ---------- palco ---------- */
.sp__stage {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  max-height: calc(100svh - 120px);
  border-radius: var(--r-lg); overflow: hidden; background: #000;
  border: 1px solid var(--sp-line);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4);
  isolation: isolate;
}
.sp--vertical .sp__stage { aspect-ratio: 9 / 16; width: auto; height: min(78svh, 820px); margin: 0 auto; }
.sp__video, .sp__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* capa enquanto carrega / no fim */
.sp__poster {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: #05080e center / cover no-repeat;
  transition: opacity .6s ease;
}
.sp__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,8,14,.85), rgba(5,8,14,.25) 60%); }
.sp.has-started:not(.is-ended) .sp__poster, .sp.native-ready .sp__poster { opacity: 0; }

/* camada que recebe os cliques (esconde a interface do YouTube) */
.sp__hit { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: transparent; cursor: pointer; }
.sp.is-playing:not(.show-ui) .sp__hit { cursor: none; }
.sp.is-native .sp__hit, .sp.is-empty .sp__hit { display: none; }
.sp.is-native .sp__video { background: #fff; }

/* cantos de visor + HUD de gravação */
.sp__vf { position: absolute; inset: 18px; z-index: 3; pointer-events: none; transition: opacity .4s; }
.sp__vf i { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.55); }
.sp__vf i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.sp__vf i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.sp__vf i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.sp__vf i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.sp__hud {
  position: absolute; z-index: 3; top: 26px; left: 34px; right: 34px; pointer-events: none;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 800; letter-spacing: .16em; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6); transition: opacity .4s;
}
.sp__rec { display: inline-flex; align-items: center; gap: 8px; }
.sp__tc { font-variant-numeric: tabular-nums; }
.sp:not(.is-playing) .sp__rec .rec__dot { animation: none; background: var(--tinta-suave); }
.sp.is-playing:not(.show-ui) .sp__vf, .sp.is-playing:not(.show-ui) .sp__hud { opacity: 0; }
.sp.is-native .sp__vf, .sp.is-native .sp__hud, .sp.is-empty .sp__hud { display: none; }

/* play grande */
.sp__big {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px;
  border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  background: var(--laranja); color: var(--sobre-laranja);
  box-shadow: 0 0 0 10px rgba(245,107,41,.18), 0 20px 50px -10px rgba(245,107,41,.6);
  transition: opacity .3s, transform .4s var(--ease);
}
.sp__big svg { width: 34px; height: 34px; margin-left: 5px; }
.sp.is-playing .sp__big, .sp.is-loading .sp__big, .sp.is-native .sp__big, .sp.is-empty .sp__big { opacity: 0; transform: scale(.7); }
.sp__big.pulse { animation: spPulse .5s var(--ease); }
@keyframes spPulse { 50% { transform: scale(1.12); } }

/* carregando */
.sp__loader {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--laranja);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.sp.is-loading .sp__loader { opacity: 1; animation: spSpin .8s linear infinite; }
@keyframes spSpin { to { transform: rotate(360deg); } }

.sp__soon { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; text-align: center; gap: 6px; color: var(--tinta-suave); padding: 24px; }
.sp__soon b { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--tinta); text-transform: uppercase; }

/* ---------- barra de controles ---------- */
.sp__controls {
  position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px;
  padding: 10px 12px 6px; border-radius: var(--r-md);
  background: var(--sp-ui); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: opacity .35s, transform .35s var(--ease);
}
.sp.is-playing:not(.show-ui) .sp__controls { opacity: 0; transform: translateY(12px); pointer-events: none; }
.sp.is-native .sp__controls, .sp.is-empty .sp__controls { display: none; }

.sp__bar { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.sp__bar::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); transition: height .2s; }
.sp__buf, .sp__prog { position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; transform-origin: left; transform: scaleX(0); transition: height .2s; }
.sp__buf { background: rgba(140,200,235,.35); }
.sp__prog { background: linear-gradient(90deg, #ff9a5c, var(--laranja)); }
.sp__bar:hover::before, .sp__bar:hover .sp__buf, .sp__bar:hover .sp__prog, .sp.is-seeking .sp__bar::before, .sp.is-seeking .sp__prog { height: 7px; }
/* bolinha: fica fora do scaleX para não distorcer */
.sp__knob { display: none; }
.sp__bar::after {
  content: ""; position: absolute; top: 50%; left: calc(var(--knob, 0) * 100%);
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(245,107,41,.45);
  transform: scale(0); transition: transform .2s var(--ease);
}
.sp__bar:hover::after, .sp.is-seeking .sp__bar::after, .sp__bar:focus-visible::after { transform: scale(1); }
.sp__tip {
  position: absolute; bottom: 22px; left: 0; transform: translateX(-50%);
  padding: 3px 8px; border-radius: 6px; background: #fff; color: var(--sobre-pilula);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.sp__bar:hover .sp__tip { opacity: 1; }

.sp__row { display: flex; align-items: center; gap: 2px; }
.sp__play { width: 48px; height: 48px; background: var(--tinta); color: var(--fundo); margin: 0 4px; }
.sp__play:hover { background: var(--laranja); color: var(--sobre-laranja); }
.sp__play .i-pause, .sp.is-playing .sp__play .i-play { display: none; }
.sp.is-playing .sp__play .i-pause { display: block; }
.sp__play .i-play { margin-left: 3px; }
.sp__time { margin-left: 10px; font-size: 14px; color: var(--tinta-suave); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp__time b { color: var(--tinta); font-weight: 800; }
.sp__spacer { flex: 1; }

.sp__vol { display: flex; align-items: center; }
#spMute .i-mute, .sp.is-muted #spMute .i-vol { display: none; }
.sp.is-muted #spMute .i-mute { display: block; }
.sp__vol input {
  --v: 100%;
  width: 0; opacity: 0; margin: 0; transition: width .3s var(--ease), opacity .3s, margin .3s;
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, var(--tinta) var(--v), rgba(255,255,255,.2) var(--v));
}
.sp__vol:hover input, .sp__vol:focus-within input { width: 84px; opacity: 1; margin: 0 10px 0 2px; }
.sp__vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.sp__vol input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }

#spFull .i-exit { display: none; }
.sp.is-full #spFull .i-exit, .sp.sp--max #spFull .i-exit { display: block; }
.sp.is-full #spFull .i-full, .sp.sp--max #spFull .i-full { display: none; }

/* tela cheia real e "falsa" (iPhone) */
.sp__stage:fullscreen { max-height: none; border-radius: 0; border: 0; aspect-ratio: auto; }
.sp__stage:-webkit-full-screen { max-height: none; border-radius: 0; border: 0; }
.sp.sp--max { padding: 0; }
.sp.sp--max .sp__top, .sp.sp--max .sp__side { display: none; }
.sp.sp--max .sp__shell { width: 100%; height: 100%; }
.sp.sp--max .sp__main { display: block; height: 100%; }
.sp.sp--max .sp__stage { height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; border: 0; }

/* ---------- painel lateral ---------- */
.sp__side {
  display: flex; flex-direction: column; min-height: 0; max-height: calc(100svh - 120px);
  padding: 22px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(50,95,145,.32), rgba(10,18,32,.6));
  border: 1px solid var(--sp-line);
}
.sp__side .card__tag { align-self: flex-start; }
.sp__title { margin: 6px 0 4px; font-family: var(--display); font-weight: 600; font-size: clamp(34px, 3vw, 44px); line-height: .92; text-transform: uppercase; }
.sp__client { margin: 0 0 18px; color: var(--tinta-suave); font-size: 14px; }
.sp__cta { align-self: flex-start; margin-bottom: 22px; }
.sp__label { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-suave); }
.sp.is-single .sp__label, .sp.is-single .sp__list { display: none; }

.sp__list {
  list-style: none; margin: 0 -8px; padding: 0 8px; flex: 1; min-height: 0;
  overflow-y: auto; display: grid; gap: 6px; align-content: start;
  scrollbar-width: thin; scrollbar-color: rgba(140,200,235,.3) transparent;
}
.sp__list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: var(--r-md);
  border: 1px solid transparent; background: transparent; text-align: left; cursor: pointer; color: var(--tinta);
  transition: background .2s, border-color .2s;
}
.sp__list button:hover { background: rgba(255,255,255,.06); }
.sp__list .is-current button { background: rgba(245,107,41,.12); border-color: rgba(245,107,41,.45); }
.sp__thumb {
  position: relative; flex: none; width: 104px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden;
  background: #0c1626 center / cover no-repeat;
}
.sp__now {
  position: absolute; inset: 0; display: none; place-items: center;
  background: rgba(8,12,20,.6); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.sp__now::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--laranja); display: inline-block; }
.is-current .sp__now { display: flex; align-items: center; justify-content: center; }
.sp__meta { min-width: 0; display: grid; gap: 2px; }
.sp__meta b { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: .95; text-transform: uppercase; }
.sp__meta small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-suave); }

.sp__keys { margin: 14px 0 0; font-size: 11px; color: var(--tinta-suave); line-height: 1.9; }
.sp__keys kbd {
  display: inline-block; min-width: 20px; padding: 0 5px; margin: 0 1px; border-radius: 5px; text-align: center;
  border: 1px solid var(--sp-line); background: rgba(255,255,255,.05); font: 700 10px/18px var(--sans); color: var(--tinta);
}

/* ---------- responsivo ---------- */
@media (max-width: 1000px) {
  .sp { align-items: flex-start; overflow-y: auto; }
  .sp__main { grid-template-columns: minmax(0, 1fr); }
  .sp__shell, .sp__side { min-width: 0; }
  .sp__side { max-height: none; }
  .sp__list { display: flex; overflow-x: auto; overflow-y: hidden; gap: 10px; padding-bottom: 6px; }
  .sp__list li { flex: none; width: 200px; }
  .sp__list button { flex-direction: column; align-items: stretch; gap: 8px; }
  .sp__thumb { width: 100%; }
  .sp__keys { display: none; }
}
@media (max-width: 620px) {
  .sp { padding: 10px; }
  .sp__stage { border-radius: var(--r-md); }
  .sp__controls { left: 6px; right: 6px; bottom: 6px; padding: 6px 8px 4px; }
  .sp__hud { top: 16px; left: 22px; right: 22px; font-size: 10px; }
  .sp__vf { inset: 10px; }
  .sp__vf i { width: 14px; height: 14px; }
  .sp__big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .sp__big svg { width: 26px; height: 26px; }
  .sp__icon { width: 36px; height: 36px; }
  .sp__icon svg { width: 18px; height: 18px; }
  .sp__play { width: 40px; height: 40px; }
  #spPrev, #spNext, .sp__vol input { display: none; }
  .sp__time { font-size: 12px; margin-left: 4px; }
  .sp__brand img { height: 15px; }
  .sp__side { padding: 18px; }
  .sp__list li { width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp__shell, .sp__backdrop { animation: none; }
}
