/* --- Liczniki YouTube --- */
.yt-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem 0 1rem;
}

.yt-counter-box {
  min-width: 140px;
}

.yt-counter-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.yt-counter-label {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* --- Galeria YouTube --- */
.yt-gallery {
  margin: 1.5rem 0;
  padding: 0 0 1.5rem;
  max-width: 100%;
  color: inherit;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.yt-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.yt-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

.yt-header small {
  font-size: 0.85rem;
  opacity: 0.8;
}

.yt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.yt-controls label {
  font-size: 0.9rem;
}

.yt-controls select,
.yt-controls input {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
  background: rgba(0,0,0,0.35);
  color: inherit;
}

.yt-controls select:focus,
.yt-controls input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
}

.yt-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.yt-sort button {
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  color: inherit;
}

.yt-sort button:hover {
  background: rgba(255,255,255,0.08);
}

.yt-sort button.active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.7);
  font-weight: 600;
}

#yt-playerContainer {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.9rem;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
}

#yt-playerContainer iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Placeholder odtwarzacza wyświetlany zanim użytkownik zgodzi się na YouTube */
.yt-consent-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-size: cover;
  background-position: center;
}

.yt-consent-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.yt-consent-placeholder p,
.yt-consent-placeholder button {
  position: relative;
  z-index: 1;
}

.yt-consent-placeholder p {
  max-width: 520px;
  margin: 0;
  color: #ddd;
}

.yt-consent-placeholder button {
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  background: #c00;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.yt-consent-placeholder button:hover {
  background: #e00;
}

#yt-videosContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.yt-card {
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.yt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.7);
}

.yt-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: #000;
}

.yt-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-card-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yt-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.yt-meta {
  font-size: 0.75rem;
  opacity: 0.8;
}

.yt-status {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .yt-gallery {
    padding-bottom: 1rem;
  }
  .yt-header h1 {
    font-size: 1.2rem;
  }
}
