
@import (reference) '../../styles/mixins.less';
@import (reference) '../../styles/variables.less';


.videoSelector {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;

  @media (max-width: 576px) {
    border-radius: 0;
  }
}

.uploadArea {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  background-color: #fafafa;
  cursor: pointer;
  padding: 32px;
  transition: all 0.3s;

  @media (max-width: 576px) {
    padding: 24px 16px;
    min-height: 160px;
  }

  &:hover {
    border-color: @film-amber;
    background-color: #f0f7ff;
  }

  &.dragging {
    border-color: @film-amber;
    background-color: #fffbe6;
    transform: scale(1.01);
  }

  p {
    margin: 0;

    &.uploadTip {
      font-size: 12px;
      color: rgba(0, 0, 0, 0.45);
      margin-top: 8px;

      @media (max-width: 576px) {
        font-size: 11px;
        text-align: center;
      }
    }
  }
}

.uploadIcon {
  font-size: 48px;
  color: #d9d9d9;
  margin-bottom: 16px;
  transition: all 0.3s;

  @media (max-width: 576px) {
    font-size: 36px;
    margin-bottom: 12px;
  }

  .uploadArea:hover & {
    color: @film-amber;
  }
}

.videoPreviewContainer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;

  @media (max-width: 576px) {
    gap: 12px;
  }
}

.videoPreview {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000;
  position: relative;
  
  &::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9宽高比 */
  }
}

.videoPlayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.metadataCard {
  width: 100%;
  
  :global(.ant-card-head) {
    border-bottom: 1px solid #f0f0f0;
    min-height: 40px;
    padding: 0 16px;
  }
  
  :global(.ant-card-head-title) {
    padding: 8px 0;
    font-size: 14px;
  }
  
  :global(.ant-card-body) {
    padding: 12px 16px;
  }
  
  p {
    margin-bottom: 6px;
    font-size: 13px;
    
    &:last-child {
      margin-bottom: 0;
    }
  }
}

.videoActions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* 响应式布局 */
@media (min-width: 768px) {
  .videoPreviewContainer {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .videoPreview {
    flex: 1;
    min-width: 300px;
  }
  
  .metadataCard {
    width: 240px;
    flex-shrink: 0;
  }
  
  .videoActions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 暗黑模式适配 */
:global(.dark) {
  .uploadArea {
    background-color: #1f1f1f;
    border-color: #434343;
    
    &:hover {
      background-color: #141414;
      border-color: @film-amber;
    }
    
    .uploadTip {
      color: rgba(255, 255, 255, 0.45);
    }
  }
  
  .uploadIcon {
    color: #434343;
  }
  
  .metadataCard {
    background-color: #1f1f1f;
    
    :global(.ant-card-head) {
      border-bottom-color: #303030;
    }
  }
} 