/* ==========================================================================
   BassTheWorld — Videos Page Styles (YouTube-Style Shelves)
   ========================================================================== */

.videos-page {
  background: #0a0b0b;
  color: #f5f1eb;
}

.videos-main {
  padding-top: 104px;
}

/* Hero Section */
.video-library-hero {
  position: relative;
  overflow: hidden;
  padding: 36px 0 18px;
  border-bottom: 1px solid #242220;
  background: radial-gradient(ellipse at 50% 0%, #58361955, #1e150d40 30%, transparent 60%),
              linear-gradient(180deg, #0d0e0e 0%, #0a0b0b 100%);
}

.video-library-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 10% 40%, rgba(181, 121, 38, 0.12), transparent 35%),
              radial-gradient(circle at 90% 40%, rgba(181, 121, 38, 0.08), transparent 35%);
}

.video-library-heading {
  position: relative;
  text-align: center;
}

.video-library-heading h1 {
  margin: 0;
  color: #f7f3ee;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3.2rem, 5.2vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -.06em;
  line-height: 1;
  text-transform: uppercase;
}

.video-hero-rhythm {
  position: absolute;
  top: 36px;
  left: max(5vw, 36px);
  color: #7b7874;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .32em;
  line-height: 2.1;
  text-transform: uppercase;
}

.video-hero-rhythm::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin-top: 16px;
  background: #c4893f;
}

.video-hero-note {
  position: absolute;
  top: 28px;
  right: max(5vw, 45px);
  margin: 0;
  color: #b67a2d;
  font-family: "Alex Brush", cursive;
  font-size: clamp(1.5rem, 2.2vw, 2.3rem);
  line-height: .9;
  text-align: center;
  transform: rotate(-10deg);
}

/* Playlist Navigation Tabs (Bigger Font as requested) */
.playlist-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 26px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.playlist-tabs::-webkit-scrollbar {
  display: none;
}

.playlist-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid #383430;
  border-radius: 999px;
  background: rgba(23, 22, 20, 0.85);
  color: #e5e0d8;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.playlist-tab span {
  font-size: 1.05rem;
  color: #d49a54;
  line-height: 1;
  transition: transform 0.2s ease;
}

.playlist-tab:hover {
  border-color: #9e6d2b;
  background: #231c15;
  color: #f9d29b;
  transform: translateY(-1px);
}

.playlist-tab.is-active {
  border-color: #c98e3f;
  background: linear-gradient(135deg, #322112, #1b1612);
  color: #f7c57b;
  box-shadow: 0 4px 18px rgba(196, 137, 63, 0.22), inset 0 0 12px rgba(212, 154, 84, 0.15);
}

.playlist-tab.is-active span {
  transform: scale(1.15);
}

/* Video Shelves Section */
.video-library {
  padding: 40px 0 70px;
  background: #0a0b0b;
}

#videoShelvesContainer {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Shelf Component */
.video-shelf {
  position: relative;
  scroll-margin-top: 120px;
}

.shelf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.shelf-title-group {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.shelf-title {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f7f4ee;
}

.shelf-subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: #8a857e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shelf-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d49a54;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.shelf-action-link:hover {
  color: #f7c57b;
  transform: translateX(2px);
}

/* Shelf Horizontal Carousel Wrapper */
.shelf-carousel-wrapper {
  position: relative;
}

.shelf-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 6px 2px 14px;
}

.shelf-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Carousel Prev/Next Buttons (YouTube Style) */
.shelf-nav-btn {
  position: absolute;
  top: calc(50% - 24px);
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f7f4ee;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
  transition: all 0.2s ease;
  opacity: 0.95;
}

.shelf-nav-btn:hover {
  background: #25221e;
  border-color: #d49a54;
  color: #f7c57b;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85);
  opacity: 1;
}

.shelf-nav-btn.prev {
  left: -18px;
}

.shelf-nav-btn.next {
  right: -18px;
}

.shelf-nav-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.85);
}

.shelf-nav-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Video Card (YouTube Style) */
.yt-card {
  flex: 0 0 calc((100% - (18px * 3)) / 4);
  min-width: 260px;
  max-width: 340px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transition: transform 0.22s ease;
}

.yt-card:hover {
  transform: translateY(-4px);
}

.yt-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1815;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.yt-card:hover .yt-card-thumb-wrap {
  border-color: rgba(212, 154, 84, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(212, 154, 84, 0.12);
}

.yt-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.yt-card:hover .yt-card-thumb {
  transform: scale(1.04);
}

.yt-card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.yt-card:hover .yt-card-play-overlay {
  opacity: 1;
}

.yt-card-play-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(18, 14, 10, 0.88);
  border: 1px solid #d49a54;
  color: #f7c57b;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  padding-left: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.yt-card:hover .yt-card-play-icon {
  transform: scale(1);
}


.yt-badge-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* Card Details */
.yt-card-info {
  padding: 10px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yt-card-title {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #f3efe9;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.18s ease;
}

.yt-card:hover .yt-card-title {
  color: #f8c983;
}

.yt-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.8rem;
  color: #928d85;
  line-height: 1.3;
}

.yt-card-views,
.yt-card-date {
  font-weight: 400;
  color: #928d85;
}

.yt-card-dot {
  font-size: 0.55rem;
  opacity: 0.6;
}

/* Loading & Empty States */
.shelves-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: #9a948c;
  gap: 16px;
}

.shelf-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 154, 84, 0.2);
  border-top-color: #d49a54;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.shelf-empty {
  padding: 30px;
  background: #141311;
  border: 1px dashed #302d28;
  border-radius: 8px;
  text-align: center;
  color: #8d877e;
  font-size: 0.88rem;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .yt-card {
    flex: 0 0 calc((100% - (18px * 2)) / 3);
    min-width: 250px;
  }
}

@media (max-width: 1000px) {
  .video-hero-rhythm, .video-hero-note {
    display: none;
  }
  .playlist-tabs {
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 20px;
  }
  .yt-card {
    flex: 0 0 calc((100% - 16px) / 2.2);
    min-width: 230px;
  }
  .shelf-nav-btn {
    display: none; /* Swipe works best on touch/tablet */
  }
}

@media (max-width: 700px) {
  .videos-main {
    padding-top: 72px;
  }
  .video-library-hero {
    padding: 24px 0 14px;
  }
  .video-library-heading h1 {
    font-size: 2.8rem;
  }
  .playlist-tabs {
    gap: 8px;
    padding: 18px 14px 6px;
  }
  .playlist-tab {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  .playlist-tab span {
    font-size: 0.95rem;
  }
  .video-library {
    padding: 26px 0 50px;
  }
  #videoShelvesContainer {
    gap: 36px;
  }
  .yt-card {
    flex: 0 0 82vw;
    min-width: 240px;
  }
  .shelf-title {
    font-size: 1.22rem;
  }
}
