/* Darkerox - Video Grid & Card Stylesheet */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 1600px) {
  .video-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1200px) and (max-width: 1599px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 850px) and (max-width: 1199px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 480px) and (max-width: 849px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 479px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* Video Card */
.video-card {
  background: #0b60d2;
  background: linear-gradient(180deg, #094eb0 0%, #0060df 40%, #0056b3 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 100px 240px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 25px rgba(0, 96, 223, 0.45);
}

/* Thumbnail wrapper */
.card-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding-top: 56.25%; /* Fallback 16:9 ratio */
  background-color: #07090e;
  overflow: hidden;
}

.card-thumbnail-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  decoding: async;
  transition: transform 0.25s ease;
}

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

/* Play Icon Overlay */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

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

.play-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.95);
  color: #0060df;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transform: scale(0.85);
  transition: transform 0.15s ease;
}

.video-card:hover .play-icon-btn {
  transform: scale(1);
}

/* HD Badge on Thumbnail */
.card-hd-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 2;
}

/* Card Content */
.card-body {
  padding: 0.75rem 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: color 0.15s ease;
}

.video-card:hover .card-title {
  color: #ffffff;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  padding-top: 0.4rem;
  margin-top: auto;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.card-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  white-space: nowrap;
}

.card-stat-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: currentColor;
}

.card-badge-hd {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-left: auto;
}

@media (max-width: 479px) {
  .card-body {
    padding: 0.55rem 0.55rem 0.5rem;
    gap: 0.35rem;
  }
  .card-title {
    font-size: 0.82rem;
    line-height: 1.25;
  }
  .card-meta {
    font-size: 0.7rem;
    padding-top: 0.25rem;
  }
}

/* Pagination component */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  background-color: var(--bg-tertiary);
  border-color: var(--accent);
  color: #ffffff;
}

.page-btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-dots {
  color: var(--text-muted);
  padding: 0 0.25rem;
}

/* Skeleton Loading State */
.skeleton-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-thumb {
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(90deg, #161b22 25%, #21262d 50%, #161b22 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #161b22 25%, #21262d 50%, #161b22 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-desc {
  max-width: 440px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}
