/* =========================================================
   YouTube 自动播放（直接 iframe + enablejsapi）
   控件：播放/暂停、静音切换、跳转 YouTube
   用法：页面引入本文件 + gt-youtube-autoplay.js
   ========================================================= */

.gt-video-embed {
  position: relative;
  width: 100%;
  line-height: 0;
  background: #000;
  overflow: hidden;
}

.gt-video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* 暂停时加一层遮罩，盖住 YouTube 自带的大播放图标 */
.gt-video-embed.is-paused::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  line-height: 0;
}

/* 控制条 */
.gt-video-embed .gt-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  line-height: 1;
}
.gt-video-embed:hover .gt-video-controls,
.gt-video-embed.is-paused .gt-video-controls {
  opacity: 1;
  visibility: visible;
}

.gt-video-embed .gt-video-controls button,
.gt-video-embed .gt-video-controls a.gt-video-link {
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.gt-video-embed .gt-video-controls button:hover,
.gt-video-embed .gt-video-controls a.gt-video-link:hover {
  background: var(--gt-theme, #49AF45);
  border-color: var(--gt-theme, #49AF45);
  color: #fff;
}
.gt-video-embed .gt-video-controls a.gt-video-link {
  margin-left: auto;
}


@media (max-width: 767px) {
  .gt-video-embed .gt-video-controls {
    opacity: 1;
    visibility: visible;
    gap: 8px;
    padding: 10px 12px;
  }
  .gt-video-embed .gt-video-controls button,
  .gt-video-embed .gt-video-controls a.gt-video-link {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

.gt-video-embed.is-cover iframe {
  transform: scale(1.75);
  transform-origin: center center;
}
