/* ============================================================
   视频检索页样式（参照资讯主页：固定视口 + 内部滚动）
   ============================================================ */

.video-layout {
  height: calc(100vh - 94px - var(--safe-top));
  margin-top: calc(64px + var(--safe-top));
  padding: 1rem max(1.5rem, var(--safe-right)) 1rem max(1.5rem, var(--safe-left));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ 头部 ============ */
.video-header {
  flex-shrink: 0;
  text-align: center;
  padding: 0.6rem 0;
}
.video-header h1 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.video-header h1 i { color: #ec4899; }
.video-search {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
}
.video-search input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 40px;
  font-size: 0.9rem;
  outline: none;
  color: var(--text-primary);
  transition: border 0.15s;
}
.video-search input:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}
.video-search button {
  padding: 0.65rem 1.5rem;
  border-radius: 40px;
  border: none;
  background: #ec4899;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.video-search button:hover { background: #db2777; }

/* ============ 视频网格（内部滚动） ============ */
.video-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  min-height: 0;
  padding-right: 4px;
  align-content: start;
  -webkit-overflow-scrolling: touch;
}
.video-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}
.video-empty i { font-size: 3rem; margin-bottom: 1rem; display: block; }

/* ============ 视频卡片 ============ */
.video-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: #ec4899;
}
.video-card-cover {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-app);
  overflow: hidden;
}
.video-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-card-duration {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}
.video-card-body { padding: 0.7rem 0.85rem; }
.video-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.video-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
}

/* 播放器 */
#videoPlayerWrap {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}
#videoPlayerWrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .video-layout {
    height: auto;
    min-height: calc(100vh - 50px - var(--safe-top));
    margin-top: calc(50px + var(--safe-top));
    padding: 0.6rem;
    overflow: visible;
  }
  .video-grid {
    max-height: 70vh;
  }
}
@media (max-width: 640px) {
  .video-header h1 { font-size: 1.1rem; }
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
  }
}