/* Video Gallery Styles */

.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--scitex-color-04);
}

/* Thumbnail wrapper */
.video-thumbnail-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-muted);
}

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

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

/* Video badge */
.video-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  z-index: 10;
}

.video-badge i {
  font-size: 0.7rem;
}

.mcp-badge {
  background: rgba(99, 102, 241, 0.95);
  color: white;
}

.claude-badge {
  background: rgba(217, 119, 87, 0.95);
  color: white;
}

.python-badge {
  background: rgba(55, 118, 171, 0.95);
  color: white;
}

.cloud-badge {
  background: #10b981;
  color: #fff;
}

.local-mcp-badge {
  background: #d97757;
  color: #fff;
}

.local-python-badge {
  background: #3776ab;
  color: #fff;
}

/* Video duration */
.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  z-index: 10;
}

/* Play overlay */
.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.video-play-overlay i {
  font-size: 4rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.video-thumbnail-wrapper:hover .video-play-overlay i {
  transform: scale(1.1);
}

/* Video info */
.video-info {
  padding: 1.5rem;
}

.video-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.video-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Video links */
.video-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.video-links-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.video-links-row + .video-links-row {
  margin-top: 0.25rem;
}

.video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.video-link:hover {
  background: var(--scitex-color-04);
  border-color: var(--scitex-color-04);
  color: white;
}

.video-link i {
  font-size: 0.85rem;
}

/* Video date */
.video-date {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted, #8b949e);
}

/* Placeholder card */
.video-card-placeholder {
  opacity: 0.7;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  background: var(--bg-muted);
}

.video-placeholder i {
  font-size: 3rem;
}

.video-placeholder span {
  font-size: 0.95rem;
}

/* Repository Grid */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.repo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.repo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--scitex-color-04);
}

.repo-icon {
  font-size: 2rem;
  color: var(--scitex-color-04);
}

.repo-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.repo-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Dark mode adjustments */
[data-theme="dark"] .video-card:hover,
[data-theme="dark"] .repo-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}
