nav {
  position: absolute;
}
/* 课程分类导航 */
.course-categories {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 30px 0;
  background-color: #f8f8f8;
}

.category-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: all 0.3s ease;
  position: relative;
}

.category-btn.active {
  color: #333;
  font-weight: bold;
}

.category-btn.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #333;
}

/* 课程列表容器 */
.courses-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* 课程卡片样式 */
.course-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.course-card:hover {
  transform: translateY(-5px);
}

.course-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff4d4f;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.course-info {
  padding: 20px;
}

.course-info h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #333;
}

.course-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  color: #999;
  font-size: 12px;
  margin-bottom: 15px;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-price {
  color: #ff4d4f;
  font-size: 20px;
  font-weight: bold;
}

.enroll-btn {
  padding: 8px 20px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.enroll-btn:hover {
  background-color: #444;
}

/* 我的课程区域 */
.my-courses {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.my-courses h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 30px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .course-categories {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .category-btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .courses-container {
    grid-template-columns: 1fr;
  }
} 