.video-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 14px;
  margin-bottom: 18px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.video-player-panel {
  margin-bottom: 18px;
}

.video-player-panel .video-embed-frame {
  aspect-ratio: 16 / 8.1;
}

.video-player-panel .video-embed-meta {
  padding: 18px 20px;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.video-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--panel-border));
  box-shadow: 0 18px 48px var(--accent-glow);
}

.video-card:hover {
  transform: translateY(-3px);
}

.video-card-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--panel-border);
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%),
    color-mix(in srgb, var(--panel-bg) 84%, black);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.video-card-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
  transform: scale(1.02);
}

.video-card-media:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 2px;
}

.video-card-body {
  padding: 16px;
}

.video-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.video-head .chip {
  flex: 0 0 auto;
}

.video-title {
  display: block;
  overflow: hidden;
  color: var(--text-main);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video-title:hover {
  color: var(--text-main);
}

.video-card-body .muted {
  margin-top: 6px;
}

.video-meta {
  display: grid;
  gap: 10px;
}

.video-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(56px, 66px);
  gap: 8px;
}

.video-model-link {
  display: block;
  overflow: hidden;
  color: var(--accent);
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video-model-link:hover {
  color: color-mix(in srgb, var(--accent) 88%, white);
}

.video-model-link.is-static {
  color: var(--accent);
}

.age-stat {
  justify-self: end;
}

.age-stat .stat-value {
  min-width: 0;
}

.video-embed-copy {
  display: grid;
  gap: 10px;
}

.video-embed-models {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.video-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.video-pagination .pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-count {
  color: var(--text-dim);
}

.video-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 900px) {
  .video-tools {
    grid-template-columns: 1fr;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-pagination {
    flex-direction: column;
    align-items: start;
  }
}
