<!-- ========== ВИДЕО-ВИДЖЕТ ========== -->
<style>
  .video-widget {
    position: fixed;
    bottom: 50px;
    left: 50px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: left 1s ease;
  }

  .video-widget-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: auto;
    transition: 0.3s;
    position: relative;
  }

  .video-player {
    position: relative;
    width: 130px;
    height: 190px;
    background: #000;
    cursor: pointer;
    transition: width 0.3s, height 0.3s;
    overflow: hidden;
  }

  .video-player.expanded {
    width: 318px;
    height: 566px;
  }

  .video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Скрываем нативные контролы */
  .video-element::-webkit-media-controls,
  .video-element::-webkit-media-controls-panel,
  .video-element::-webkit-media-controls-play-button,
  .video-element::-webkit-media-controls-start-playback-button {
    display: none !important;
  }

  /* Контролы (звук + закрыть) */
  .video-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
  }

  .video-player:hover .video-controls,
  .video-player.expanded .video-controls {
    opacity: 1;
  }

  .sound-toggle,
  .close-video {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s;
    padding: 0;
  }

  .sound-toggle:hover,
  .close-video:hover {
    background: rgba(0, 0, 0, 0.85);
  }

  .sound-toggle svg,
  .close-video svg {
    fill: none;
    stroke: #fff;
    stroke-width: 1.5;
  }

  /* В свёрнутом виде кнопку звука скрываем */
  .video-player:not(.expanded) .sound-toggle {
    display: none;
  }

  /* Кнопка Play / Pause */
  .play-pause {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 4;
    padding: 0;
  }

  .video-player:hover .play-pause,
  .video-player.expanded .play-pause {
    opacity: 1;
  }

  .play-pause svg {
    width: 18px;
    height: 18px;
  }

  /* Стрелка (когда виджет спрятан) */
  .arrow-line {
    width: 55px;
    height: 100%;
    position: absolute;
    top: 0;
    right: -35px;
    cursor: pointer;
    display: none;
  }

  .arrow-line .line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #bfbfbf;
    top: 50%;
    left: 35px;
    transform-origin: left center;
  }

  .arrow-line .line-top {
    transform: rotate(100deg);
  }

  .arrow-line .line-bottom {
    transform: rotate(-100deg);
  }

  .watch-video {
    position: absolute;
    top: -42px;
    left: 5px;
    font-size: 11px;
    color: #e53935;
    white-space: nowrap;
    animation: blink 1.2s ease 5;
    display: none;
  }

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }

  /* Мобильная версия */
  @media (max-width: 768px) {
    .video-widget {
      bottom: 25px;
      left: 15px;
    }

    .video-player {
      width: 100px;
      height: 145px;
    }

    .video-player.expanded {
      width: 280px;
      height: 500px;
    }

    .video-widget.expanded {
      z-index: 10000;
    }
  }
</style>