/* Gospel Hall Hub - Videos Page Styles */

.videos-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 100px 20px;
  min-height: 100vh;
}

.videos-header {
  margin-bottom: 24px;
}

.videos-title {
  font-size: 32px;
  font-weight: 700;
  color: #162b46;
  margin: 0 0 8px 0;
}

.videos-subtitle {
  font-size: 16px;
  color: #5d6483;
  margin: 0;
}

/* Search Bar */
.videos-search-bar {
  margin-bottom: 16px;
}

.videos-search-bar input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  background: white;
  transition: all 0.2s ease;
}

.videos-search-bar input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Category Filters */
.videos-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.videos-cat-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 20px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.videos-cat-btn:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.videos-cat-btn.active {
  background: #1e3a8a;
  color: white;
}

/* Content Toggle */
.videos-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.toggle-btn {
  padding: 12px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  border-color: #1e3a8a;
  color: #1e3a8a;
}

.toggle-btn.active {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: white;
}

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

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

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

.play-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.video-info {
  padding: 16px;
}

.video-category {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  color: #162b46;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-series {
  font-size: 13px;
  color: #1e3a8a;
  margin: 0 0 4px 0;
}

.video-episode {
  font-size: 12px;
  color: #5d6483;
  margin: 0 0 8px 0;
}

.video-description {
  font-size: 13px;
  color: #5d6483;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Series Grid */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.series-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.3s ease;
}

.series-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.series-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.series-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.series-card:hover .series-thumbnail img {
  transform: scale(1.05);
}

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

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

.series-episode-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(30, 58, 138, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.series-info {
  padding: 16px;
}

.series-category {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.series-name {
  font-size: 18px;
  font-weight: 600;
  color: #162b46;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.series-description {
  font-size: 13px;
  color: #5d6483;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading State */
.videos-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: #5d6483;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #1e3a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

/* Empty State */
.videos-empty {
  text-align: center;
  padding: 60px 20px;
  color: #5d6483;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.videos-empty h3 {
  font-size: 20px;
  color: #162b46;
  margin: 0 0 8px 0;
}

.videos-empty p {
  margin: 0;
}

/* Video Player Modal */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal.hidden {
  display: none;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
}

.video-player-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  z-index: 1;
}

.video-player-header {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.video-player-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.video-player-close:hover {
  background: rgba(255,255,255,0.3);
}

.video-player-body {
  width: 100%;
  height: 100%;
}

.video-player-wrapper {
  aspect-ratio: 16/9;
  background: #000;
}

.video-player-wrapper iframe,
.video-player-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
}

.video-details {
  background: white;
  padding: 20px;
}

.video-detail-category {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.video-detail-title {
  font-size: 24px;
  font-weight: 700;
  color: #162b46;
  margin: 0 0 12px 0;
}

.video-detail-series {
  font-size: 16px;
  color: #1e3a8a;
  margin: 0 0 12px 0;
}

.video-detail-description {
  font-size: 15px;
  color: #5d6483;
  line-height: 1.6;
  margin: 0;
}

/* Series Modal */
.series-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.series-modal.hidden {
  display: none;
}

.series-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}

.series-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  z-index: 1;
}

.series-header {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.series-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.series-close:hover {
  background: rgba(0,0,0,0.7);
}

.series-body {
  overflow-y: auto;
  max-height: 90vh;
}

.series-hero {
  position: relative;
  aspect-ratio: 21/9;
  overflow: hidden;
}

.series-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.series-hero-category {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255,255,255,0.2);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  width: fit-content;
}

.series-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
}

.series-hero-description {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.series-hero-episodes {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.episodes-list {
  padding: 24px;
}

.episodes-list h3 {
  font-size: 20px;
  color: #162b46;
  margin: 0 0 16px 0;
}

.no-episodes {
  text-align: center;
  color: #5d6483;
  padding: 40px;
  font-style: italic;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.episode-item:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

.episode-number {
  width: 40px;
  height: 40px;
  background: #1e3a8a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.episode-thumbnail {
  position: relative;
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.episode-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.episode-item:hover .episode-play {
  opacity: 1;
}

.episode-info {
  flex: 1;
  min-width: 0;
}

.episode-title {
  font-size: 15px;
  font-weight: 600;
  color: #162b46;
  margin: 0 0 4px 0;
}

.episode-description {
  font-size: 13px;
  color: #5d6483;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* ========== THEME SUPPORT ========== */

/* Dark Theme */
body.dark-theme .videos-container {
  background: #12181f;
}

body.dark-theme .videos-title,
body.dark-theme .video-card-title,
body.dark-theme .series-title,
body.dark-theme .series-hero-title,
body.dark-theme .episode-title {
  color: #ffffff;
}

body.dark-theme .videos-subtitle,
body.dark-theme .video-card-meta,
body.dark-theme .series-description,
body.dark-theme .episode-description {
  color: #e8e8e8;
}

body.dark-theme .videos-cat-btn {
  background: #2d2d2d;
  border-color: #3d3d3d;
  color: #e8e8e8;
}

body.dark-theme .video-card,
body.dark-theme .series-card,
body.dark-theme .videos-search-bar input,
body.dark-theme .video-player-content,
body.dark-theme .series-content {
  background: #1e1e1e;
  border-color: #3d3d3d;
}

body.dark-theme .video-details {
  background: #1e1e1e;
}

body.dark-theme .video-detail-category {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
}

body.dark-theme .video-detail-title {
  color: #ffffff;
}

body.dark-theme .video-detail-series {
  color: #a78bfa;
}

body.dark-theme .video-detail-description {
  color: #e8e8e8;
}

body.dark-theme .video-player-close,
body.dark-theme .series-close,
body.dark-theme .episode-count {
  color: #e8e8e8;
}

body.dark-theme .episode-item:hover {
  background: #3d3d3d;
}

/* Parchment Theme */
body.parchment-theme .videos-container {
  background: #f5e6c8;
}

body.parchment-theme .videos-title,
body.parchment-theme .video-card-title,
body.parchment-theme .series-title,
body.parchment-theme .series-hero-title,
body.parchment-theme .episode-title {
  color: #1a1a1a;
}

body.parchment-theme .videos-subtitle,
body.parchment-theme .video-card-meta,
body.parchment-theme .series-description,
body.parchment-theme .episode-description {
  color: #3d2914;
}

body.parchment-theme .videos-cat-btn {
  background: #fff8e7;
  border-color: #d4c4a8;
  color: #3d2914;
}

body.parchment-theme .video-card,
body.parchment-theme .series-card,
body.parchment-theme .videos-search-bar input,
body.parchment-theme .video-player-content,
body.parchment-theme .series-content {
  background: #fff8e7;
  border-color: #d4c4a8;
}

body.parchment-theme .video-player-close,
body.parchment-theme .series-close,
body.parchment-theme .episode-count {
  color: #3d2914;
}

body.parchment-theme .episode-item:hover {
  background: #f0e6d0;
}

/* Light Theme */
body.light-theme .videos-container {
  background: #f8fafc;
}

/* Mobile */
@media (max-width: 640px) {
  .videos-container {
    padding: 16px 16px 100px 16px;
  }
  
  .videos-title {
    font-size: 24px;
  }
  
  .videos-grid {
    grid-template-columns: 1fr;
  }
  
  .series-grid {
    grid-template-columns: 1fr;
  }
  
  .videos-cat-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .video-player-content,
  .series-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .series-hero-title {
    font-size: 22px;
  }
  
  .episode-item {
    flex-wrap: wrap;
  }
  
  .episode-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
  }
}
