/**
 * Hypnosonica YouTube Curator Styles
 * High-performance styles with lazy thumbnail caching and responsive card interactions
 */

.hypnosonica-yt-gallery {
  width: 100%;
}

.yt-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  background: rgba(18, 22, 34, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 0.5rem 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.yt-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.yt-filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #94a3b8);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.yt-filter-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.yt-filter-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.2), rgba(100, 255, 218, 0.2));
  border-color: var(--pink-glow, #ff2a6d);
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.25);
}

.yt-shuffle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.yt-shuffle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan-glow, #64ffda);
  box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
  transform: translateY(-1px) rotate(1deg);
}

.yt-cards-grid {
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.youtube-session-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.youtube-session-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(100, 255, 218, 0.15);
}

/* HIGH-PERFORMANCE VIDEO FACADE & THUMBNAIL CACHE */
.yt-video-facade {
  position: relative;
  width: 100%;
  height: 210px;
  background: #0d111a;
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
}

.yt-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
  filter: brightness(0.92);
}

.yt-video-facade:hover .yt-thumb-img {
  transform: scale(1.05);
  filter: brightness(1);
}

.yt-facade-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(18, 22, 34, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--cyan-glow, #64ffda);
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(100, 255, 218, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.yt-video-facade:hover .yt-facade-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.85), rgba(100, 255, 218, 0.85));
  border-color: #ffffff;
  box-shadow: 0 0 35px rgba(255, 42, 109, 0.7);
}

.yt-video-facade iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px 12px 0 0;
}

@media (max-width: 768px) {
  .yt-filter-bar {
    border-radius: 16px;
    padding: 0.8rem;
  }
  .yt-filter-group {
    width: 100%;
  }
  .yt-filter-btn {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
  }
  .yt-shuffle-btn {
    width: 100%;
    justify-content: center;
  }
}
