.materialContainer {
  padding: 32px;
  min-height: 100vh;
  
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 8px;

  h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.createButton {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }

  &:active {
    transform: translateY(0);
  }

  :global(.anticon) {
    font-size: 20px;
  }
}

.mediaGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 40px;

  @media (max-width: 768px) {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }

  @media (max-width: 480px) {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.mediaCard {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);

  &:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);

    .cardActions {
      opacity: 1;
      transform: translateY(0);
    }

    .coverImage {
      transform: scale(1.05);
    }

    .iconCover .typeIcon {
      transform: scale(1.1);
      color: #667eea;
    }
  }
}

.coverWrapper {
  position: relative;
  height: 200px;
  // background: linear-gradient(135deg, #f093fb 0%, #C5B1CA 100%);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coverContent {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coverImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.iconCover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.typeIcon {
  font-size: 64px;
  color: #667eea;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

// 视频类型图标覆盖层
.videoTypeIcon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  backdrop-filter: blur(10px);
  z-index: 5;
  transition: all 0.3s ease;

  &:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
  }
}

// 图片类型图标覆盖层
.imageTypeIcon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  background: rgba(102, 126, 234, 0.8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  backdrop-filter: blur(10px);
  z-index: 5;
  transition: all 0.3s ease;

  &:hover {
    background: rgba(102, 126, 234, 0.9);
    transform: scale(1.05);
  }
}

.videoIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;

  &:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.cardActions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.actionButton {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #667eea;

  &:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  &.delete {
    color: #ff4757;

    &:hover {
      color: #ff3742;
      background: #fff5f5;
    }
  }
}

.resourceBadge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 600;
}

.badgeText {
  color: inherit;
}

.cardContent {
  padding: 28px;
}

.cardTitle {
  margin: 0 0 16px 0;
  font-size: 22px;
  color: #2c3e50;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.albumInfo {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.description {
  margin: 0;
  color: #7f8c8d;
  font-size: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.typeTag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667eea;
  font-size: 16px;
  font-weight: 600;

  span {
    color: inherit;
  }

  :global(.anticon) {
    font-size: 18px;
  }
}

.emptyContainer {
  text-align: center;
  padding: 80px 32px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 40px auto;
  max-width: 500px;
}

.emptyIcon {
  font-size: 100px;
  color: #bdc3c7;
  margin-bottom: 32px;
  
  :global(.anticon) {
    transition: all 0.3s ease;
    
    &:hover {
      color: #667eea;
      transform: scale(1.1);
    }
  }
}

.emptyContainer h3 {
  margin: 0 0 16px 0;
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
}

.emptyContainer p {
  color: #7f8c8d;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.emptyCreateButton {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }

  :global(.anticon) {
    font-size: 14px;
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 10px;

  label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 6px;
  }

  :global(.ant-input) {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    color: #2c3e50;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    &:focus {
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    &::placeholder {
      color: #adb5bd;
    }
  }

  :global(.ant-input-affix-wrapper) {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;

    &:focus-within {
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    :global(.ant-input) {
      padding: 0;
      border: none;
      box-shadow: none;

      &:focus {
        border: none;
        box-shadow: none;
      }
    }
  }

  :global(.ant-select) {
    .ant-select-selector {
      padding: 14px 18px !important;
      border: 2px solid #e9ecef !important;
      border-radius: 12px !important;
      font-size: 16px;
      height: auto !important;
      min-height: 52px;

      .ant-select-selection-search-input {
        height: auto !important;
        font-size: 16px;
      }

      .ant-select-selection-item {
        font-size: 16px;
        line-height: 1.4;
      }
    }

    &.ant-select-focused .ant-select-selector {
      border-color: #667eea !important;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    }
  }

  input, textarea, select {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    color: #2c3e50;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    &:focus {
      outline: none;
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    &::placeholder {
      color: #adb5bd;
    }
  }

  textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
  }

  select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 18px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 50px;
  }
}

// Modal 和 Popover 全局样式
.materialContainer {
  :global {
    .ant-modal-footer {
      padding: 24px 32px 32px;
      
      .ant-btn {
        height: 44px;
        padding: 0 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        
        &.ant-btn-primary {
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          border: none;
          
          &:hover {
            background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
          }
        }
      }
    }

    .ant-popover {
      .ant-popover-buttons {
        .ant-btn {
          height: 36px;
          padding: 0 16px;
          font-size: 14px;
          font-weight: 500;
          border-radius: 6px;
          
          &.ant-btn-primary {
            background: #ff4757;
            border-color: #ff4757;
            
            &:hover {
              background: #ff3742;
              border-color: #ff3742;
            }
          }
        }
      }
    }
  }
}

// 动画
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.mediaCard {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.emptyIcon {
  animation: pulse 2s infinite;
}

// 响应式设计
@media (max-width: 768px) {
  .materialContainer {
    padding: 20px 16px;
  }
  
  .header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    
    h2 {
      font-size: 32px;
    }
  }
  
  .createButton {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 14px 28px;
  }
  
  .cardContent {
    padding: 24px;
  }
  
  .cardTitle {
    font-size: 20px;
  }
  
  .description {
    font-size: 15px;
  }
  
  .typeTag {
    font-size: 15px;
  }
  
  .emptyContainer {
    padding: 60px 24px;
    margin: 20px;
    
    h3 {
      font-size: 24px;
    }
    
    p {
      font-size: 16px;
    }
  }
  
  .emptyCreateButton {
    font-size: 16px;
    padding: 16px 32px;
  }
} 