.videos-container {
  min-height: 100vh;
  background: #0a0a0a;
  padding-bottom: 80px;
}

.videos-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10,10,10,0.98) 60%, rgba(10,10,10,0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px 0;
}

.videos-search {
  max-width: 600px;
  margin: 0 auto 8px;
}

.videos-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
  max-width: 600px;
  margin: 0 auto;
}
.videos-tabs::-webkit-scrollbar { display: none; }

.videos-tab {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.videos-tab:hover {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.videos-tab.active {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
  font-weight: 600;
}

/* --- Video Grid: CSS Grid for mixed aspect ratios --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 16px;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 12px;
  }
}
@media (min-width: 641px) and (max-width: 960px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 961px) and (max-width: 1280px) {
  .videos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1281px) {
  .videos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Video Card --- */
.video-card {
  background: #141414;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.video-card-media {
  display: block;
  text-decoration: none;
  color: inherit;
}

.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.video-thumb-wrap:hover .video-thumb {
  opacity: 0.85;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.video-play-overlay i {
  font-size: 56px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  padding: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.video-card:hover .video-play-overlay {
  opacity: 1;
}
.video-card.playing .video-play-overlay {
  opacity: 0;
}

/* --- Video Card Info --- */
.video-card-info {
  display: flex;
  gap: 10px;
  padding: 10px 12px 12px;
}

.video-card-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card-avatar i {
  font-size: 36px;
  color: #666;
}

.video-card-meta {
  flex: 1;
  min-width: 0;
}

.video-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #f1f1f1;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #aaa;
}

.video-card-author {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-card-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.video-stat {
  display: flex;
  align-items: center;
  gap: 2px;
}
.video-stat i {
  font-size: 14px;
}

.video-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.video-tag {
  font-size: 11px;
  color: #6ba3ff;
  text-decoration: none;
}
.video-tag:hover {
  text-decoration: underline;
}

/* --- Empty State --- */
.videos-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
}
.videos-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.videos-empty a {
  color: var(--accent-color, #ff4081);
}

/* --- Landscape / Portrait aspect overrides --- */
.video-card[data-orientation="portrait"] .video-thumb-wrap {
  aspect-ratio: 9 / 16;
  max-height: 400px;
}
.video-card[data-orientation="square"] .video-thumb-wrap {
  aspect-ratio: 1 / 1;
}

/* --- Video Watch Page (inline player) --- */
.video-watch-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.video-player-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.video-player-wrap.portrait {
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  margin: 0 auto;
  max-width: 450px;
}

/* --- Loading --- */
.videos-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 40px;
}
