.video-library-shell {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  height: 100vh;
  padding: 20px 18px 36px;
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(40, 45, 48, 0.58);
  backdrop-filter: blur(6px);
}

.video-library-title {
  margin: 10px 0 14px;
  color: #fff;
  font-family: Arial, sans-serif;
  text-align: center;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: 0.05em;
}

.video-library-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 14px;
}

.video-sort-controls label {
  color: #d9ffce;
  margin-right: 8px;
  font-size: 0.95rem;
}

.video-sort-select {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(158, 255, 135, 0.5);
  padding: 8px 10px;
  border-radius: 8px;
}

.video-library-status {
  color: #f0f6c2;
  font-size: 0.9rem;
}

.video-mood-browser {
  margin: 10px 0 16px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 28, 28, 0.68), rgba(12, 16, 16, 0.55));
  border: 1px solid rgba(162, 240, 156, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}

.video-mood-title {
  margin: 0;
  color: #f6ffe9;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.video-mood-subtitle {
  margin: 5px 0 11px;
  color: rgba(222, 238, 212, 0.8);
  font-size: 0.88rem;
}

.video-mood-description {
  margin: 10px 0 0;
  color: rgba(240, 248, 231, 0.86);
  font-size: 0.86rem;
  line-height: 1.35;
  min-height: 1.25rem;
}

.video-mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-mood-chip {
  border: 1px solid rgba(180, 255, 171, 0.28);
  background: rgba(15, 21, 20, 0.76);
  color: #eaffd9;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.84rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 220ms ease,
    background-color 220ms ease, color 220ms ease;
}

.video-mood-chip:hover,
.video-mood-chip:focus-visible {
  border-color: rgba(197, 255, 172, 0.56);
  box-shadow: 0 0 0 1px rgba(197, 255, 172, 0.2), 0 6px 20px rgba(106, 255, 83, 0.16);
  transform: translateY(-1px);
}

.video-mood-chip:focus-visible {
  outline: none;
}

.video-mood-chip.is-active {
  color: #fffce8;
  background: rgba(37, 47, 32, 0.88);
  border-color: rgba(215, 255, 167, 0.72);
  box-shadow: 0 0 0 1px rgba(215, 255, 167, 0.24), 0 10px 22px rgba(132, 255, 82, 0.22);
}

.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.video-gallery-grid--enter {
  animation: video-grid-fade-in 260ms ease both;
}

.video-card {
  border: 1px solid rgba(145, 255, 116, 0.35);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(87, 255, 65, 0.25);
}

.video-library-shell[class*="video-library-shell--mood-"] .video-card {
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease,
    background-color 0.25s ease;
}

.video-library-shell--mood-deep-meditation .video-card {
  border-color: rgba(168, 255, 149, 0.38);
  box-shadow: 0 0 0 1px rgba(115, 230, 98, 0.08);
}

.video-library-shell--mood-dreamlike .video-card {
  border-color: rgba(255, 214, 130, 0.4);
  background: rgba(4, 8, 12, 0.62);
}

.video-library-shell--mood-ancient-tribal .video-card {
  border-color: rgba(255, 181, 88, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 146, 63, 0.08);
}

.video-library-shell--mood-darker-atmosphere .video-card {
  border-color: rgba(128, 170, 114, 0.33);
  background: rgba(8, 10, 11, 0.72);
}

.video-library-shell--mood-nature-sounds .video-card {
  border-color: rgba(142, 236, 121, 0.42);
  box-shadow: 0 0 0 1px rgba(130, 255, 104, 0.08);
}

.video-library-shell--mood-night-listening .video-card {
  border-color: rgba(126, 171, 121, 0.38);
  background: rgba(4, 8, 11, 0.7);
}

.video-card:focus-visible {
  outline: 2px solid #94ff8d;
}

.video-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.video-card-body {
  padding: 10px 12px 12px;
}

.video-card-title {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.3;
}

.video-card-meta {
  margin: 0;
  color: #ccffb6;
  font-size: 0.85rem;
}

.video-gallery-empty {
  color: #fff;
}

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.video-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.video-modal-panel {
  position: relative;
  margin: min(5vh, 36px) auto;
  width: min(92vw, 980px);
  z-index: 1;
}

.video-modal-close {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  cursor: pointer;
}

.video-modal-frame-wrap {
  background: #000;
  border: 1px solid rgba(145, 255, 116, 0.5);
  border-radius: 10px;
  overflow: hidden;
}

.video-modal-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

@keyframes video-grid-fade-in {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .video-mood-browser {
    padding: 12px 11px 11px;
  }

  .video-mood-chip {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
}
