/* ============================================
   Bitcoin Video Library - Styles
   ============================================ */

/* --- Video Hero --- */
.vid-hero {
  position: relative;
  padding: 158px 24px 32px;
  text-align: center;
  z-index: 1;
}

.vid-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(247, 147, 26, 0.1);
  border: 1px solid rgba(247, 147, 26, 0.25);
  color: var(--accent-orange);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  animation: fadeInDown 0.8s ease;
}

.vid-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.vid-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 32px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* --- Search Bar --- */
.vid-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.vid-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.vid-search-input {
  width: 100%;
  padding: 14px 48px 14px 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.vid-search-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.1);
}

.vid-search-input::placeholder {
  color: var(--text-muted);
}

.vid-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.3s;
  display: none;
  align-items: center;
  justify-content: center;
}

.vid-search-clear:hover {
  color: var(--text-primary);
}

/* --- Featured Spotlight --- */
.vid-spotlight {
  position: relative;
  z-index: 1;
  padding: 0 0 48px;
}

.vid-spotlight-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  cursor: pointer;
}

.vid-spotlight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(247, 147, 26, 0.06);
}

.vid-spotlight-thumb {
  position: relative;
  overflow: hidden;
}

.vid-spotlight-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.vid-spotlight-card:hover .vid-spotlight-thumb img {
  transform: scale(1.03);
}

.vid-spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.6), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.vid-spotlight-card:hover .vid-spotlight-overlay {
  opacity: 1;
}

.vid-spotlight-info {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vid-spotlight-tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #000;
  margin-bottom: 16px;
}

.vid-spotlight-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}

.vid-spotlight-creator {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.vid-spotlight-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.vid-spotlight-play {
  width: fit-content;
}

/* --- Play Button --- */
.vid-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(247, 147, 26, 0.9);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.3s;
  box-shadow: 0 4px 24px rgba(247, 147, 26, 0.4);
  border: none;
  cursor: pointer;
}

.vid-play-btn:hover {
  transform: scale(1.1);
  background: var(--accent-orange);
}

.vid-play-btn-lg {
  width: 72px;
  height: 72px;
}

/* --- Duration Badge --- */
.vid-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-display);
  pointer-events: none;
}

/* --- Sticky Category Navigation --- */
.vid-cat-nav {
  position: sticky;
  top: 76px;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.vid-cat-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vid-cat-nav-inner::-webkit-scrollbar {
  display: none;
}

.vid-cat-pill {
  flex-shrink: 0;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-main);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
  white-space: nowrap;
  cursor: pointer;
}

.vid-cat-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.vid-cat-pill.active {
  color: #000;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-color: transparent;
  font-weight: 600;
}

/* --- Video Category Sections --- */
.vid-category {
  padding: 56px 0 0;
  position: relative;
  z-index: 1;
}

.vid-category:last-of-type {
  padding-bottom: 80px;
}

.vid-category-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.vid-category-header-left {
  flex: 1;
}

.vid-category-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.vid-category-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* --- Carousel --- */
.vid-carousel-arrows {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.vid-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  cursor: pointer;
  font-family: var(--font-main);
}

.vid-arrow:hover:not(:disabled) {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(247, 147, 26, 0.05);
}

.vid-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.vid-carousel {
  overflow: hidden;
  position: relative;
}

.vid-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 16px;
}

.vid-carousel-track::-webkit-scrollbar {
  display: none;
}

/* --- Video Card --- */
.vid-card {
  flex: 0 0 calc(25% - 15px);
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vid-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-orange);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(247, 147, 26, 0.08);
}

.vid-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.vid-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.vid-card:hover .vid-card-thumb img {
  transform: scale(1.06);
}

.vid-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.vid-card:hover .vid-card-overlay {
  opacity: 1;
}

.vid-card-info {
  padding: 14px 16px 18px;
}

.vid-card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vid-card-creator {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

/* --- Video Modal --- */
.vid-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.vid-modal.open {
  opacity: 1;
  visibility: visible;
}

.vid-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.vid-modal-content {
  position: relative;
  width: 90vw;
  max-width: 960px;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vid-modal.open .vid-modal-content {
  transform: scale(1) translateY(0);
}

.vid-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  color: var(--text-secondary);
  padding: 8px;
  transition: color 0.3s;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
}

.vid-modal-close:hover {
  color: var(--text-primary);
}

.vid-modal-player {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.vid-modal-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.vid-modal-info {
  padding: 16px 4px 0;
}

.vid-modal-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.vid-modal-info p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* --- Search Results --- */
.vid-search-results {
  padding: 48px 0 80px;
  position: relative;
  z-index: 1;
}

.vid-search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.vid-search-results-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.vid-search-results-clear {
  color: var(--accent-orange);
  font-size: 0.88rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  transition: opacity 0.3s;
}

.vid-search-results-clear:hover {
  opacity: 0.8;
}

.vid-search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.vid-search-results-grid .vid-card {
  flex: none;
}

.vid-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Video Count Badge --- */
.vid-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 100px;
  background: rgba(247, 147, 26, 0.1);
  color: var(--accent-orange);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 8px;
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .vid-hero {
    padding-top: 138px;
  }

  .vid-spotlight-card {
    grid-template-columns: 1fr;
  }

  .vid-spotlight-info {
    padding: 24px 28px 28px;
  }

  .vid-spotlight-title {
    font-size: 1.35rem;
  }

  .vid-card {
    flex: 0 0 calc(33.333% - 14px);
  }
}

@media (max-width: 768px) {
  .vid-hero {
    padding-top: 120px;
  }

  .vid-hero-title {
    font-size: 1.8rem;
  }

  .vid-hero-subtitle {
    font-size: 0.95rem;
  }

  .vid-cat-nav {
    top: 72px;
  }

  .vid-card {
    flex: 0 0 calc(50% - 10px);
  }

  .vid-carousel-arrows {
    display: none;
  }

  .vid-spotlight-title {
    font-size: 1.2rem;
  }

  .vid-spotlight-desc {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .vid-category-title {
    font-size: 1.25rem;
  }

  .vid-search-input {
    font-size: 0.88rem;
    padding: 12px 44px 12px 46px;
  }
}

@media (max-width: 480px) {
  .vid-card {
    flex: 0 0 80%;
  }

  .vid-modal-content {
    width: 96vw;
  }

  .vid-spotlight-desc {
    display: none;
  }

  .vid-spotlight-info {
    padding: 20px;
  }

  .vid-search-results-grid {
    grid-template-columns: 1fr;
  }
}
