.ytube {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--yt-gap, 1rem);
}

.ytube:not(.ytube-started) {
  display: none;
}

.ytube-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-color: black;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);
  width: 320px; /* uprav podle potřeby */
}

/* Poměr stran 16:9 */
.ytube-item:before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

/* Pouze náhledové obrázky a iframe jsou roztáhnuté přes celý prvek */
.ytube-item iframe,
.ytube-item img.ytube-thumbnail {
  object-fit: cover;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0 none;
}

.ytube-item:hover {
  --yt-is: 1.25;
}

/* Původní malá SVG ikona uprostřed – nepoužívá se, ale ponechána pro kompatibilitu */
.ytube-play {
  stroke-width: 3;
  stroke: var(--yt-icon-color, #fff);
  width: var(--yt-icon-size, 3rem);
  transform: scale(var(--yt-is, 1));
  transition: transform 0.3s;
  stroke-linejoin: round;
  fill: none;
  margin: auto;
  z-index: 1;
}

/* Overlay s logem a tlačítkem */
.ytube-logo-overlay {
  position: absolute;
  inset: 0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: opacity 0.3s ease;
  pointer-events: none;
  gap: 16px;
}

/* Logo */
.ytube-logo-full {
  max-width: 70%;
  max-height: 50%;
  object-fit: contain;
  background: white;
  display: block;
}

/* Tlačítko s SVG Play trojúhelníkem */
.ytube-svg-play {
  width: 60px;
  height: 60px;
  animation: pulse 1.5s infinite ease-in-out;
  opacity: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ytube-svg-play svg {
  width: 100%;
  height: 100%;
  fill: black;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.4));
}

/* Animace tlačítka */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Obecné */
body, html {
  min-height: 100vh;
}

*, ::after, ::before {
  box-sizing: border-box;
}