/* Стили плеера скомпонованы из макета «Приключения Фонтанчика»,
   скоупнуты классом .sx-player-shell, чтобы не влиять на остальной сайт. */

.sx-player-shell {
  --sx-accent: #7c5cff;
  --sx-accent-glow: rgba(124, 92, 255, .45);
  --sx-text: #eef0f6;
  --sx-muted: #9aa1b5;

  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
  outline: none;
  margin: 1.5rem 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.sx-player-shell video {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.sx-big-play {
  position: absolute; inset: 0; margin: auto;
  width: 92px; height: 92px;
  border: none; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center;
  background: rgba(124, 92, 255, .18);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 10px 40px var(--sx-accent-glow);
  transition: transform .25s ease, opacity .25s ease, background .25s;
}
.sx-big-play:hover { transform: scale(1.07); background: rgba(124, 92, 255, .3); }
.sx-big-play.sx-hidden { opacity: 0; pointer-events: none; transform: scale(1.4); }
.sx-big-play svg { width: 34px; height: 34px; fill: #fff; margin-left: 5px; }

.sx-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 16px 12px;
  background: linear-gradient(transparent, rgba(5, 7, 12, .88));
  transition: opacity .35s ease;
}
.sx-player-shell.sx-idle .sx-controls,
.sx-player-shell.sx-idle .sx-big-play { opacity: 0; pointer-events: none; }
.sx-player-shell.sx-playing:not(:hover) .sx-controls { opacity: 0; }

.sx-progress {
  position: relative;
  height: 5px; border-radius: 99px;
  background: rgba(255, 255, 255, .16);
  cursor: pointer;
  transition: height .2s;
}
.sx-progress:hover { height: 8px; }
.sx-buffered {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .18);
}
.sx-filled {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sx-accent), #b18cff);
  box-shadow: 0 0 12px var(--sx-accent-glow);
}
.sx-thumb {
  position: absolute; top: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  transition: transform .2s;
}
.sx-progress:hover .sx-thumb { transform: translate(-50%, -50%) scale(1); }

.sx-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
  color: var(--sx-text);
}
.sx-ctrl {
  border: none; background: transparent;
  color: var(--sx-text);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s, color .2s;
  padding: 0;
}
.sx-ctrl:hover { background: rgba(255, 255, 255, .12); }
.sx-ctrl svg { width: 20px; height: 20px; fill: currentColor; }

.sx-time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--sx-muted);
  margin: 0 6px;
  white-space: nowrap;
}
.sx-time b { color: var(--sx-text); font-weight: 500; }
.sx-spacer { flex: 1; }

.sx-player-shell input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 0; height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, .25);
  outline: none; cursor: pointer;
  transition: width .25s ease;
}
.sx-player-shell .sx-row:hover input[type="range"],
.sx-player-shell input[type="range"]:focus { width: 80px; }
.sx-player-shell input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px var(--sx-accent-glow);
}
.sx-player-shell input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border: none; border-radius: 50%; background: #fff;
}

.sx-speed {
  border: none;
  background: rgba(255, 255, 255, .1);
  color: var(--sx-text);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.sx-speed:hover { background: rgba(255, 255, 255, .2); }
.sx-speed option { background: #161a24; }

.sx-player-shell.sx-broken::after {
  content: 'Не удалось загрузить видео.';
  position: absolute; inset: 0;
  display: grid; place-content: center;
  color: var(--sx-muted);
  font-size: 14px;
  background: #0b0d12;
}