.layout {
  display: flex;
  height: 100%;
  position: relative;
  z-index: 2;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tab header */
.tabHeader {
  padding: 20px 32px 0;
  border-bottom: 1px solid var(--color-border-soft);
}

.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}

.tab {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}

.tab:hover {
  color: var(--color-text-primary);
}

.tabActive {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-primary);
}

.subTabs {
  display: flex;
  gap: 16px;
}

.subTab {
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}

.subTab:hover {
  color: var(--color-text-primary);
}

.subTabActive {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-primary);
}

/* Content */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-disabled);
  font-size: 14px;
}

/* Date group */
.dateGroup {
  margin-bottom: 32px;
}

.dateLabel {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* Thumbnail grid: 5 columns */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

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

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Thumbnail card */
.thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg-thumbnail);
  cursor: pointer;
  transition: transform 0.15s;
}

.thumbnail:hover {
  transform: scale(1.02);
}

.thumbVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbPlaceholder {
  width: 100%;
  height: 100%;
  background: var(--color-bg-dropdown-elevated);
}

.durationBadge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-modal-overlay);
  color: var(--color-on-overlay);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.thumbOverlay {
  position: absolute;
  inset: 0;
  background: var(--color-bg-thumbnail-hover);
  pointer-events: none;
}
