/* Lite YouTube embed — see /js/yt-lite.js */
.yt-lite {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  margin: 14px 0 10px;
  background: #000;
  border: 1px solid rgba(0, 255, 65, 0.35);
  border-radius: 6px;
  overflow: hidden;
}

.yt-lite--compact {
  max-width: 560px;
}

/* No-JS fallback link inside the box */
.yt-lite > a {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ff41;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
}

.yt-lite__btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.yt-lite__btn:focus-visible {
  outline: 2px solid #00ff41;
  outline-offset: -4px;
}

.yt-lite__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.yt-lite__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 52px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #00ff41;
  border-radius: 4px;
  color: #00ff41;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.45);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.yt-lite__btn:hover .yt-lite__play,
.yt-lite__btn:focus-visible .yt-lite__play {
  background: #00ff41;
  color: #000;
  box-shadow: 0 0 22px rgba(0, 255, 65, 0.75);
}

.yt-lite__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 14px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: #00ff41;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-align: left;
}

.yt-lite iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-link {
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .yt-lite__play,
  .tool-card-video {
    transition: none;
  }
}

/* Never show video sections while the page itself is fullscreen */
:root:fullscreen .yt-section,
:root:-webkit-full-screen .yt-section,
.yt-page-fullscreen .yt-section {
  display: none !important;
}

/* Secondary "▶ video" link on a homepage tool card. The card is itself a
   link, so the video link sits beside it in a wrapper rather than inside. */
.tool-card-wrap {
  position: relative;
  display: flex;
}

.tool-card-wrap > .tool-card {
  flex: 1;
}

.tool-card-video {
  position: absolute;
  right: 22px;
  bottom: 22px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #00ff41;
  text-decoration: none;
  transition: transform 0.2s ease;
}

/* Keep card and link moving together on hover (matches .tool-card:hover) */
.tool-card-wrap:hover > .tool-card {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-card-wrap:hover > .tool-card-video {
  transform: translateY(-2px);
}

.tool-card-video:hover,
.tool-card-video:focus-visible {
  text-decoration: underline;
}
